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
Solved! Go to Solution.
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.
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.
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.
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)
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?
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...
The problem was solved by switching another ethernet cable and changing timeout parameters on drive.