I've been searching through the forums to see if I could find this question answered anywhere else without success. My apologies if this is a duplicate question. In a nut shell, I'm hoping someone out there can help me troubleshoot Modbus RTU via RS485.
We are using the Schneider M258 as the backbone for an injection control system. The exact model is TM258LF42DT. We use Modbus via TCP to communicate with a local HMI. I have become very familiar with how this side of the control system is set up over the last few months. Now our customer is asking us to support Modbus RTU via RS485 so they can pull live data to their SCADA. In order to support this I have done the following:
The serial line has been configured with the following parameters:
Modbus_Manager 4.0.0.2 has been added for the serial line configuration with the following parameters:
I have been working for the last few hours trying to validate this set up using a computer and the free Modbus monitoring program qModMaster (I also tried using two other programs ModPoll & ModScan). When I configure qModMaster for TCP mode I am able to read the registers without any issue. However, when I configure the program for serial I am not getting any response from the controller. To this end I've been thinking it is an issue with my cabling.
I have tried using two different serial devices; this computer includes a serial port (quite an old machine) and I also have a serial to USB adapter. In both cases, I've made sure to adjust the settings in device manager so that the baud rates, data bits, parity, and stop bits are the same.
On the direct serial input:
I looked up the pinout diagram for this PLC and stripped apart an old ethernet cable. I connected the D1(A+) and D0(A-) leads to pins 5 and 9 of a serial cable. I have also tried flipping the wiring just in case there was some confusion on my end about which was actually +/-. I don't have an end termination resistor however I only have about 1m of ethernet cable and 0.5m of serial cable.
On the serial to USB input:
I've basically done the same thing as above except that the I've also connected the ground cable.
In Conclusion:
This is quite a long a detailed post. I'm hoping someone out there who has worked through this kind of mess before will have an idea of where I am going wrong or what I am missing.
I'm to the point where I'm thinking that the computer may not be acting like a proper Modbus master for serial communications but I do not have a lot of options for alternative master devices.
The other potential issue I've been considering is if my serial settings are causing an issue. I was considering trying a lower baud rate but I haven't gotten to that yet.
Hopefully there is a guru out there who can smile down upon a young padawan and lead me in the right direction. Thanks in advance!
We are using the Schneider M258 as the backbone for an injection control system. The exact model is TM258LF42DT. We use Modbus via TCP to communicate with a local HMI. I have become very familiar with how this side of the control system is set up over the last few months. Now our customer is asking us to support Modbus RTU via RS485 so they can pull live data to their SCADA. In order to support this I have done the following:
The serial line has been configured with the following parameters:
- Baud Rate: 9600
- Parity: Even
- Data Bits: 8
- Stop Bits: 1
- Physical Medium: RS485
- Polarisation Resistor: No
Modbus_Manager 4.0.0.2 has been added for the serial line configuration with the following parameters:
- Mode: RTU
- Addressing: Slave
- Address: 1
- Time between Frames: 10ms
I have been working for the last few hours trying to validate this set up using a computer and the free Modbus monitoring program qModMaster (I also tried using two other programs ModPoll & ModScan). When I configure qModMaster for TCP mode I am able to read the registers without any issue. However, when I configure the program for serial I am not getting any response from the controller. To this end I've been thinking it is an issue with my cabling.
I have tried using two different serial devices; this computer includes a serial port (quite an old machine) and I also have a serial to USB adapter. In both cases, I've made sure to adjust the settings in device manager so that the baud rates, data bits, parity, and stop bits are the same.
On the direct serial input:
I looked up the pinout diagram for this PLC and stripped apart an old ethernet cable. I connected the D1(A+) and D0(A-) leads to pins 5 and 9 of a serial cable. I have also tried flipping the wiring just in case there was some confusion on my end about which was actually +/-. I don't have an end termination resistor however I only have about 1m of ethernet cable and 0.5m of serial cable.
On the serial to USB input:
I've basically done the same thing as above except that the I've also connected the ground cable.
In Conclusion:
This is quite a long a detailed post. I'm hoping someone out there who has worked through this kind of mess before will have an idea of where I am going wrong or what I am missing.
I'm to the point where I'm thinking that the computer may not be acting like a proper Modbus master for serial communications but I do not have a lot of options for alternative master devices.
The other potential issue I've been considering is if my serial settings are causing an issue. I was considering trying a lower baud rate but I haven't gotten to that yet.
Hopefully there is a guru out there who can smile down upon a young padawan and lead me in the right direction. Thanks in advance!