My name is Nicolas, I've set up 3 years ago a home network based on modbus, it works pretty well with a PLC acting as Master and 4 others as slaves.
Of course it doesn't make very funny things, reason why i'm looking at a SCADA/HMI solution particulary to interact with internet.
I really find Mango sexy, stable, easy to configure and defnitively very flexible .
I've been using it for a week , everithing relative to data reading over modbus is working perfectly, but things seems more tricky when i try to write to my coils.
before writing this I've been trying some tests and capture and here is the results of theses ...
When configuring a data point as Register (16 Coils ) it works very well , for example I can read a value of 4 when my COil #3 is UP , yes , 2^3 = 8 :-)
I can also force a value to this data point and it works well to : writing 3 really lights ON Q1 and Q2 only !
But of course managing COILS in group of registers is not very easy, as far as I imagine I would be obliged to make AND operations on actual values to modify thems ...
SO I tried to set up data point as Binaries, again the reading of values are OK, this time my datapoint indicates "1" when the coil is "ON" and it seems pefect.
BUT when i try to force my COIL with a binary value, nothing happens and I have a warning from the data set.
I've capture some packets with IO logs enabled :
Mango request: O 04 16 0007 FFEF 0010 83d4
Slave response : I 04 96 51 9e5d
it shows that the request sent to write a binary value is in fact a function 16 of Modbus protocol, wich correspond to "Write Mask Register", but infortunatly my slave doesn't seems to accept this function: error code is set (16 + 80) and the exception code is "Frame Error, fucntion code error ..."
Despite the fonction 16 is the most indicated for this operation (It's clearly not a bug from Mango!), I'm quite sure there is not a lot of PLC that accept this function so I would like to share with other people that have to write binaries if they found a solution specific to this issue...
I've also try to configure the data point as a Coil, but then I get another error, this time on function 01, wich is very basic :
Mango request: O 04 01 0007 0001 4c5e
Slave response: I 04 81 54 51ae => "Data out of Range exception"
While writing this post, I'm trying to find a trick with more complicated sets of datas but I'm really not aware of HEX/BIN/ASCII manipulations and I guess I will become mad before the end .... it's a pity regarding the very good interest of Mango concerning home automation.
Any help or share would be very appreciated ... :shock:
PS: my PLC are from IMO , the master is an "i3" : http://imopc.com/content.php?p=spotlight_i3Microsite&lang=EN
and the lazy slaves are ISmart V2 : http://imopc.com/pages/spotlight_ismart