Showing results for 
Search instead for 
Did you mean: 

Simultaneous modbus and DAQmx

Go to solution



I have configured a Schneider VFD to run through Modbus TCP on LabVIEW. The problem is that when the code is added with a DAQmx from a cRIO controller, the modbus does not write and read registers anymore. This will eventually be applied into a PID loop. Any ideas on why modbus does not work simultaneously with DAQmx?


Edit: The VFD is not working with the cRIO


Thank you!

0 Kudos
Message 1 of 10

Are you getting any error messages on your error wires?


You don't have any indicators on them, and since you have them wired into shift registers, one random error on either of the two data flow paths (modbus, daqmx) will cause all future operations of the subVIs on that error wire to stop executing.  Normal behavior for an Error In is for the subVI to skip over the code inside of it.

0 Kudos
Message 2 of 10

Yes I do see a modbus function 2 error, however, the code will function normally without the cRIO. I have verified that the IP Addresses are correct.

0 Kudos
Message 3 of 10

Modbus error 2 is an invalid address.


"The data address received in the query is not an allowable address for the slave. More specifically, the combination of reference number and transfer length is invalid. For a controller with 100 registers, a request with offset 96 and length 4 would succeed, a request with offset 96 and length 5 will generate exception 02."


So you need to figure out what is wrong about your message.  Start small with a single address, then expand from there.


If you get an error, that along with the shift registers and no handling of that error means it gets passed to future iterations which will skip execution due to the incoming error.

0 Kudos
Message 4 of 10

Hi RavensFan,


I appreciate your help! I have attached a jpg of the same identical VI however one incorporating cRIO and one without it. You would see that the VI not deploying a cRIO displays no addressing errors. Is there a possible idea for this? (usingcRIO = deploying cRIO)




0 Kudos
Message 5 of 10

When you say "one incorporating a cRIO and one without it", do you mean this code is running on a cRIO in one case and not in the other?  Or that this code is trying to talk to a cRIO?

0 Kudos
Message 6 of 10

Yes, One code/VI is running on a cRIO and the other one is not.


Could there be a communication error?

0 Kudos
Message 7 of 10

Of course there could be an error.


Are both of these running at the same time?

0 Kudos
Message 8 of 10

No they are not running at the same time. However, I have used modbus tcp for a energy meter with the cRIO that I am currently using and know that it works. But I still do not understand why my VFD is only able to communicate with my cRIO...

0 Kudos
Message 9 of 10
Accepted by topic author kepham

The problem was solved by switching another ethernet cable and changing timeout parameters on drive.

0 Kudos
Message 10 of 10