06-24-2019 12:43 PM - edited 06-24-2019 12:59 PM
I am trying to generate signals from an Ultramotion serial linear actuator in LabVIEW and have these signals cause displacements in the actuator. I know I need to use NI-VISA to communicate with the actuator, but I am unsure of how to wire the VISA graphic in the block diagram, and also how to specify the COM1 port I am using on the computer in LabVIEW. Any help would be appreciated. I've included a snip of the block diagram code to control the actuator that was given to me for a project very, very similar to the one I am working on.
06-24-2019 12:56 PM
Search the example finder (LabVIEW Help menu) for "serial".
06-24-2019 01:06 PM
Thanks for the response, I have loaded simple serial.vi and can write to my device but it doesn't seem to recognize the *IDN? command. Is there a way for me to check if I can read and write with my serial device?
06-24-2019 01:29 PM
NI I/O Trace will get you as close to the serial port as possible without resorting to hardware.
You could wire-up a loop-back connector that wires TX to RCV if it is truly a serial interface.
But no all serial devices respond to *IDN?
Check the manual for your device to learn what commands it does accept and how the serial port has tobe configured (bad rate parity, stop bits termination character).
Ben
06-24-2019 01:30 PM
Only "SCPI"-style devices support *IDN?. Your motor isn't one of them. It appears to only use 2-letter commands with a specific format.
Check this PDF. Start at page 35 or so.
06-24-2019 03:02 PM
I wish NI would take out the "IDN?" from the examples. So few devices actually respond to that, that people are frequently being mislead that somehow that the example should magically work for any device they connect to the serial port without paying attention to the command being written.
06-24-2019 03:07 PM
I have been able to generate movement in the actuator using these 2-letter commands and PutTy. Would the 2-letter commands work in the serial.vi examples that Labview has posted?
06-24-2019 04:00 PM
Probably. Just make sure to make sure all of the serial connection settings match (Baud rate, etc) and that you send any required termination characters at the end of each command.