LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Labview RS485 comms

I am trying to read the display values from four identical panel meters using an RS485 port and USB-485 with labview.
When using Measurement explorer and "Communicate with Instrument" everything is fine (I have to change to 2-wire auto mode to test communication).
I select the required meter by writing a two digit address as part of the command. 
 
When I try to communicate from Labview in exactly the same way one of the four meters gives a timeout.
What causes an error in Labview when the USB-485 is obviously working?
This applies for all meter control codes I have tried.
A simple write/read vi for one meter is attached.
0 Kudos
Message 1 of 9
(3,691 Views)

I guess it is a different device that times out each time, otherwise the answer is trivial.

What happens if you change the "Wait until next..." in frame #1 with a "Wait (ms)" function?

I ask because the former is (in my book) really a random delay and not a fixed delay as is the case with the latter.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 9
(3,677 Views)

It is the same device that times out. What is confusing me is that it is an identical device to the others and it does not timeout when I test it in Measurement explorer. The other three identical devices don't timeout either so something is different in Labview and/or the device. I am investigating the device as well but I need to understand the difference between Labview Read VISA and Measurement Explorer communication test.

John

0 Kudos
Message 3 of 9
(3,673 Views)

M&A does not look for a specific byte count.

Could it be that the bad device is sending less bytes?

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 9
(3,666 Views)
I have checked the byte count that M&A receives and it is the same for all devices (8).
I have tried varying the Byte count that Labview reads with no effect.
John
0 Kudos
Message 5 of 9
(3,648 Views)

The failure matrix is confusing me!

1) All units work with M & A (T/F) ?

2) Three of four units ALWAYS work with LV (T/F) ?

3) One and ONLY one unit ALWAYS fails with LV (T/F) ?

If the answer to all of the above is true, then there is something wrong with the ONE failing unit. Carefully examine all of its settings but concider tossing it.

Old Joke:

Q: How does a field service engineer fix a flat a tire?

A: He keep s swapping them until he finds the one that was flat!

That unit sounds sorta flat to me.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 9
(3,632 Views)

Your assessment is correct ie all answers are true but why does it work in M&A not LV?

I have had some feedback from the meter supplier that a previous customer had RS232 problems and found that Labview was sending a "break" signal which was killing the comms. A new serial driver for Labview solved the problem.

Does this sound possible?

John

0 Kudos
Message 7 of 9
(3,623 Views)
"

Does this sound possible?

"

Yes, if all of the device failed.

Have you attempted to re-address the failing unit to use one of the addresses of the uints that are working? This could indicate a termination character related issue.

The matrix still says there is something strange about that unit.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 9
(3,617 Views)

"but why does it work in M&A not LV?"

All of the differences between M&A and LV can be controlled using the configure serial port.

There is something weird about that one unit.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 9 of 9
(3,611 Views)