I'm wondering if it's possible to use the Modbus I/O Server without explicitly creating bound variables?
I also tried replacing "My Computer" with "localhost" above. No luck.
Is there anything I've missed? I'm asking because CPU usage is very high, and I thought I might be able to reduce that a bit by removing the 300 bound variables in the system.
Solved! Go to Solution.
You can use the modbus library to be a modbus master or slave. This does not use bound variable. You can add a comunication loop to your code. This gives you more control of the update rate and timeouts. You can down load the library http://www.ni.com/example/29756/en/
Thanks for the recommendation. However, I'm hoping for an I/O Server based solution. At the moment, I don't actually know if I'll even benefit from getting rid of bound variables yet, so I don't want to rewrite my code yet.
If the bound variables are indeed the culprit for my high CPU usage, and if bound variables are the only way to use I/O Server, then I'll look at the low-level Modbus VIs.
You can use DataSocket with a path like psp:\\localhost\Slave\ModbusSlave1.400001 for read and write access.
Check out the example VI "Monitor OPC Items with DataSocket.vi" in the LabVIEW examples.