08-16-2012 06:44 AM
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 ?
08-16-2012 07:24 AM
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,
08-16-2012 07:24 AM
Try the example finder under LabVIEW help.
08-16-2012 08:01 AM
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 ?
08-16-2012 08:14 AM - edited 08-16-2012 08:18 AM
*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,
08-16-2012 10:28 AM
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.
08-16-2012 11:45 AM
Guessing it is related to this thread:
http://forums.ni.com/t5/LabVIEW/RJ45-connecting-with-BNC/m-p/2122262#M688877
-AK2DM
08-17-2012 02:16 AM
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
08-17-2012 03:05 AM - edited 08-17-2012 03:11 AM
Hi Oesen.
After you have configured your connection, you can use the Input/Output tab to send and receive commands:
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.
08-17-2012 09:38 AM
@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.