07-30-2015 01:18 PM
I am trying to run VISA commands to a motor. There is a command for the motor that allows it to return a value once it has reached the position it was sent to, but the labview interface I created will not automatically return the value. The subvi must be run twice to return the value, which causes the motor to have to go double the rotation than the user defined rotation. When the value to return is changed, the program continues to return the previous value for some time after, making me feel like the information is backlogged in the system. Is there a way to make the value return from VISA read after the motor has stopped? I have attached the subvi in question.
07-30-2015 01:34 PM
What motor are you controlling? Does the motor use a termination character for its communications?
The "wait and then check number of bytes in the port" is a very common race condition. If your motor uses the termination character, you really should just tell the VISA Read to read more bytes than you would ever expect from a message. Yes, you have a very good chance that you hit this said race condition and therefore you are just reading "old" data in the buffer.
07-30-2015 01:46 PM
It's a LinEngineering stepper motor. It doesn't use a termination character for communication. Thus, when the byte number is changed, the problem persists. Do you know if there is anything else I could try?
07-30-2015 02:29 PM
07-30-2015 02:43 PM
The model of motor is CE-5718L-01PD-60RO
07-30-2015 04:24 PM