LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

modbus slave - Read Coils after register addres 16.

I am using LV9 and modbus library from NI.

 

About this problem i have read some post but it is about master only.

 

My exact setup is as follows:

 

 I have a third party modbus master software and want to poll 200 coils of data from labview modbus slave.

 

I am getting values upto register address - 16, but after that the values are'nt changing.

 

please suggest.

 

Regards,

 

Shrek

 

 

 

 

 

0 Kudos
Message 1 of 5
(2,692 Views)

I know that GPIB only allows for 16 addresses.  Could this be a similar issue?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 5
(2,682 Views)

I think that is a limitation within the modbus library.

 

Just do multiple coil reads in groups of 16 coils.

Message 3 of 5
(2,676 Views)

@RavensFan wrote:

I think that is a limitation within the modbus library.

 

Just do multiple coil reads in groups of 16 coils.


Very cool - always learning stuff.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 5
(2,672 Views)

Digging into the modbus library, I think the limitation is coming from the U16 datatype that the array of register data uses, so the conversion to a boolean array leaves you with only 16 elements.

 

I've never needed to work with modbus coils before, so I've never needed to worry about it.  If the modbus specification allows for groups of coils bigger than 16, then I imagine it is possible to fix the modbus library to handle it.

 

I'd recommend visiting Rewrite MODBUS Library  and throwing some kudoes that way.

Message 5 of 5
(2,662 Views)