06-07-2023 05:14 AM
thanks!
06-07-2023 05:35 AM
06-07-2023 06:40 AM
I modified my program as you said. After opening the communication connection, I tried to open the servo control and received the connection error code: 36864.
06-07-2023 07:37 AM - edited 06-07-2023 07:41 AM
Well, you need to learn a bit more about C syntax.
Compare these three prototypes:
LONG STDCALL ESOpen(long controllerType, char *ipAddress, HANDLE *handle);
LONG STDCALL ESServo(HANDLE handle, long onOff);
LONG STDCALL ESClose(HANDLE handle);
Do you see any difference about the handle parameter?
Yes indeed there is an asterisk in front of the variable name in the ESOpen() function. This is because this parameter needs to be passed by reference, in order for the function to be able to return a value in it.
This asterisk is missing by the other two functions and that means that this parameter should not be configured to be passed as Pointer to Value but as Value instead.
Also, please check the parameter order for your ESServo() function. You got that wrong.
Last but not least, you SHOULD wire values to the inputs of the MotomES Open.vi function. The default for the controller type is not going to work as is. The default for the ipAddress might work for your current network setup but I doubt that is the default setting for your device when delivered from the factory.
06-07-2023 07:39 PM
I just modified the program again, and the IP address is the real device address because I can control it using C # routines. But I got the same error code as using the. net assembly: connection timeout.
06-07-2023 08:05 PM
I have reviewed the code and found some errors. Now, there is another issue: how to pass in parameters to the DLL structure
06-07-2023 08:13 PM
I tried to match to the type and entered the cluster type for LV, but returned a parameter error code
06-07-2023 10:19 PM
Hello, I seem to have encountered a more serious problem: when I called this library function, labview crashed
06-07-2023 10:27 PM
I have found a solution by changing the nested arrays in the structure to array elements
06-08-2023 01:34 AM
Hello, I have encountered more complex structural parameters, and applying the above settings will no longer work.