LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Sylvac digital dial gauge help needed

I was wondering if anyone has had any luck in writing a VI for these type of
dial gauges. It should be just a simple RS232 reading exercise but for the
life of me I do not know what string to write to the device in order to
receive a reading. I can only read bytes at the serial port by continually
pressing a button on the dial gauge which sends the reading. Any help
appreciated.

Regards

Richard
0 Kudos
Message 1 of 11
(6,499 Views)
Richard,

I did a search at www.google.com for +Sylvac +LabVIEW and the first site that came up should be what you are looking for. Somebody wrote a LabVIEW VI that communicates with this RS232 device.

I often find that many 3rd parties have LabVIEW resources available on their websites, and these can often be found through a web search.

I hope this suggestion helps you out. Good luck with your application, and have a pleasant day.

Sincerely,
Darren Nattinger
Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(6,499 Views)
Thanks Darren. I did the same search but at the time of posting my first
message I was unable to ftp to the server that contains the files. I have
been in contact with the person resposible for writing the vi so hopefully
he can email it to me.

Thanks again.

Richard
"Darren" wrote in message
news:5065000000050000001C2B0000-986697009000@quiq.com...
> Richard,
>
> I did a search at www.google.com for +Sylvac +LabVIEW and the first
> site that came up should be what you are looking for. Somebody wrote
> a LabVIEW VI that communicates with this RS232 device.
>
> I often find that many 3rd parties have LabVIEW resources available on
> their websites, and these can often be found through a web search.
>
> I hope this suggestion helps you ou
t. Good luck with your
> application, and have a pleasant day.
>
> Sincerely,
> Darren Nattinger
> Applications Engineer
> National Instruments
0 Kudos
Message 3 of 11
(6,499 Views)

Hello,

I encountered a problem when using this VI. After many hours of running the VI, the value on the device changes. This happens once every 20-40 hours or so. I used this VI to read three different digital indicators and the problem occurs sporadically on one of them. Does anyone have any idea of where this problem is coming from. Did somebody else encountered this problem?

 Thank you, Ron

 

indicator error.JPG 

VI for reading the digital indicator

0 Kudos
Message 4 of 11
(5,958 Views)

What are you physically trying to measure with these indicators?  What do you mean by the value on the device changes?  Is it a value that you are expecting remain constant?  Give some examples of readings that you get that are good, and what they look like when they change.

0 Kudos
Message 5 of 11
(5,938 Views)

The value on the device decreases instantaneously by about 1mm (from a range of 12mm). I am very confident it is not a physical change since it also occurs when noting is placed under the indicator.

0 Kudos
Message 6 of 11
(5,931 Views)

Your problem might be caused by the very simple reading code without any sync to the device and no type of error checking.

Now you are sending a "?\r\n" wait 1000ms and read the characters received in that second. But what will happen if the device sometimes need 1001ms (ore more) to send a value? 

One or more characters will be left in the buffer and will be read in the next loop.

 

Simple: flush the read buffer before sending the read command.

More sophisticated code will use timeouts and check the response (easy if you have start and stop patterns in your answer, or a constant number of characters)

 

 

 

Message Edited by Henrik Volkers on 02-18-2010 11:07 AM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 11
(5,923 Views)

I tried what you suggested (my implementation is shown in the picture inseted) and the error persisted. Any suggestion for changes that might help? The problem occurs in all three devices.

 

indicator error 2.JPG

0 Kudos
Message 8 of 11
(5,898 Views)

Are you sure you aren't getting physical changes?  1 mm isn't that much.  What is the resolution of the readings coming from the gage?  Vibration could easily cause some joints in your indicator holding mechanism to start sagging.  Perhaps it is a mechanical issue inside the gage itself.

 

I really doubt anything about LabVIEW could cause it to receive what is otherwise a perfectly valid reading through the serial port (you have parity set), but also be wrong.  If there was an issue with losing bytes in the buffer, or some sort of electrical noise corrupting the bits and causing it to fail the parity check, you'd see some data that would look a lot more wrong than a 1mm error.

0 Kudos
Message 9 of 11
(5,894 Views)

Can you give an example of the bad values compared to good ones?  Could it be a simple case of missing a character in the return string? 

 

You should use a termination character to determine when the read is complete and set the timeout of the read to 1000 ms.  This will at least give you an error message or a warning if the communication is not complete.

 

Shane.

0 Kudos
Message 10 of 11
(5,879 Views)