Modbus RTU datasource configuration
-
Hy,
I need to connect Mango to an inverter ("Aurora Power-one") communicating on RS485 address 4, this inverter is connected to a pc running Mango via an RS485-USB converter so it is available on COM8.
The proprietary software "Aurora communication" talks without problem with this inverter from the same PC, instead I can't connect to it using modbus RTU that is supported by the inverter. This is my datasource configuration:but the "Modbus node scan" can't find any node,
This is from the Aurora manual
Triing to get this data:
but this is the result with the point locator:
any idea about where is my error configuring this datasource?
Thanks,
Antonio -
Hi Antonio,
The "Modbus Scan Tool" is actually just iterating through the Slave IDs issuing a read request for holding register 0. If it gets a response it has found a node from it's perspective. There is no specification of scanning in Modbus, so this is just a utility that MAY find a Modbus device, if present and responding to reads for holding register 0.
any idea about where is my error configuring this datasource?
The error in your locator test is telling you that it didn't try because the data source is using the port. This tells me it's an older version of Mango (which should still work), prior to us enabling the use of the tools while the serial Modbus data source is running. So, disable the data source before using the test tools.
-
it is mango 2.8.4
In any case the answer is no good the same
-
You could try increasing the timeout from 500ms to 5000ms. It's also worth noting that Mango Modbus offsets are 0 indexed, so if the device only responds to reads on valid registers and there are invalid registers around where you are reading, you may want to try the offset +/- 1.
Another possibility is that there is a register that needs to be written periodically for the device to respond. I've seen that before, but not on serial devices. You could investigate that route by either searching the documentation for anything like that or monitoring what sort of output the proprietary program is doing. It's also possible their protocol begins with a preamble that isn't Modbus at all. Presumably that would be in the manual.
One thing that strikes me is the "1 bit start." I don't see any way to configure the start bits in the underlying serial port implementation we use (and I don't see anyone complaining about that in my googling, either). I plugged a USB to serial converter into my Windows machine and checked its settings with the 'mode' command. Oddly nothing there about start bits either. You could launch the proprietary program, begin communication and collect
mode
output for the serial port from the command prompt, then do the same thing with Mango and compare differences. On Linux that would be with thestty
commands (and in the stty help I also don't see a way to set start bits). That should let you see if the issue is caused by serial port settings.Also I wonder if you have LEDs on the USB to Serial converter, and you can visually tell that the device is not responding to Mango.
-
Hy,
it is not possible to use mode during activity on COM8 ,
so this is the output of mode command when software is stopped
and also, using a serial port sniffer during "Aurora communication" activity,
I've the following results, it seems that are bad CRC but it is working correctly and led blinks green and red on usb-rs485 converter.No result also using offset +/-1
*-----------------------------------------------
[01/10/2018 10:14:11]
Modbus Request (COM8)
Address: 4
Function: 70 (0x46)
Checksum: 26122(BAD)[01/10/2018 10:14:11]
Modbus Response (COM8)
Address: 0
Function: 6 (0x06) - Write Single Register
Address: 9028
Value: 45023
Checksum: 54017(BAD)[01/10/2018 10:14:11]
Modbus Request (COM8)
Address: 4
Function: 78 (0x4e)
Checksum: 3520(BAD)[01/10/2018 10:14:11]
Modbus Response (COM8)
Address: 0
Function: 6 (0x06) - Write Single Register
Address: 9
Value: 40990
Checksum: 2310(BAD) -
I’ve had issues before where one program takes over the port. Try useing a different port for mango and move the usb Converter
-
Also changing usb port it is always assigned COM8,
I think that Aurora Power One implement a proprietary Modbus RTU,http://www.drhack.it/images/PDF/AuroraCommunicationProtocol_4_2.pdf
somewhere I found this information about how to get current and voltage from the inverter
0x01(ADDRESS) + 0x03 (FUNCTIONALITY) + 0x17,0x00,0x20,0x20,0x20,0x20 (RICHIESTA TENSIONE) + CRC
0x01(ADDRESS) + 0x03 (FUNCTIONALITY) + 0x19,0x00,0x20,0x20,0x20,0x20 (RICHIESTA CORRENTE) + CRCbut I'm not sure about how to use such info in mango
-
@etantonio said in Modbus RTU datasource configuration:
Aurora Power-one
that might explain the existence of this http://www.eborx.com/download/en/powerone/accessories/pvi-rs485-modbus-converter/pvi-rs485-modbus-en.pdf
I could not find anything about modbus on the aurora power-one manual that I found online. -
yes,
you are right,
it is a converter from "rs485 aurora" to modbus rtu, so it seems there's no way to work with mango without this object -
Good sleuthing!
You can definitely do this through Mango still, it just takes a different approach and another few steps. The Serial Data Source can certainly send out "rs485 aurora" and a script can decode it. If you only need a small subset of the possible accessible information and already have the means to record the serial communication it's not that much more work to replay that communication and decode the result. There's a lot of information in this somewhat old thread: https://forum.infiniteautomation.com/topic/2517/chinese-brand-psu_monitoring-rs485-and-mango
But the TLDR is that you can set up a serial data source with command / response points and parse the results in a script, and you can have the serial data source be configured to use hex so that you can simply replay the bytes you've recorded to request information. You can send the reads from a script so that it's polling, or use a Point Link if you need to iterate through a whole polling conversation instead of a more Modbus style batch read.
-
Please excuse me,
the requirement is changed and i didn't check this,
yes, we need the average of point values of last minute, no more the sum.
So you think that this could be a good solution?
Data surce pools each second and data point computes average of last minute pointsRegarding database storing I've checked directly on the db that just one data point is stored each minute so I don't care about cached data showed in the datapoint history.
Thanks,
Antonio -
I'm not not sure of the question. It sounds like you're asking if the interval logging 'average' option is a good way to log an interval average. If so: yes, that's it's purpose.
-
@phildunlap sorry, I'm working on several pc and this question was related to another post
https://forum.infiniteautomation.com/topic/3795/sum-each-minute-of-parameter-each-second-value
I don't know maybe my distraction or a cross-session problem. Thanks, Antonio