• N
    nikorun

    Hi,

    I'm facing a problem. My slave doesn't support function 0x16 so I would prefer mango to use function 0x06 instead.
    i've notice that Mango uses it when writing a integer value to a register but uses 0x16 to write a "BIT" value (The Data point is declared as a holding Register, but a simple bit si addressed)?

    Does anybody knows why ?

    isn't it possible to force use of function 0x06 to when writing to only one register ?

    Thanks, i'm not good in java and i cannot imagine put my hand in the code ... :-(

    nico

    Examples :

    below I try to write value 1 to bit 1 of holding register 7 into slave 3

    2014/04/07-18:50:42,920 O 03160007fffd0002e23a
    2014/04/07-18:50:42,965 I 0396512f9c

    My slave responds with an error because it doesn't handle function 16

    Below when i try to write integer value 2 to same register 7 (my locator is then declared as a 2 byte integer value)

    2014/04/07-19:06:49,813 O 030600070002b828
    2014/04/07-19:06:49,848 I 030600070002b828

    ... Then it works

    posted in Modbus4J general discussion read more
  • N
    nikorun

    Hi everybody,

    I have a very simple question : "how can I use prologue and epilogue" ?
    As far as I look in the online doc, I canno't figure out where I can write the " insert into systemSettings (settingName, settingValue) values ('httpdsPrologue', 'my prologue content')" sentence ...

    My real Goal is to use a response from Mango to send POINT STATUS back to the requester (Netio), so that I could see in which rel state my points are ...
    So even if I deal wth prologue, I will only have a confirmation that my request as been correctly sent and processed, but not that my pont has changed status (It could be blocked by another process)

    If you know another way to do this (with HTTP) ..let me know.

    Bye and Thanks

    posted in User help read more
  • N
    nikorun

    Hello,

    I'm a lttle bit lost with the different type of Mango software that exists.
    I've started with Mango, one year ago, by downloading it on this page : http://forum.infiniteautomation.com/download.jsp
    It works well (despite some problems on Modbus but not blocking) but I guess that the modular version is adding intersting improvements so I decided to test it too. I downoloded it here : http://store.infiniteautomation.com/core

    As i intend to use it at home, with less than 3 adresses, I think i'm abble to use it without licensing, but I have a doubt concerning the modules : even if they have "a price" in theyr description, can I use them in my personal project ? Will they work forever ?

    Thanks for your clarifications, and once again "bravo" for this amazing project !!

    Nicolas

    posted in Mango Automation general Discussion read more
  • N
    nikorun

    Hello,

    I have recently bought a raspberry to add some more finctionalities (and more power than with arduino !) to my home.

    The goal is to add video support in order to be abble to view what's happening when I'm away ... actualy I should say : "To experiment some funny things !" as viewing my home when I'm at work is not particulary usefyull, AMHA ...

    I have resumed the way to install a camera on PI, wich is not the goal of this post, and how to capture the temperature of a DS18B20 chip connected to the Pi by using Mango.

    I you want to see it, it's here : http://electrorun.blogspot.com/2013/06/monitor-raspberry-pi-with-mango.html

    bye.

    posted in Stories read more
  • N
    nikorun

    Hello,

    I'm using Holding Registers Points to drive registers in a slave PLC.

    I would like to force these registers but I realise that I can only force to "0" (zéro) but not to "1" ... Is there anybody that faced this situation before ?
    When I use Coil Status Points, it works well ...

    I could use Coil Status points to do this but I'm afraid of how Mango will handle requests, I've about 50 points in the field and would be sure that mango will not trigger them individualy , I mean sending 50 "Read Coil" requests instead of sending few "Read Holding Regiters" requests.

    I've posted another question relative to Logging modbus requests, an answer of this previous question would of course answer to this point ... :shock:

    Thanks,

    Nicolas

    posted in Modbus4J general discussion read more
  • N
    nikorun

    Hello,

    In a previous version, I remember the it was possible to make Modbus logs all the requests/answers by a configuration item in the DataSource definition ?
    I can't find it again with this version, is anybody knows how to activate it ?

    It was very usefull in some circonstances ..

    Thanks,

    Nicolas

    posted in Modbus4J general discussion read more
  • N
    nikorun

    Hi,

    Having recently bought an old house, I Had to entirely rebuild the electrical circuitry. So I decided to include some automation. As the goal was to manage every Lamp and every switch in the house, the most important think was to build something stable, So I decided to use Industrial PLC based on hte Brand IMO (http://www.imopc.com), mainly for a reason of global cost.

    It's based on 5 IMO ISMART (http://www.imopc.com/pages/spotlight_ismart) PLC's wich collect the switchs and pilots the lamp with they internal relays. Each ISMART manage a group of 16I/O and the 5 ISMART are linked by a MODBUS and drived by a Master (IMO i3 : http://www.imopc.com/pages/spotlight_i3Microsite) that handle any intelligent action. In case of any problem with Modbus or with the master , any slave is still autonomous to drive the SWITCH ON / SWITCH OFF actions .
    Be sure that this point is *very *important to keep the ambience cool enough en in the house ... 8)

    To add some more functionalities, I've add a 6th slave to this bus by using an Arduino, it was a bit tricky with hte modbus library but finaly works pretty well, as lon as you keep the speed of the bus low enough, arduino is not a Ferrari I guess....

    This systems works well for 3 years now but I've decided to improve it by adding Internet connectivity, this is where Mango takes place !
    For that, I use a second Modbus in my i3, so that Mango polls the i3 and can then read/write to it's registers and therefore acts on all the ISMART of the house. I can also push some weather datas to Pachube.

    I had many problems to do that, mainly because of the instability of the Modbus beetween the i3 and the Mango (installed on a ALIX board by the way).
    It works now but is a little bit instable for a reason I ignore (CRC problems / Excepetions errors ...).

    So that's it. I would be glad to share this with other people that did similar experiences (Sure this Forum is plenty of !) and if possible avoid the traps i ran into.

    But first of all I would like to thanks all the persons that works on the Mango project, It's very human affordable and powerfull enough to add some nice functionalities to a home automation project !!

    Nicolas

    (mango [at] airtune [dot] info )

    Bye

    posted in Stories read more
  • N
    nikorun

    Hello all,

    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:

    NICO

    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

    posted in User help read more
  • N
    nikorun

    Hello v8dave,

    oour needs are exactly opposites : I want to write a single register (function 0x06) and my Mango instance only write multiple registers (0x16) and you want to writemultiple registers and your mango only writes one by one !!!

    :-)

    happy that ou found the solution but by the way how did you manage to write a single register ???

    posted in Modbus4J general discussion read more