From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues communicating through serial RS232

Hi all, I have been communicating with a FISO DMI through an RS232 serial port but am having issues with the response from the machine. I have attached the front panel and block panel of my program, but essential if I feed the machine the command [SN] I should receive 02D5.0011 and I receive fragments of this, such as 11, D5.001, or just SN is returned. Any thoughts would be greatly appreciated!

Download All
0 Kudos
Message 1 of 2
(1,772 Views)

Do you need to send a termination character such as a line feed for carriage return along with the command of [SN] ?

 

You have a lot of coercion dots on your block diagram unnecessarily because of using wrong datatypes.  It don't think it is causing your issue, but it shows you are new at LabVIEW and don't know the easy way of creating Constants, Controls, and Indicators of the correct data types.

 

Disconnect any wire with a red dot on it.  Right click on the terminals of the subVI Serial Configure, and pick Create Constant.  Now you'll have the correct data type.

For the VISA REad and Write functions, you have them going to a Double Indicator even though the wire is blue, an integer.  Delete those indicators.  Right-click on the functions output terminal and pick Create Indicator.  Voila!  An indicator with the datatype that matches the function and no red coercion dot!

 

Don't forget to wire the Error wires on those VISA funtions.  Are any of them giving you a timeout error?

 

Have you checked your parity settings?  (Hard to know what your parity is since it is a constant rather than an enum).  Is the RS-232 cable good?

 

 

0 Kudos
Message 2 of 2
(1,736 Views)