Communication
Grounding and Shielding
In most cases, I/O modules will be installed in an enclosure along with the other devices, which generate electromagnetic radiation. Relays, contactors, transformers, motor invertors, etc., are examples of such devices. Radiation can induce electrical noise into both power and signal lines, as well as direct radiation into the module. Whether or not the SfAR modules are immune to such effects, the interferences must be suppressed at their source if possible to ensure the proper functioning of the entire system. Appropriate grounding, shielding and other protective steps should be taken at the installation stage to prevent these effects. It is recommended to at least follow the rules below:
line power cables must be routed with spatial separation from signal and data transmission cables;
analog and digital signal cables should also be separated;
it is recommended to use shielded cables for analog signals, cable shields should not be interrupted by intermediate terminals;
the shielding should be earthed directly after the cable enters the cabinet.
It is recommended to install interference suppressors when switching inductive loads (e.g., coils of contactors, relays, solenoid valves). RC snubbers or varistors are suitable for AC voltage and freewheeling diodes for DC voltage loads. The suppressing elements must be connected as close to the coil as possible.
Network Termination
Transmission line effects often present problems for data communication networks. These problems include reflections and signal attenuation.
To eliminate the presence of reflections of signal from the end of the cable, the cable must be terminated at both ends with a resistor across the line adequate to its characteristic impedance. Both ends must be terminated since the propagation is bidirectional. In case of an RS485 twisted pair cable, this termination is typically 120 Ω.
Setting Module Address in RS485 Modbus Network
The following table shows how to set DIP switches to determine the address of the module. The module address is set with the switches in the range of 0 to 31. Addresses from 32 to 255 can be set via RS485 or USB and using dedicated software tool.
Addr | SW1 | SW2 | SW3 | SW4 | SW5 |
---|---|---|---|---|---|
0 | OFF | OFF | OFF | OFF | OFF |
1 | ON | OFF | OFF | OFF | OFF |
2 | OFF | ON | OFF | OFF | OFF |
3 | ON | ON | OFF | OFF | OFF |
4 | OFF | OFF | ON | OFF | OFF |
5 | ON | OFF | ON | OFF | OFF |
6 | OFF | ON | ON | OFF | OFF |
7 | ON | ON | ON | OFF | OFF |
8 | OFF | OFF | OFF | ON | OFF |
9 | ON | OFF | OFF | ON | OFF |
10 | OFF | ON | OFF | ON | OFF |
11 | ON | ON | OFF | ON | OFF |
12 | OFF | OFF | ON | ON | OFF |
13 | ON | OFF | ON | ON | OFF |
14 | OFF | ON | ON | ON | OFF |
15 | ON | ON | ON | ON | OFF |
16 | OFF | OFF | OFF | OFF | ON |
17 | ON | OFF | OFF | OFF | ON |
18 | OFF | ON | OFF | OFF | ON |
19 | ON | ON | OFF | OFF | ON |
20 | OFF | OFF | ON | OFF | ON |
21 | ON | OFF | ON | OFF | ON |
22 | OFF | ON | ON | OFF | ON |
23 | ON | ON | ON | OFF | ON |
24 | OFF | OFF | OFF | ON | ON |
25 | ON | OFF | OFF | ON | ON |
26 | OFF | ON | OFF | ON | ON |
27 | ON | ON | OFF | ON | ON |
28 | OFF | OFF | ON | ON | ON |
29 | ON | OFF | ON | ON | ON |
30 | OFF | ON | ON | ON | ON |
31 | ON | ON | ON | ON | ON |
Types of Modbus Functions
There are 4 types of Modbus functions supported by the SfAR modules.
Type | Beginning Address | Variable | Access | Modbus Command |
---|---|---|---|---|
1 | 00001 | Digital Outputs | Bit | 1, 5, 15 |
2 | 10001 | Digital Inputs | Bit | 2 |
3 | 30001 | Input Registers | Registered | 3 |
4 | 40001 | Output Registers | Registered | 4, 6, 16 |
Communication Settings
The data stored in the module's memory is given in the16-bit registers. The access to registers is via Modbus RTU or Modbus ASCII.
Default Settings
The default configuration can be restored with the DIP switch, SW6.
Baud Rate | 19200 |
---|---|
Parity | No |
Data Bits | 8 |
Stop Bits | 1 |
Reply Delay [ms] | 0 |
Modbus Type | RTU |
Restoring Default Configuration
To restore the default configuration, follow the steps below:
Turn the power off;
Turn the switch SW6 on;
Turn the power on;
When power and the communication LED are lit, turn the switch SW6 off.
WARNING! After restoring the default configuration, all values stored in the registers are cleared as well.
Configuration Registers
Modbus Address | Decimal Address | Hex Address | Name | Values |
---|---|---|---|---|
40003 | 2 | 0x02 | Baud Rate | 0 – 2400 |
40005 | 4 | 0x04 | Parity | 0 – none |
40004 | 3 | 0x03 | Stop Bits | 1 – one stop bit |
40004 | 3 | 0x03 | Data Bits | 7 – 7 data bits |
40006 | 5 | 0x05 | Response Delay | Time in ms |
40007 | 6 | 0x06 | Modbus Mode | 0 – RTU |
Watchdog
This 16-bits register specifies the time in milliseconds to watchdog reset. If the module does not receive any valid message within that time, all digital and analog outputs will be set to the default state.
This feature is useful if there is an interruption in data transmission and for security reasons. Output states must be set to the appropriate state in order to reassure the safety of persons or property.
The default value is 0 milliseconds, which means the watchdog function is disabled.