LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Weight gauge serial port test

Hello everyone. I have connected my weight gauge with RS232 to my computer. I will like to know about my gauge works or not. How can i test it ?

Best regards

Oesen
0 Kudos
Message 1 of 17
(3,212 Views)

Hi Oesen,

 

From what I understand you have connected a gauge to your computer via serial port but don't know whether it works correctly. 

 

There are a number of examples in LabVIEW's example finder, which you can locate by clicking Help >> Find Examples in the LabVIEW window . I would recommend searching for the example code named "Basic Serial Write and Read.vi" which you can use to test the serial port. 

 

Please be aware that you will need to find a number of parameters such as baud rate and data bits which you can find on your device's data sheet. 

 

If you have any further queries please don't hesitate to ask.

 

Thank you,

Eden S
Applications Engineer
National Instruments UK & Ireland
Message 2 of 17
(3,202 Views)

Try the example finder under LabVIEW help. 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 3 of 17
(3,201 Views)

Thanks for the answer. Can i test it in VISA TEST PANEL?. I know the values of my baud rate, parity and handshake. How can i test it in VISA TEST PANEL then ?

Best regards

Oesen
0 Kudos
Message 4 of 17
(3,187 Views)

*edit: fixed broken link*

 

Hi Oesen,

 

If you wish to test your serial connection using the VISA test panel in MAX there is a white-paper on serial loopback testing here. Please note, however, that this performs almost the exact same function as using the test VI.

 

I hope this has helped,

Eden S
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 5 of 17
(3,183 Views)

Testing in MAX or LabVIEW is the same thing as testing with Hyperterminal, Procomm, Putty, or any other serial communication program. You configure the com settings, make sure you have the correct type of serial cable (there are two types) and read the manual to see how to read/write to the device. Each serial device is unique so it is impossible to give exact details - especially since you have not provided the make and model of the device. Pretty vital information that you have overlooked.

0 Kudos
Message 6 of 17
(3,169 Views)

Guessing it is related to this thread:

 

http://forums.ni.com/t5/LabVIEW/RJ45-connecting-with-BNC/m-p/2122262#M688877

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 17
(3,157 Views)

Here is the manual of my weight gauge:

 

http://www.precisa.com/download/en_320XB_Handbook.pdf

 

I have configured the Baudrate to 9600, Databits to 7, Stopbits to 1 and Parity to Even in both my weight and the VISA test panel. That's only the testing function, which makes me confuse. How can i test my gauge, with write/read function ?

 

Thanks in advance

 

Oesen

Best regards

Oesen
0 Kudos
Message 8 of 17
(3,132 Views)

Hi Oesen.

 

After you have configured your connection, you can use the Input/Output tab to send and receive commands:

VISAtestpanelIO.png

 

On page 55 in the manual, you can see which commands your weight supports.

 

If you have an older version of NI-VISA the test panel might look different. This KnowledgeBase shows a screenshot of an older version:

http://digital.ni.com/public.nsf/allkb/19B075803E013125862575CF006B37F8?OpenDocument

 

Did you look at the white-paper that Eden S linked to? It's a step-by-step guide that shows how to test the connection in MAX:

http://www.ni.com/white-paper/3450/en#toc4

This paper also descripes how to test the connection using Windows HyperTerminal and NI LabVIEW.

 

I hope you can use this information.

 

Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
0 Kudos
Message 9 of 17
(3,120 Views)

@Oesen wrote:

Here is the manual of my weight gauge:

 

http://www.precisa.com/download/en_320XB_Handbook.pdf

 

I have configured the Baudrate to 9600, Databits to 7, Stopbits to 1 and Parity to Even in both my weight and the VISA test panel. That's only the testing function, which makes me confuse. How can i test my gauge, with write/read function ?

 

Thanks in advance

 

Oesen


Everything you need is in chapter 8. There is even some basic examples in table 8.5. This is a pretty simple device.

 

The recomended loop back tests are generally a waste of time. It only validates that the pc's serial port is working. A dead serial port is pretty rare. It does not tell you a thing about the validity of your com settings, the cable you are using, or the commands.

 

0 Kudos
Message 10 of 17
(3,101 Views)