07-20-2009 07:43 AM
Hello,
first of all, I need to say that I'm new to Labview and so I'd like to apologize in advance if my questions will be too stupid! I've a problem with my thesis project.
I've to develop a software acquiring data from a balance (METTLER TOLEDO BBA422) using the rs-232 serial port. I've to make the program wait for the operator's input (he has to press a key on the balance), and then the balance will transmit a string through the serial interface.
I've tried to use the VISA in order to read the data, but it seems impossible to read anything from the instrument; i've used configure, read and close serial VISA inside a while loop, but when I press the keys nothing seems to happen.
The configuration seems to be ok (baud 2400, 8 bits, 7 even, XONXOFF)
Do you have some suggestions?
thanks in advance
Solved! Go to Solution.
07-20-2009 09:04 AM
07-20-2009 09:49 AM
Yes, I'm sure about the cable and the functionality of the COM port, just I can't understand why I can't see any string at all from the balance.
07-20-2009 10:44 AM
If you can actually read some data with Hyperterminal, then there is no reason that LabVIEW cannot do the same. Why don't you post the code you've written?
07-20-2009 03:59 PM - edited 07-20-2009 04:02 PM
Dennis, first of all, thank you very much for your helpfulness (i'll write a lot on this forum during these weeks.. hoping to help someone a the end :))
Just to be clear, in Hyper terminal which steps do I have to do? I opened it and connected to the COM1 port, after having set the balance to "countinuous output" mode. Actually, I see nothing.
I post a copy of the code I used today in order to try to communicate with the instrument:
07-20-2009 05:05 PM
I'm confused. You said you were sure about the cable and functionality of the com port. What did you base that statement on? If you are running a utility program from the vendor and getting data, then perhaps you don't have the com port configured exactly correctly or there is some other step that you need to do in order to have it output continuously. If the com settings are incorrect, the balance isn't even seeing the output continously command.
Once you get data in Hyperterminal, we'll worry about the LabVIEW code. It's not at all very effective.
07-21-2009 02:34 AM
I was told by my colleague that he already used the COM ports and everything was going right. Which steps should I make in order to check the instrument output with hyperterminal? I created a connection with the port and waited for the instrument output (i tried also to send manually) but I saw nothing. Anyway, maybe I did something wrong in the procedure.
07-21-2009 07:24 AM
You were right, the problem was with the serial cable!
What were the mistakes in my VI?
07-21-2009 07:28 AM
07-23-2009 09:06 AM
Ok, I have understood what I need to do. My VI works.
Now I have one more problem: I've also to connect a "bar code reader" using the keyboard port. I created an interface which reacts perfectly to keyboard input (key press) and reads everything. My problem is that when I connect the reader, it happens sometimes I dont' see anything from the program and, also, I can read only one character. I used the input device controls.
Any ideas?