0
\$\begingroup\$

I'm trying to connect a power meter (http://www.ebay.co.uk/itm/272572704122) with Modbus over a RS485-USB converter (http://www.ebay.co.uk/itm/231570466384)

The converter looks like a serial port (/dev/ttyUSB01 or COM5).

Just a cable A-A, B-B, both converter and meter just have two pins.

I have set the right speed, 2400 baud as the meter shows on the display, but I just get time out, either on Raspberry Pi or on two different USB scanners.

Am I missing something?

EDIT

I finally got it working. I was playingdeveloping with a 3-phase meter, but on my workbench I only have one phase, so I connected it to phase L1, and the display went on nicely. However, the modbus only works if the meter have power on L2, not L1 or L3.

Also, the only register is the accumulated power, which is hidden at 0x011e, which my scanner were not testing; I/it presumed the registers were starting at 0 or 1.

I also added a 150Ω resistor at each end, if it didn't help for the signals, at least it helped getting the flimsy wires of my phone cable into the connectors; I soldered the wires onto the resistor ;-)

\$\endgroup\$
  • \$\begingroup\$ Maybe a termination resistor is needed across the meter terminals? This interesting: http://www.planetanalog.com/author.asp?section_id=483&doc_id=562062. I have to say that when I've used 485, it has always been local to my equipment (<10meters), and I could reliably use a common ground (that your meter/converter does not support). \$\endgroup\$ – Chris Knudsen Mar 30 '17 at 13:48
  • \$\begingroup\$ Please post the test code your using... \$\endgroup\$ – Chris Knudsen Mar 30 '17 at 13:55
  • \$\begingroup\$ Regarding the code: npmjs.com/package/node-red-contrib-serial-modbus and modbustools.com/download.html \$\endgroup\$ – Lenne Mar 30 '17 at 14:06
  • 1
    \$\begingroup\$ I guess I could say "I feel your pain". I've worked with MODBUS devices for many many years, and few were the cases where you set up your code and it just worked. Besides the many electrical issues that can happen with RS485 (2 wire or 4? terminated correctly? Pull-ups and pull-down resistors present?) there are quite a few variations of Modbus itself, including RTU mode (8 bit binary) ASCII mode (all 7 bit, ASCII HEX strings), and unusual serial parameters (parity options, etc). Then, there are a LOT of variations in how the manufacturer expects their MODBUS address map to be interpreted. \$\endgroup\$ – Randy Mar 30 '17 at 15:44
  • 1
    \$\begingroup\$ Additionally, some manufacturers add a lot of requirements for communication with their MODBUS devices that are completely non-standard for modbus. These included schemes like password and security expectations, addressing problems, nonstandard byte order in 16 bit register requests or responses, and joining of multiple 16 bit registers to form "longs", "floats" time stamps, or other non-modbus data types. Bottom line, the number of reasons a MODBUS communication setup can fail would take pages to list. \$\endgroup\$ – Randy Mar 30 '17 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.