General Information regarding Modbus communication CPS system and FG 6280-6283 / GasLite sensors.
Modbus is a serial com bus, sending data between a master and connected units on a 2-wire cable/bus. There are other versions of modbus, 4-wire etc. but PSIDAC use and the most common is the 2-wire bus.
On this bus all units need to speak in the same speed (baud rate) and in the same manner (stop bits, parity etc.). All these settings are factory default already set to work out of the box, but good to know if you need to speak with other brands/systems.
The only value you need to pay attention to is the Address value, which is the ID of each component connected on the same bus/cable. In the CPS system configuration page you set the attached units ID-number so the CPS knows what units the system have o work with.
Modbus – What cables to use?
There are several factors that plays a roll in what cables can be used and not be used. Things like cable distance/length. And the environment where the components are installed, if it’s radio waves, frequencies or magnetic fields in the air near the cables, etc. The longer the network will be, the more important it is that you use good quality wire.
But here are some general recommendations for better result:
- The modbus cable should be a twisted pair cable.
- If it’s short distances (one room installation, up to 30m) and no disturbances (frequencies/magnetic fields) in the air you can probably use unshielded cables, example: BELDEN 8442 (roll 305m). One pair (red/black) size 2×0.32 mm², a communication/control cable.
- For longer distances (like 100m) use shielded cables. The shield helps protect your signals from picking up stray noise from nearby wiring and other electrical equipment. And for longer distances it’s better to go up in size to 2×0.5 mm². Example of cable is: FQAR-PG by Nexan, manufacturer part no. 16211098-898-05. Or by brand NKT, model FQAR-PG size 2×0.5 mm², manufacturer part no. 0173905
So you have a longer cable distance / radio waves in the air making the cables an antenna, and use shielded cables. What to do with the shield? The best way is to connect the shield to the Master GND (24 VDC power terminal GND). Hopefully that will work fine and with no problems.
If you still see problems the shield can cause problems since the shield now is the antenna and leading in disturbances to the GND of the system. It’s all depending on the location, installation and type of disturbance. So if you have a shielded cable, and it’s grounded to GND and still see com problems, try to disconnect the shield from GND. The cable shield still works as a shield but with less ”shield function” ungrounded, but it can work better for the whole system, worth testing.
How to connect the units?
Connect each unit all the way in to the Modbus terminal A/B, making the bus/cable a long chain. Try to not to connect the units in to the master as if’s a hub.
Some there is lack of space in a component, not enough ways in to the terminals, or the installation is smother having a multi-cable out from the component to a junction box. The problem with that is that single cable going between the junction box and the unit can act as a antenna and increase the risk of having com problems. If you must install with junction boxes, make the one cable going in to the unit as short as possible, use twisted pair for the modbus wires.
What is “termination”, and do I really need it?
Yes you need it, although most things will work without any termination for short distances, like on your workbench. In the field, it is needed, and must be located at both ends of the line and only at the two far ends of the line. Typically this termination consists of a 120-ohm resistor between the two data lines at each end of the line. So if you have com problems, check the resistor (120 ohm) at the last unit on the bus (EOL End Of Line), and check if the dip-switch is activated on the first CPS panel (SOL Start Of Line).
The termination is required to avoid reflections on the line. Think of tossing a pebble into calm water near a stonewall. When the ripples hit the wall, they bounce back toward where the pebble was tossed in. Data on a long un-terminated transmission line will do essentially the same thing. When the reflection comes back to a point where something is trying to listen to the line, the receiver will see both original data and reflected data, and the receiver will quickly get confused and end up with garbled data. The garbled data will get tossed out since it does not pass framing and/or checksum tests. The result is the appearance of “no response” since Modbus RTU devices are required (by protocol) to keep silent when they do not recognize something on the line.
120 Ohm is colored Brown-Red-Brown (gold), usually a ¼” W resistor like this:
CPS 6000 series Modbus
The CPS system have 2 modbus ports. One terminal for the internal bus connecting the sensors that the CPS panel will display. And the other one is an External terminal for the possibility to connect the CPS system to the building Scada system, also called BMS Building Management System. Through that External Modbus port the BMS can read out the sensor values, alarms etc. making the CPS system acting like a gateway.
And speaking of gateways, often the CPS system and the room being monitored is far from the BMS and Scada system computers, so to get the data to the BMS the external Modbus often is converted to regular network like TCP/IP by a gateway. That way the standard building network can be used and the BMS system can even be in another building as long as it’s on the same network. See wiring example below.
Symptoms: No Modbus coms, but CPS panel and components are powered up okay.
Possible problem: Modbus cables polarity A/B or Modbus address ID problems.
- All connected units have the 2 modbus wires connected the same to Modbus A and B terminals.
- Check that all connected units have a unique Modbus address ID. And check that the sensor ID’s are set in the CPS Config-page.
- If this doesn’t help, try to unplug all the Modbus terminals, and then reconnect them again one by one on the sensors. And if/when the com dies again you have found the troublemaker. Double check the problem unit since it seems to block the bus. If possible, swap with other sensor to see if problem follows sensor or cable/installation place. If cables/place is ok, contact retailer if there is a faulty sensor/unit.
Symptoms: Works for a while, then it stops working, comes and goes.
Possible problem: Interference in coms.
- Bad connections in terminals, glitch? Pull and move wires to check them.
- Using non twisted cables? Try swapping to twisted pair wires.
- Any VFD (Variable Frequency Drives) nearby? Or other electrical wires with high power/currents, causing radio waves or magnetic fields? Ask if you can test turning the VFD off for a while to see if problem stops? If so try moving the Modbus cables away from them. Or use shielded cables, ground the shield. A simple tool to check radio interference is this: http://colibrinano.eu/
- To long Modbus cables? If it’s long (over 50m) you might need to go up to a thicker cable, 5 mm².
- Check the power supply, steady power in? And steady power out supplying the CPS system? All components powered from same power supply? If not make sure the ground is connected making several supplies having the same common ground.
- In general we recommend 24DC (over 24VAC) power supplies since DC are better to filter out and handle bad power supply networks.
- To many units connected on the same bus? We don’t recommend more than 25 units on the same bus due to much traffic on the bus, slowing it down and causing com problems. If you have bigger installations with many CPS systems we recommend splitting the bus into shorter Modbus cables with fewer CPS panels adding an extra gateway or two for reaching the BMS.
Symptoms: Internal com bus works but not external to BMS.
Possible problem: Modbus External settings, or possible gateway settings, or BMS/Scada Driver settings, Driver tag/address problems.
- Check CPS com configurations for External com like Baud rate, parity, stop bits etc, External should be: 9600, None, 8, 1 stop.
- Check the Gateway manufacturer manual for any Modbus configurations. It must match the CPS settings, 2-wire Modbus and 9600, None, 8, 1 stop bits.
- Check the 2 modbus A/B wires on the gateway, connected correctly?
- Check the other side on the gateway, TCP/IP address and network config correctly so it matches the building network? Check with building IT-staff for help.
- Is the scada driver reading the CPS to fast/often, or asking to many variables in a single question? See driver specifications below:
- The CPS Modbus addresses must be between 5 and 220.
- All Values (in Modbus tag-list, separate document) are signed integers (16 bits) MSB + LSB
- The CPS is a Standard RTU
- Keep the readings of the register counts lower than 10.
- Scan Rate should be > 10 sec.
Here is a checklist to go through before contacting support for help:
- Signal ground (all units in the system have same power supply ground?)
- Data line polarity (Modbus A/B)
- Device com configurations like Baud rate, parity, stop bits etc, that they are correct: Factory settings: Internal = 38400, None, 8, 1stop. External = 9600, None, 8, 1stop.
- Check the Line terminations
- Master/slave configuration – only one master allowed on Modbus RTU.
- All devices have unique addresses
- Version of connected units_______
- Counts of connected units_______
- Version of CPS panels_______
- If you need support, first step is to contact your retailer. If you need to contact PSIDAC AB, write the above info in to our RMA page at: https://psidac.com/rma-request-form/
Additional information about MODBUS can be found here: http://www.modbus.org/
CPS Modbus wiring example:
This document is a guide and trouble shooting help in Modbus coms. The information and examples is intended to be guiding and just examples. It’s just one way of many to make installations using Modbus coms. You always have to work out the best way according to your local circumstances. PSIDAC cannot be held responsible for any wiring errors or problems caused by following this guidance, information and examples. The guidance, information and examples are subject to change without notice.