LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication problems

I have some problems with reading data from a Sylvac D80 displacementmeter.
I'm using LV3.1
and communicate through a RS-232 port.

I write a string to the Sylvac with the 'Serial Port Write.vi' after which
the Sylvac puts the display reading in the buffer. Then I read this number
with the 'Serial Port Read.vi' into LV. Speed is no problem because I do one
reading per minute.

The problem is that everything works well, but after a several readings (the
amount varies between 1500 to 4000) the communication with the Sylvac
scrams. After the write command the programs stay waiting to read the data
from the Sylvac, but because its receives no data it stays waiting. I tries
some wait statements between to write and read command but
that didn't help.
I can prevent the program to scram by using the 'Serial Read with
Timeout.vi', but then the program continues and all my furher reading are
zero.

Has anyone experience with this problem or some good suggestions.

Thanx,


Co Boshoven
0 Kudos
Message 1 of 3
(3,716 Views)

I have had similar problems in the past.

 

The reason that the remaining data contain all 0's is either because of a problem with the device buffer or a problem with LV/computer.  My work-around was to manually create a time-out sequence that, when triggered, reset the whole program from the beginning with simply an offset in the output (so it wouldn't overwrite the data it took).  Barring that, the problem is on the equipment side and there isn't that much you can do about it.

0 Kudos
Message 2 of 3
(2,983 Views)
Before posting in the future, you might want to check the date on the message to which you're replying... in this case, you replied to a message that was over a decade old.
0 Kudos
Message 3 of 3
(2,976 Views)