05-14-2014 03:58 AM
Hi all,
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.
05-14-2014 02:19 PM
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/
05-14-2014 08:19 PM
Hi Dave,
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.
05-14-2014 08:20 PM
05-14-2014 08:34 PM
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.
05-14-2014 09:12 PM