LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue reading Opto22 value via Modbus

Solved!
Go to solution

   This might not be a strictly LabVIEW question, but I think this forum could be a good resource for ideas on this.

    We are putting new LabVIEW software onto a system that uses Opto22 for Daq. It talks by Modbus over Ethernet. The old software (executable built in LV) mostly works. It has numerous PID loops using TC's read by Opto to run PWM on digital outs. Seems to control just fine.

    However, when we read one of those TC's in our LabVIEW software, it is quite noisy. There are jumps of a degree or two, every few seconds. We don't see that in the old software data, though not having source code, we can't tell if they are averaging or not.

    As another check, we've tried several Modbus sniffer utilities. We don't see the noise on that channel there either, even when our LV program is running in parallel.

    Inside LV, all we do to read the Modbus value is give it an address. (We're using the latest Modbus Driver that comes with DSC.) We don't specify any resolution or scaling. That seems to be done on the Opto "brain". Likewise, with the Modbus sniffer programs, we just scan channels. How can our reading be noisier than with the sniffer programs?

 

Thanks,

    DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 1 of 2
(2,423 Views)
Solution
Accepted by topic author Dave_Thomson

Never mind. I found it. It turns out that Opto22 uses a different endian standard for reals than all the other Modbus devices I have used in the past. Swapping words, along with another minor addressing problem meant that we got the upper part of the real correct, and hence "close" to correct values, with the lower part from an unrelated channel.

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
Message 2 of 2
(2,361 Views)