Home  >  Support  >  Support Forum  >  MODBUS debugging help in DIA with CPX4
Notice! We've recently migrated to using a new forum, we hope you enjoy it. If you are an existing member and this is your first time visiting our new forum, please reset your password to be able to sign in.
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

MODBUS debugging help in DIA with CPX4

0 votes
Hello Everyone,
I'm hoping someone might be able to assist me troubleshoot my implementation of a DIA project to read some values off a MODBUS enabled Monitoring System.

Below is the network structure:

ConnectPort X4 - XBee485 Adapter (Xbee)
XBee485 Adapter - Monitoring System (2 Wire RS485)

Below are the screenshots of the Industrial Automation configuration on the X4 which I configured following the instructions here http://www.digi.com/wiki/developer/index.php/Modbus_Bridge_on_CPX4:

IATableSettings_zpsf9af99e0.png

IAMessageDestinationSettings_zps6bf7a95d.png

IAMessageDestinationSettings2_zpsa4d85b16.png

I tested the X4 to MODBUS communication using ModScan and was able communicate to the Monitoring System successfully:

modscan_zpsef24f083.png

I followed the instructions to set up the DIA script according to this http://www.digi.com/wiki/developer/index.php/Modbus_Dia_Client

My script regarding the MODBUS communication is below:
- name: mbus
driver: devices.modbus.mbus_udp_device:MBusUDPDevice
settings:
poll_rate_sec: 15
udp_peer: "('127.0.0.1',502)"
round: 2
poll_list:
- poll: "in01"
pollinfo:
uid: 1
fnc: 3
ofs: 0
cnt: 5
channels:
- parse:
nam: "SerialNumMSW"
ofs: 0
frm: "]h"
unt: "num"
typ: "float"
- parse:
nam: "SerialNumLSW"
ofs: 1
frm: "]h"
unt: "num"
typ: "float"
- parse:
nam: "FirmWareRS"
ofs: 2
frm: "]h"
unt: "num"
typ: "float"
- parse:
nam: "FirmWareOS"
ofs: 3
frm: "]h"
unt: "num"
typ: "float"
- parse:
nam: "DevID"
ofs: 4
frm: "]h"
unt: "num"
typ: "float"


THE PROBLEM

My problem with all of this after I compile my script and deploy it onto the X4 I get the following messages every 15 seconds via Telnet:
DEBUG:mbus:Cyclic Process at 2014-01-14 05:43:00
WARNING:MBusPDU:MbPdu.rsp_parse() Exception Response = 0xC9 0B
DEBUG:mbus:process slipped - adjusting for 2.66 lag
DEBUG:mbus:Sleep for 12 seconds
DEBUG:mbus:Cyclic Process at 2014-01-14 05:43:15
WARNING:MBusPDU:MbPdu.rsp_parse() Exception Response = 0xC9 0B
DEBUG:mbus:process slipped - adjusting for 2.66 lag
DEBUG:mbus:Sleep for 12 seconds


and the idig_dia.html page gives:
idigi_dia_zps31de80a2.png

Can anyone help??
asked Jan 14 in Modbus and Industrial Automation by stirlsilver New to the Community (2 points)

Please log in or register to answer this question.

2 Answers

0 votes
One further thing I noticed after my post - If the DIA script is running on the X4, ModScan is not able to read the values from the monitoring system.

I disabled auto load of the python script, rebooted the X4 and then ModScan was able to connect and read values. I'm not sure if this is a symptom or if it helps in any way find a solution.

Thanks,
Stirling
answered Jan 14 by stirlsilver New to the Community (2 points)
0 votes
I contacted Digi directly and got the problem sorted. Below is what fixed my issue:

Just read this wiki page:
http://www.digi.com/wiki/developer/index.php/Understanding_XBee_EndPoints#EndPoints_in_the_Modbus.2FIA_Engine

The customer needs to move the Xbee485 adapters end point away from 0xe8 to something else, like 0xE9. So change the IA route table to include the !E9 suffix.
Only one process can bind on a specific zigbee/xbee end-point at a time. If you have the IA engine ‘owning’ end-point 0xE8, then the DIA (or any Python task) cannot bind to it.
answered Jan 15 by stirlsilver New to the Community (2 points)
Contact a Digi expert and get started today! CONTACT US
...