If I try with an iteration writing single coil like this:
Dim BB as Boolean() = {True, False, False, True, False, False, False, True}
For i as Integer = 0 to (BB.Length - 1)
myMURR.WriteSingleCoil( i, BB(i) )
Next
... I don't have any exception and it Works like a charm.
So, writing multiple coils is much easy for my project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I'm working on EasyModBus to use a MURR ModBus, model CUBE20S.
It works fine, except for use the command WriteMultipleCoils.
I have a stack of 2 Output Modules, each of 8 signals (8 bit).
I got an array of Signals in Boolean, and I send to it with WriteMultipleCoils, starting from Bit 0.
In this way, I got the error:
If I try with an iteration writing single coil like this:
... I don't have any exception and it Works like a charm.
So, writing multiple coils is much easy for my project.
Hi,
this exception is thrown, if the Server (You Murr Cube Device) answers with an exception code.
Of course it is much better to write multiple Coils instead of 8 request for single coils.
I just tried it, and the Request to the Server is correct.
Stefan
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I see, but the previous version, May 2015, works better on write multiple coils, mith the same device.
Could be the "unitIdentifier". Try to set the properyt "UnitIdentifier" to "0".