Modbus RS-485 with SMP10-A Pyranometer Communication Error

Wireless communications in Waspmote, topologies, node types...
Post Reply
ashrafelmiligy
Posts: 16
Joined: Mon Aug 13, 2018 5:04 pm
Company: TH Köln

Modbus RS-485 with SMP10-A Pyranometer Communication Error

Post by ashrafelmiligy » Tue Aug 14, 2018 4:37 pm

Greetings,

We have an SMP10-A Pyranometer from Kipp&Zonnen which works great with the 4-20mA board and Waspmote V1.5. However, our project needs to use the Agriculture board V3.0 instead of the 4-20mA board, therefore we have to use the Modbus RS-485 module with Socket 0 and use the Agriculture board next to it.

At this point of the project, we haven't connected the Agriculture board yet, since we are unable to use the Modbus RS-485, hopefully due to my lack of knowledge working with this protocol rather than a hardware failure.

The Connections are as following:
SMP10-A yellow cable connected to B port of Modbus
SMP10-A grey cable connected to A port of Modbus
SMP10-A white cable connected to the recommended 12V source (tested with Multimeter)
SMP10-A black and blue cables connected to power GND
Battery is connected to the Waspmote board

The code used is the example "RS-485 05: Modbus Read Input Registers" which was recommended by Kipp&Zonnen Engineers.
http://www.libelium.com/development/was ... registers/

Communication according to SMP10-A manual : 19200 baud, 8 bits, even parity, 1 stopbit
Modbus Address: 1
Protocol: RTU

Please advise what am I doing wrong to always receive "Communication Error".
Also the "result" from int result = node.readInputRegisters(address, bytesQty); gives out "1", which does not enable me to know which error code is this.

SPM10-A Manual:
http://www.kippzonen.com/Download/583/M ... ranometers

Thank you

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Modbus RS-485 with SMP10-A Pyranometer Communication Error

Post by libelium-dev » Thu Aug 16, 2018 12:14 pm

Hi,

You can configure the baudrate of RS-485 module according with your device but the communication must be 8N1 (8 bits, 1 stop bit, no parity). Please try to set your device with no parity byte and configure the example code to set 19200 bauds

Regards

ashrafelmiligy
Posts: 16
Joined: Mon Aug 13, 2018 5:04 pm
Company: TH Köln

Re: Modbus RS-485 with SMP10-A Pyranometer Communication Error

Post by ashrafelmiligy » Thu Aug 23, 2018 6:43 pm

Greetings,

That was exactly the problem. After reconfiguring the device and disabling the Even parity, it now works great !!

Thank you very much for your support !! Cheers

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Modbus RS-485 with SMP10-A Pyranometer Communication Error

Post by libelium-dev » Fri Aug 24, 2018 7:16 am

You're welcome!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest