From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-28-2014 12:44 AM
Hi,
I'm relatively new to LabVIEW and I'm using pre-existing code linked to a SMC100 controller to move an actuator and monitor the current position. The VI is using a Newport provided VI to determine the current position and it works well for the majority of the time but every now and then there is a glitch during the acquisition that results in a reading of 0 mm before the next reading returns to the actual position. Has anyone had this problem before and any suggestions on what is causing it or how to fix it?
Many thanks.
JR
07-29-2014 10:49 AM
I have not used these specific serial motor controllers, but the issue is likey a communication issue with the VISA calls in the driver VIs. How often is the position updated from the device, and how is the device connected to your PC?
07-31-2014 12:29 AM
Hi Karl,
The position updates every 0.16 seconds and it's connected via a RS-232 cable. If a mis-read occurs (where it suddenly records a zero displacement), there is a delay of approximately 0.41-0.42 seconds before the next update occurs at presumably the correct position again. Also, the time difference between subsequent updates is reduced to approximately 0.13 seconds for the next 10-20 readings before returning to 0.16 seconds thereafter.
JR
08-01-2014 11:20 AM
Are the position reads being commanded by the VI at the regular intervals (and therefore slowing down), or does the device send them out regardless of command?
08-01-2014 08:57 PM
The position reads are commanded by the VI but no specific time interval has been designated as far as I can tell. The reads occur based on a while loop structure. I have also run a simplified VI that has the position read command in a while loop with no other commands and the error still occurs.
JR
08-04-2014 01:35 PM
If the only thing the VI is doing is reading the serial position then waiting to read again, it sounds like it's a firmware hiccup on the motor drive. If you cannot update the firmware, you could implement a workaround at the VI level of putting a case structure after the position read and just ignore the reading of zero.
08-04-2014 11:00 PM
I'm not sure about the firmware. I will have to look into that. Thanks for the suggestion. As for a case structure, are you suggesting structure to re-call the motor if the position reads zero incorrectly?
JR
08-05-2014 04:49 PM
Not necessarily to affect the motion (as long as the motion is still working fine when the zero position is returned), just have one case of the case structure monitoring for a zero position from the VISA read output and commanding another VISA read to replace the value. The default case would be wired straight through.
08-06-2014 05:18 PM
Ok great, thanks!
JR