LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI modbus toolkit is unreliable?

Solved!
Go to solution

I am controlling a Watlow F4 in LabVIEW using the modbus add-on toolkit.  When I started writing this application, I used some modbus vis that I found in the devzone, but wasn't too keen on using somebody else's unknown code.  I thought that using NI's kit would make things more robust.  Instead, I am now encountering timeouts and bad data reads.

 

I am running a diagnostic right now, reading a series of about 40 registers and comparing the resulting array to an array of known good data.  The NI toolkit fails to duplicate the good data within 5 runs.  The vis I got from the board have run for, let me check... 96 iterations so far without error.  What's the deal?  Anybody else have complaints about the modbus toolkit?

 

Has anybody used the Automated Solutions .NET tools (http://www.automatedsolutions.com/products/dotnet/ascomm/mb.master.serial.asp)?  Or any other 3rd-party tools?

 

Thanks

 

Ed K.

 

0 Kudos
Message 1 of 3
(2,804 Views)
Solution
Accepted by topic author yafoteer

If your talking about

https://forums.ni.com/t5/Reference-Design-Content/LabVIEW-Modbus-API/ta-p/3524019

It's not officially supported, and there are a few bugs with it (just check the comments). The big one is that MB CRC-16.v returns a u8 instead of u16. Fixing that is easy and will likely fix your problem. You can try the other bug fixes if them seem like they're relevant. The official way to use modbus is through the dsc module.

https://www.ni.com/en-us/shop/product/labview-datalogging-and-supervisory-control-module.html

I'm using the first library, so I haven't tried anything else.

Message 2 of 3
(2,797 Views)

Yes indeedy.  And I need to be much more careful about trusting anything that has "NI" in its name.  Thanks for the reply.

0 Kudos
Message 3 of 3
(2,781 Views)