LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simulate rs 232 conection for vi development

Hello,

 

I am working on a VI to control stepping motor controllers driving a syringe pump using ASCII commands through a rs 232 serial port.  I have a working vi that allows me to type in commands and read the responses from the controller like a terminal emulator.  I would like to automate the most frequent commands in the form of push buttons and numerical controls.  I have a fair idea how to do this (however I welcome anyone's ideas) but my question here is can I some how simulate the rs 232 connection to the vi so I can develop the program at home and test run it without having the device attached.  All I am looking for is to have the "device" reply the same ASCII code back, this would help me determine if I am sending the proper code to the controller.

Thank you for your help,
 
Carl  Adams
University of South Florida
MEMS Research
0 Kudos
Message 1 of 3
(2,585 Views)

Carl,

 

One way to do this (assuming that you are not trying to test the serial port connections themselves) is to write Serial Write (dummy).vi and Serial Read (Dummy).vi.  Give them the same connector panes and controls as the real ones.  Internally they write/read to/from a functional global or queue which is only used by the pair.  You may also need to create dummy Initialize and Close VIs to avoid errors there.

 

Lynn 

0 Kudos
Message 2 of 3
(2,582 Views)

If you have a second com port, you connect to it with a null-modem cable and have another VI monitor that port and whatever it reads, just writes that back to com1.

0 Kudos
Message 3 of 3
(2,580 Views)