LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a Serial Linear Actuator in LabVIEW

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. 

0 Kudos
Message 1 of 8
(3,005 Views)

Search the example finder (LabVIEW Help menu) for "serial".

0 Kudos
Message 2 of 8
(2,993 Views)

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?

0 Kudos
Message 3 of 8
(2,984 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 8
(2,973 Views)

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. 

Message 5 of 8
(2,971 Views)

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.

 

Smiley Frustrated

0 Kudos
Message 6 of 8
(2,947 Views)

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?

0 Kudos
Message 7 of 8
(2,943 Views)

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.

Message 8 of 8
(2,929 Views)