05-04-2011 04:02 PM - edited 05-04-2011 04:09 PM
A simple question, but can't seem to find an answer:
I have a project library with a serial MODBUS i/o server setup. In this library I have several shared variables that are bound to registers on the remote device through the MODBUS protocol, and this works fine if each variable is bound to read a single register (e.g. Modbus1\D400001). What is the appropriate syntax to bind a single shared variable to multiple consectutive registers? If I set the Shared Variable type to "Array of UInt32" can I specify something along the lines of Modbus1\D400001-D400100 ? So far this doesn't seem to be working, or at least hasn't displayed anything when creating an array indicator and binding this shared variable to the indicator. Thanks,
--David
Sorry, forgot to mention this is LabView 9.0.1 with the DSC module.
Solved! Go to Solution.
05-06-2011 11:04 AM
Hi Underscore_c,
Take a look at this help document:
http://zone.ni.com/reference/en-XX/help/371618E-01/lvmve/dsc_modbus_using/
This document should also be in your LabVIEW help. You'll notice that you can call an array of registers by preceding the address by "A".
For example,
A400008L8 is an array of values of length 8.
There is an example called "Modbus Datatype Extension" that should get you started in the right direction.
Dave T.
05-06-2011 11:07 AM
Ah, I knew I was missing something simple. Thanks!
09-19-2012 05:35 AM
"For example,
A400008L8 is an array of values of length 8.
There is an example called "Modbus Datatype Extension" that should get you started in the right direction. "
I'm using LV2011, but i can't find where to set the length of the arry. I need to use the array of booleans. By default the number of coil is 1976. But i only see "1". And when i'm writing an array of 10 booleans to the addrress, i got an error.
Can you kindly point me to he right direction.
Thanks in advanced!
09-20-2012 12:25 PM
Can you post a screen shot of where you are creating variables bound to the coils? It sounds like you are selecting a single coil instead of a group (array) of coils.
I/O items in the range shown below are valid for 1-D arrays of booleans
Are you binding a variable to coils in this range?
-Nick-
09-20-2012 09:14 PM
Sorry, i forgot to update the post. I found the way to access array of coil. By acessing the address of the bound network variable from A000001L1 to A000001L10.
Cheers!
Thanks for the help!