1Jan

Serial Time Out Labview Tutorials

Introduction to VISA. Introduction to Programming Serial Devices in VISA. LabVIEW, refer to the VISA documentation included with your LabVIEW software. Timeout and the termination character for the communication channel.

Hi, I’m in the process of communicating a device through serial port. Before I start the LabVIEW program I verify through HyperTerminal. That’s working. When I try to use the LabVIEW program it gives an Error.

I tried to check all the possibilities in the program and I’m not able to figure out what went wrong? Even through MAX also giving the error. I tried multiple times of trial at Hyper terminal it works fine. In program after the command I used r n but no improvement.

(I tried different combination n r and n and r and r n ) Here I given the settings of Hyper terminal for your reference and vi too attached. Since you are using XON/XOFF flow control, perhaps the control character is not being set to the correct character. Check the documentation on your device for what the XON/XOFF characters are.

You can change this setting by using a property node. It is in Serial settings -> XON flow control character, and Serial settings ->Class 11 vw bug XOFF flow control character. Additionally you can manually set the flow control state to force it to something on your end, but since the read is failing, this probably wont help you. One more thing, you are sending 'N? R n' I'm gonna assume that this is using codes display. Your VISA Configure is adding a ' n' to all writes for you. It might be in your best interest to turn this off.

The actual data on the line will be 'N? R n n' If you want additional control over the line (which I've done before to debug this exact situation) turn off flow control entirely, and manually put all the data on the line. If your xon char=0x11 and xoff=0x12, then your codes display to send for that message would be: /11N?/r/n/12 In hex, the data would be: 2F31 314E 3F2F 722F 6E2F 3132 Hope this helps Arg, i put the slashes in the wrong direction Codes Display: 11N? R n 12 Hex: 114E 3F0D 0A12 sorry about that. Since you are using XON/XOFF flow control, perhaps the control character is not being set to the correct character. Check the documentation on your device for what the XON/XOFF characters are.

You can change this setting by using a property node. It is in Serial settings -> XON flow control character, and Serial settings -> XOFF flow control character. Additionally you can manually set the flow control state to force it to something on your end, but since the read is failing, this probably wont help you.

It supposed to be 'Hardware' instead of XON/XOFF. I tried in hyper terminal using Hardware as well as XON/XOFF option. It's working. In VISA com port init configuration i'm not finding the hardware option.so i'm trying XON/XOFF. Check the screenshot please!

Hello, I tried the Hyper Terminal code that you wrote but I was not able to communicate with my device. I have a Omron E5CN Temperature controller that I want to use with Labview. I am able to communicate with this controller using Omron's Thermomini software.

MAX is able to validate the and open a session with the device. The controller is connected via a RS232 to USB converter. Any advice on how to use this controller with Labview? The controller isn't RS232.

It is RS485 (according to the docs). Therefore hyperteminal or equivalent will not work. Looks like it has two modes of operation. Modbus is an industry standard and, if you have the NI DCS module, you can set it up with the OPC server. Alternatively you can use the VIs I linked. Edited August 28, 2012 by ShaunR.

The controller isn't RS232. It is RS485 (according to the docs).

Therefore hyperteminal or equivalent will not work. Looks like it has two modes of operation.

Modbus is an industry standard and, if you have the NI DCS module, you can set it up with the OPC server. Alternatively you can use the VIs I linked. Unfortunately I do not have the DCS/OPC. I downloaded the Modbus drivers from the NI site but I was still not able to communicate with the controller. You mentioned something about linked VI's.

Yes I did set it to modbus, maybe I dont know how to use the modbus drivers, I havent attempted to use such a device with Labview so I am lost with all this machine codes! MAX is able to validate and open a VISA session but this is as far as I can get with it. The basics are that your PC will be a 'master' on the bus (RS485 is multi-drop, meaning you can have multiple units on the same wires).

You read/write to an address on the bus (the unit) and registers (memory locations) within the unit that correspond to configuration, inputs and outputs (outputs are sometimes called coils). Generally, the registers are device dependent so you will need the programming manual to identify them. It would be a good idea to start another thread so that we don't hijack this one.