• R

    Hi all,
    Well, at least I have won the dummy of the week award this week :-)
    The DINTs have swapped words, so when you read from the correct address and swap the words, all is good.
    I "fixed" the publisher by creating a second publisher on same port number, and modbus address 2.
    I did have SINT and DINT data combined in the one publisher, and the PLC was making 2 read requests.
    The DINT values are now increasing as expected.

    Thanks all

    posted in Mango Automation general Discussion read more
  • R

    Another problem discovered. I am reading 3 x 32 bit values from an inverter via modbus, and publish them for the PLC to read. The values in mango seems correct, but are not being updated to the publisher. The PLC read is showing success, and the value in the register is being overwritten, but is is not the same as the value in Mango.


    M_Exported_Energy has a value of 444315 in Mango, but the PLC shows 4390912. This value has not changed all day, so "Export Today" shows as zero.

    I checked logIO in the publisher, files are created, but no data is logged

    -rw-r--r-- 1 root root 0 Apr 7 17:09 processLog.ModbusIpPublisherRT-1.log
    -rw-r--r-- 1 root root 0 Apr 7 17:09 processLog.ModbusProcessImageSendThread-1.log

    How do I debug the publisher?

    posted in Mango Automation general Discussion read more
  • R

    I have a problem reading 32 bit unsigned ints from a PLC. The smaller values are correct, but larger values are not.
    I have done the point locater read using all the available 4 byte int types, with no luck. The data is good when read with modpoll, and agrees with the PLC data.

    The larger values are Watt hour values from power meters, and the PLC stores the midnight values, to show the current days usage.

    $ modpoll -m tcp -a 1 -r 16401 -c 18 -t 4:int -1
    modpoll 3.4 - FieldTalk(tm) Modbus(R) Master Simulator
    Copyright (c) 2002-2013 proconX Pty Ltd
    Visit http://www.modbusdriver.com for Modbus libraries and tools.
    Protocol configuration: MODBUS/TCP
    Slave configuration...: address = 1, start reference = 16401, count = 18
    Communication.........:, port 502, t/o 1.00 s, poll rate 1000 ms
    Data type.............: 32-bit integer, output (holding) register table
    -- Polling slave...
    [16401]: 712312
    [16403]: 0
    [16405]: 7787370
    [16407]: 4738731
    [16409]: 7431320
    [16411]: 1011237
    [16413]: 710242
    [16415]: 4390912
    [16417]: 4552479
    [16419]: 7269753
    [16421]: 11488
    [16423]: 6472
    [16425]: 12772
    [16427]: 6717
    [16429]: 2070
    [16431]: 0
    [16433]: 8466
    [16435]: 4306

    The above modpoll values are correct.
    The point locator test returns the following values -

    0_1554615288841_Screenshot from 2019-04-07 15-32-18.png

    Note, one of the zero values is correct, and the other is 655360

    In space separated text,

    Click PLC Modpoll Read Point Locator
    Register Type MB Address Name Value Value Address Value Address
    DD9 INT2 416401 Pool_Energy 712314 712314 [16401] 1029992 16399
    DD10 INT2 416403 Spare 0 0 [16403] 655360 16401
    DD11 INT2 416405 CP3_Import_Energy_MidN 7787370 7787370 [16405] 54122 16403
    DD12 INT2 416407 CP3_Export_Energy_MidN 4738731 4738731 [16407] 7753387 16405
    DD13 INT2 416409 H1_Energy_MidN 7431320 7431320 [16409] 4744344 16407
    DD14 INT2 416411 H2_Energy_MidN 1011237 1011237 [16411] 7433765 16409
    DD15 INT2 416413 Pool_Energy_MidN 710242 710242 [16413] 1037922 16411
    DD16 INT2 416415 SE5K_M_Export_Energy_Mid 4390912 4390912 [16415] 655360 16413
    DD17 INT2 416417 SE5K_M_Import_Energy_Mid 4552479 4552479 [16417] 4421407 16415
    DD18 INT2 416419 SE5K_I_Energy_MidN 7269753 7269753 [16419] 4582777 16417
    DD19 INT2 416421 CP3_Import_Today 11487 11487 [16421] 7220448 16419
    DD20 INT2 416423 CP3_Export_Today 5942 5942 [16423] 5942 16421
    DD21 INT2 416425 H1_Energy_Today 11989 11989 [16425] 11989 16423
    DD22 INT2 416427 H2_Energy_Today 6650 6650 [16427] 6650 16425
    DD23 INT2 416429 Pool_Energy_Today 2070 2070 [16429] 2070 16427
    DD24 INT2 416431 SE5K_M_Exp_Energy_Today 0 0 [16431] 0 16429
    DD25 INT2 416433 SE5K_M_Imp_Energy_Today 7242 7242 [16433] 7242 16431
    DD26 INT2 416435 SE5K_I_Energy_Today 4306 4306 [16435] 4306 16433

    Any suggestions on how to resolve ?


    posted in Mango Automation general Discussion read more
  • R

    Just reporting that no errors in the last 24 hours,
    I have the TCP with keepalive set, Comms was very unreliable with a new connection for each request.
    Now the forest of errors has disappeared, I notice I get a "Connect timeout" twice a day, about an hour after sunset, and an hour before sunrise. I suspect a quick fix for a leaky system, as the inverter reboots twice a day.

    The inverter only accepts one modbus connection at a time, so a second device is not an option.

    The instant power value swings very quickly, as clouds move accross the sky, and the fastest update time I can get allows he PLC to adjust the load on 2 x hot water system elements via SSRs. The kWh value is only really used to display "daily usage" of 15 - 30 kWh. It could be read every 15 - 30 minutes.

    I have a support request open with solaredge, and have sent then the wireshark logs of a working modpoll connection from a PC, and a PLC connection showing only 3 x SYN request. I will sent them my findings from this, but I will ask for a "stress test" on the next inverter I purchase.

    Thanks for all your help

    posted in Mango Automation general Discussion read more
  • R

    Thanks for all the input. 247 errors yesterday (27/03/2019) on a cloudy rainy day, so the inverter does not rest :-),
    and devote more time to comms.

    The inverter is on a wired ethernet connection, with mango and the inverter on the wired LAN.

    I had "Contiguous batches only" ticked, as the inverter would not answer back when I first added it. I have now ticked it and reduced the max read registers to 50. The This is giving me 2 requests.

    2019/03/28-08:33:28,568 O 00230000000601030053000d
    2019/03/28-08:33:28,833 I 00230000001d01031a22e2ffff1384fffe2494ffff91d8fffedac6fffe006aeaf70000
    2019/03/28-08:33:28,834 O 002400000006010300ce0025
    2019/03/28-08:33:28,914 I 00240000004d01034a033b012300f7011f00000388012c011d01440000fe93ffb7ff73ff6a0000de17db9ee036de71fffe004162a600191f070015cec0001e39760044aaeb002c0006001e72c40005fcb80000

    What is the ,nnn after the date-time in the above log (2019/03/28-08:33:28,568). Is it mS timestamp of Java sending and receiving?

    Is there any way to have a poll period associated with a point.? The 2nd longer read is for kWh values, and could be read every 15 minutes. This might allow the instant power values to be read more frequently.

    I am using mango to read, and publish the values to a Click PLC, as I cannot get the Click to talk to the inverter. I used wireshark on the line, and I see the PLC send 3 SYN requests, and the inverter does not reply. I suspect it may be "to fast" for the inverter.

    No errors for 30 minutes, so maybe solved, but not fixed !!!!!!

    posted in Mango Automation general Discussion read more
  • R


    I am using Mango 3.5.6 modbus tcp to poll a solaredge inverter, and I have bursts of "No recipient" errors. For example on the 26th march, there were 240 errors, over 9 bursts. The times seem to be random, with minutes or hours between errors.

    When I first added the inverter I set the poll time to 1 second and the errors were in the thousands, but I have reduced it to the hundreds by extending the poll time to 2 seconds, and the timeout to 1500mS. This seems a long time for an TCP modbus request timeout.

    2019/03/22-21:06:35,347 1553252795347 data source started
    2019/03/22-21:06:35,389 O 000100000006010300530002
    2019/03/22-21:06:36,390 O 000100000006010300530002
    2019/03/22-21:06:36,473 I 00010000000701030400000000
    2019/03/22-21:06:36,473 O 0002000000060103005d0003
    2019/03/22-21:06:36,553 I 00010000000701030400000000
    2019/03/22-21:06:37,342 I 00020000000901030600697e020000
    2019/03/22-21:06:37,342 O 000300000006010300ce0001
    2019/03/22-21:06:37,423 I 000300000005010302fd9b
    2019/03/22-21:06:37,423 O 000400000006010300d20001
    2019/03/22-21:06:37,685 I 0004000000050103020000
    2019/03/22-21:06:37,685 O 000500000006010300e20002
    2019/03/22-21:06:38,129 I 0005000000070103040040b993
    2019/03/22-21:06:38,129 O 000600000006010300ea0002
    2019/03/22-21:06:38,996 I 0006000000070103040043a19f
    2019/03/22-21:06:38,997 O 000700000006010300f20001
    2019/03/22-21:06:39,400 I 0007000000050103020000
    2019/03/22-21:06:41,388 O 000800000006010300530002
    2019/03/22-21:06:42,003 I 00080000000701030400000000
    2019/03/22-21:06:42,004 O 0009000000060103005d0003
    2019/03/22-21:06:42,084 I 00090000000901030600697e020000
    2019/03/22-21:06:42,085 O 000a00000006010300ce0001
    2019/03/22-21:06:42,629 I 000a00000005010302fd9a
    2019/03/22-21:06:42,629 O 000b00000006010300d20001
    2019/03/22-21:06:43,356 I 000b000000050103020000
    2019/03/22-21:06:43,356 O 000c00000006010300e20002
    2019/03/22-21:06:44,356 O 000c00000006010300e20002
    2019/03/22-21:06:44,526 I 000c000000070103040040b993
    2019/03/22-21:06:44,526 O 000d00000006010300ea0002
    2019/03/22-21:06:44,607 I 000c000000070103040040b993
    2019/03/22-21:06:44,709 I 000d000000070103040043a1a0
    2019/03/22-21:06:44,709 O 000e00000006010300f20001
    2019/03/22-21:06:44,810 I 000e000000050103020000
    2019/03/22-21:06:45,387 O 000f00000006010300530002
    2019/03/22-21:06:46,364 I 000f0000000701030400000000
    2019/03/22-21:06:46,364 O 0010000000060103005d0003
    2019/03/22-21:06:46,445 I 00100000000901030600697e020000
    2019/03/22-21:06:46,445 O 001100000006010300ce0001
    2019/03/22-21:06:47,312 I 001100000005010302fd97
    2019/03/22-21:06:47,313 O 001200000006010300d20001
    2019/03/22-21:06:47,413 I 0012000000050103020000
    2019/03/22-21:06:47,414 O 001300000006010300e20002
    2019/03/22-21:06:48,261 I 0013000000070103040040b993
    2019/03/22-21:06:48,261 O 001400000006010300ea0002
    2019/03/22-21:06:49,262 O 001400000006010300ea0002
    2019/03/22-21:06:49,351 I 0014000000070103040043a1a1
    2019/03/22-21:06:49,351 O 001500000006010300f20001
    2019/03/22-21:06:50,352 O 001500000006010300f20001
    2019/03/22-21:06:50,945 I 0014000000070103040043a1a1
    2019/03/22-21:06:51,048 I 0015000000050103020000

    I logged the IO when I first added the inverter, and noticed there are two I or O lines together.

    The time between the errors appears to be random

    26/3/2019	 5:47:48 AM	'SE5K': com.serotonin.modbus4j.exception.ModbusTransportException: java.net.SocketTimeoutException: connect timed out 
    26/3/2019	 9:39:24 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@93a5 
    26/3/2019	 9:39:26 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@93a6 
    26/3/2019	 10:09:57 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@ac78 
    26/3/2019	 10:10:02 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@ac7d 
    26/3/2019	 10:10:15 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@ac84 
    26/3/2019	 10:10:21 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@ac8c 
    26/3/2019	 10:10:28 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@ac92 
    26/3/2019	 10:10:34 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@ac96 
    26/3/2019	 10:10:53 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@aca1 
    26/3/2019	 10:11:01 AM	'SE5K': Exception from modbus master: No recipient was found waiting for response for key com.serotonin.modbus4j.ip.xa.XaWaitingRoomKeyFactory$XaWaitingRoomKey@aca8 

    Mango is also polling an Automation Direct Click PLC via modbus, and has never reported any errors.
    From the system status page

    SE5K previous sequential successful polls 	1
    SE5K last poll duration 			                        531
    SE5K poll success percentage 			        99.24194567277321
    ClickPLC previous sequential successful polls 	-1
    ClickPLC last poll duration 			               63
    ClickPLC poll success percentage 		      100

    I take it the poll duration is milliseconds? Mango can ping the inverter in 0.6mS

    robert@mango:/opt/mango/logs$ ping se5k
    PING SE5K.nixtec.net ( 56(84) bytes of data.
    64 bytes from SE5K.nixtec.net ( icmp_seq=1 ttl=62 time=0.672 ms
    64 bytes from SE5K.nixtec.net ( icmp_seq=2 ttl=62 time=0.640 ms
    64 bytes from SE5K.nixtec.net ( icmp_seq=3 ttl=62 time=0.628 ms

    Only 9 points are being polled in the inverter, (summary from device export)


    So my question is, is the problem / fault with Mango, or the Solaredge inverter?


    posted in Mango Automation general Discussion read more
  • R

    Thanks for your prompt reply.
    I restored the database , and all good now. The times on the logs were out, as I just "grep ERROR *ma.log" and cut/paste the interesting ones.

    Thanks again - Its the fastest SCADA support I have seen.

    posted in User help read more
  • R

    I am running mango on a raspberry pi ( very well for 8 months ).
    The version is 3.5.6 and have just added a modbus ethernet publisher for a remote PLC. This worked fine for a few days. I then attempted to modify the publisher by adding another point, but did not update the register field (left it on zero) when I saved the publisher.

    The web interface lost connection.
    The top command shows java is at 100%

    Attempted a ma.sh stop and start, and the log file shows

    ERROR 2019-02-28T13:40:58,349 (com.infiniteautomation.modbus.publisher.rt.ModbusIpSlave.receivedException:189) - Publisher Slave Error

    ERROR 2019-02-28T11:16:17,844 (com.serotonin.m2m2.web.dwr.util.ExceptionDetectionFilter.doFilter:38) - DWR invocation exception com.serotonin.modbus4j.sero.ShouldNeverHappenException: Unsupported Regsiter Type: 0

    ERROR 2019-02-28T13:41:37,334 (com.serotonin.m2m2.db.dao.AbstractBasicDao$1.extractData:1043) - IO Exception: "java.io.IOException: org.h2.jdbc.JdbcSQLException: The database has been closed [90098-196]"; "lob: null table: -3 id: 48567" [90031-196]

    Can I connect to the H2 database and delete the publisher ?


    posted in User help read more
  • R

    Moving the /databases directory solved the problem.
    I first started mango (ma.sh start) as a user, and it appeared to start OK, but I could not login, so the database user creation must have failed !!

    After moving the database, I started with

    $sudo ./bin/ma.sh start 

    Connected to localhost:8080 and logged in as admin :-)

    Fedora 27, by default uses the wayland display server, which will not let root processes attach to it, if it is running as an ordinary user.
    [link text](https://docs.fedoraproject.org/f27/system-administrators-guide/Wayland.html
    [link text](https://ask.fedoraproject.org/en/question/97856/why-do-i-get-an-error-launching-gedit-with-sudo-in-fedora-25/

    Maybe a new option should be added to the env.properties to allow the server to start in "headless mode", so when I upgrade mango, I do not lose my "-Djava.awt.headless=true" hack

    Thanks for the prompt help

    posted in Mango Automation Installation read more
  • R

    Installed free-m2m2-core-3.3.0.zip on linux (Fedora 27).

    I added a line to ma.sh as mango would not start, as it was trying to connect to the x11 display.

    $ grep JAVAOPTS *.sh
    ma.sh:JAVAOPTS=" -Djava.awt.headless=true"

    I connect to http://localhost:8080 and get the mango login screen, but cannot connect as admin/admin.

    The log on the terminal screen shows

    WARN 2018-02-04T17:43:39,781 (com.serotonin.m2m2.web.mvc.spring.security.MangoAuthenticationFailureHandler.saveExceptionImpl:81) - Failed login attempt on user 'admin' from IP +0:0:0:0:0:0:0:1

    Any tips for next steps


    posted in Mango Automation Installation read more