Custom request from Israel Customer regarding 10IOA01_12V on 25th Jan 2025

 

 

Hi,
We are looking for a product similar to the 10IOA01_12V, but with an additional feature. We need a command that will energize the relay for a specified duration.

Let me explain:
With the current 10IOA01_12V, I can send a command to open or close the relay. What we need is a command that will close the relay for a set period of time. The expected behavior is as follows:

1. We send the command to close the relay.
2. The board should then keep the relay closed for the specified time.
3. After the time elapses, the relay should automatically open.
Please let me know if this is something you can provide or if further clarification is needed.

Thank you!

 

 

Objective 
Enhance the current Modbus functionality of the device by introducing new registers and 
behaviors to support configurable ON/OFF durations for relays, as well as real-time visibility into 
the remaining ON/OFF times. These features aim to provide more flexible and automated 
control for the relay outputs. 
Requested Changes 
New Modbus Registers (addresses are proposal vendor to decide) 
Register 
Address 
0x0100 
0x0101 
0x0102 
0x0103 
Description 
ON 
Duration 
OFF 
Duration 
Remaining 
ON Time 
Remaining 
OFF Time 
Possible 
Values 
0-65535sec
 onds 
0-65535sec
 onds 
0-65535sec
 onds 
0-65535sec
 onds 
Details 
Defines how long the relay stays ON after 
an ON command. 
Defines how long the relay stays OFF after 
an OFF command. 
Displays the remaining time before the relay 
turns OFF (decrements during the ON 
period). 
Displays the remaining time before the relay 
turns ON (decrements during the OFF 
period). 
R/W 
R/W 
R/W 


Behavior Definition 
1. ON Duration (0x0100): 
○ Default Value: 0. 
■ Relay stays ON persistently until an OFF command is issued. 
○ Non-Zero Value: The relay automatically turns OFF after the specified duration 
in seconds. 
2. OFF Duration (0x0101): 
○ Default Value: 0. 
■ Relay stays OFF persistently until an ON command is issued. 
○ Non-Zero Value: The relay automatically turns ON after the specified duration in 
seconds. 
3. Remaining ON Time (0x0102): 
○ Starts at the value set in ON Duration (0x0100) whenever the relay turns ON. 
○ Decrements every second during the ON period. 
○ Resets to 0 when the ON period ends or if ON Duration = 0. 
4. Remaining OFF Time (0x0103): 
○ Starts at the value set in OFF Duration (0x0101) whenever the relay turns 
OFF. 
○ Decrements every second during the OFF period. 
○ Resets to 0 when the OFF period ends or if OFF Duration = 0. 
Example Use Cases 
1. Timed ON and OFF Periods 
● ON Duration (0x0100): 120 seconds. 
● OFF Duration (0x0101): 60 seconds. 
Sequence: 
1. Relay receives ON command. 
○ Relay turns ON. 
○ Remaining ON Time (0x0102) starts at 120 seconds and decrements. 
○ After 120 seconds, the relay automatically turns OFF, and Remaining ON Time 
resets to 0. 
2. OFF timer starts. 
○ Remaining OFF Time (0x0103) starts at 60 seconds and decrements. 
○ After 60 seconds, the relay automatically turns ON again, and Remaining OFF 
Time resets to 0. 
3. This cycle repeats indefinitely, with the relay toggling between ON and OFF states 
according to the configured durations 
2. Persistent ON/OFF Behavior 
● ON Duration (0x0100): 0. 
● OFF Duration (0x0101): 0. 
Behavior: 
● Relay stays ON or OFF persistently until explicitly commanded. 
● Remaining ON Time (0x0102) and Remaining OFF Time (0x0103) remain at 0. 
3. Single ON Period with Manual Reset 
● ON Duration (0x0100): 180 seconds. 
● OFF Duration (0x0101): 0. 
Sequence: 
1. Relay receives ON command. 
○ Relay turns ON. 
○ Remaining ON Time (0x0102) starts at 180 seconds and decrements. 
○ After 180 seconds, the relay automatically turns OFF, and Remaining ON Time 
resets to 0. 
2. Since OFF Duration is 0, the relay remains OFF persistently until another ON command 
is issued. 
3. When an ON command is sent again, the cycle restarts with the relay staying ON for 180 
seconds before turning OFF. 
Implementation Requirements 
1. Add the New Registers: 
○ Allocate memory for 0x0100, 0x0101, 0x0102, and 0x0103. 
2. Update Firmware: 
○ Implement logic to: 
■ Start timers when ON/OFF commands are issued. 
■ Update Remaining ON/Remaining OFF registers in real time. 
■ Control relay state based on the timer logic. 
○ Ensure existing functionality (e.g., manual ON/OFF commands) is not affected. 
3. Backward Compatibility: 
○ Default values (0) for ON/OFF durations ensure no changes to existing behavior. 
4. Testing: 
○ Verify the behavior for edge cases (e.g., durations = 0, rapid ON/OFF 
commands). 
○ All interlocking modes remains. 
Benefits 
1. Flexible Control: 
○ Supports timed ON/OFF behavior for relays without continuous external 
commands. 
2. Real-Time Monitoring: 
○ Provides visibility into remaining ON/OFF times, aiding diagnostics and control. 
3. Backward Compatibility: 
○ Default behavior ensures existing use cases are not disrupted. 
4. Broader Applications: 
○ Ideal for scenarios like timed irrigation, lighting, or periodic control in automation 
systems. 
Request for Acknowledgment 
Please review the proposed changes and provide feedback or approval for implementation. Let 
us know if you require additional details or clarifications.

 

 

 

Custom resulted: 

 

Test Cases:

ON Duration = 0;
OFF Duration = 0;

ON Duration = 10;
OFF Duration = 0;

ON Duration = 0;
OFF Duration = 10;

ON Duration = 10;
OFF Duration = 5;

 

10IOA01 MODBUS RTU Commamd

MODBUS command (function code, write 05/06/15/16, read 01/02/03)

 

Note :

1 MODBUS command must be HEX

2 Slave ID (device address) must be consistent with the DIP switches (A0-A5)

 

 

Supported function codes:

Function Code

Modbus

Address (PLC)

Register Address

Describe

01: 

00001

0x0000

(0)

Read DO digital output status (relay)

05:

00001

0x0000

(0)

Write a single DO digital output (relay)

15:

00001

0x0000

(0)

Write multiple DO digital output (relay)

02:

10001

0x0000

(0)

Read DI digital input (optical isolation input)

03

40001

 

 

0x0080-0x00FF

(128-255)

 Read special function registers (baud rate 485 address, etc.)

06

40001

 

 

0x0080-0x00FF

(128-255)

Write a single special function register (baud rate 485 address, etc.)

16(0x10)

40001

 

 

0x0080-0x00FF

(128-255)

Write multiple special function registers (baud rate 485 address, etc.)

 

All states are mapped into 4xxxx range registers. The user can monitor the input and output status of the module by reading or modifying the value of the 4xxxx interval register (03 06 16 function code)

Register address

Register contents

Register value

Remarks

R/W

0x0000

(0)

ON Duration

0-65535 Seconds

Defines how long the relay stays ON after an ON command.

R/W

0x0001

(1)

OFF Duration

0-65535 Seconds

Defines how long the relay stays OFF after an OFF command.

R/W

0x0002

(2)

Remaining ON Time

0-65535 Seconds

Displays the remaining time before the relay turns OFF (decrements during the ON period).

R

0x0003

(3)

Remaining OFF Time

0-65535 Seconds

Displays the remaining time before the relay turns ON (decrements during the OFF period).

R

 

 

 

 

 

0x0080

(128)

DO digital output

0-65536

Digital output status 0 bits

R/W

0x0090

(144)

DI digital input

0

Digital input status 0 bits

R

 

 

 

 

 

0x00F7

(247)

Product ID

0-65535

  SKU        ID

10IOA01    1001

 

0x00F8

(248)

Automatic reporting of digital input(DI) status

0-255

0: Query function (default) 1-255: Automatically report, the unit is second.

1: Report every 1 second

2: Report every 2 seconds

10: Report every 10 seconds Maximum interval of 255 seconds

R/W

 

 

 

0x00FA

(250)

Input and output relationshipDI-DO relationship

0X0000-

0X0005

0x0000 Unrelated

0x0001 Self-locking (default)

0x0002 Interlocking

0x0003 Momentary

0x0004  Interlocking(2 ch)

0x0005  Output=Input

Other values are the same as 0

R/W

0x00FB

(251)

Factory Reset

00

Factory Reset

1 Short the RESET jumper for 5 seconds

2 Enter the following command at the current baud rate:

FF 06 00 FB 00 00 ED E5

R/W

0x00FC

(252)

Command Return Time

0-25

Time interval for command return (unit: 40MS) Setting value: 0-25

R/W

0x00FD

(253)

 

RS485 address

(Station address)

1-63

Products with DIP switches can only read

R

0x00FE

(254)

 

Baud rate

0-255

0:1200  1:2400   2:4800

3:9600(default4:19200

5:38400         6:57600  

7:115200

Others:Factory reset

R/W

0x00FF

(255)

 

Parity

0-2

0 None Parity

1 Odd Parity

2 Even Parity

R/W

 

9600 Band ,8 Data bits,None Parity,1 Stop Bit。

MODBUS commands you can use "Modbus Poll" input, as shown below

CRC check generated automatically

 

 

You can also use HyperTerminal serial input, as shown below

Manually add CRC check

 

 

 

 

 

Example (1-channel 1Di1Do relay):

1. Read DI digital input status (NPN photoelectric isolation input): Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

Modbus Address(PLC):10001

RS485 address : 0x01~0x3F

Function code:  0x02

Register address:0x0000

Read number :0x0001

 

For example, read the status of DI digital  input of channel 0:

Send data(address 1): 01 02 00 00 00 01 B9 CA

Return data         : 01 02 01 01 60 48 

01 RS485 address, 02 function code, 01 length, 01 refers to the current DI digital input status, converted to binary 00000001, indicating that 0 channels have input, and other channels have no input.

 

In addition, the DI digital input  is also mapped to the 40000 interval register. The user can read the value of the DI digital input  through the 03 function code.

 

Modbus Address(PLC)40145

RS485 address : 0x01~0x3F

Function code:0x03

Register address:0x0090

Read number: 0x0001

 

For example, read the status of DI digital  input of channel 0:

Send data(address 1): 01 03 00 90 00 01 84 27

Return data         : 01 03 02 00 01 79 84

01 RS485 address, 03 function code, 02 length, 0001 refers to the current DI digital input status, converted to binary 00000001, indicating that 0 channels have input.

 

 

2.Read DO digital output status (relay output):

Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

Modbus Address(PLC):00001-00002

RS485 address : 0x01~0x3F

Function code:  0x01

Register address:0x0000-0x0001

Read number :0x0001-0x0002

 

For example, read the status of DO digital output of channel 0:

Send data(address 1): 01 01 00 00 00 01 FD CA

Return data         : 01 01 01 01 90 48 

01 RS485 address, 01 function code, 01 length, 01 refers to the current DO digital output status, converted to binary 00000001, indicating that 0 channels have output.

 

In addition, the DO digital output  is also mapped to the 40000 interval register. The user can read the value of the DO digital output  through the 03 function code.

 

Modbus Address(PLC):40129

RS485 address : 0x01~0x3F

Function code:0x03

Register address:0x0080

Read number: 0x0001

 

For example, read the status of DO digital  output of channel 0-3:

Send data(address 1): 01 03 00 80 00 01 85 E2

Return data         : 01 03 02 00 00 B8 44 

01 RS485 address, 03 function code, 02 length, 0003 refers to the current DO digital output status, converted to binary 00000000, indicating that 0 channel have no output.

 

 

 

 

3. Write single DO digital output status (relay output):

Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

Modbus Address(PLC):00001-00002

RS485 address : 0x01~0x3F

Function code:0x05

Register address:0x0000-0x0001

 

For example 1, Write channel 0 to ON:

Send data(address 1):01 05 00 00 FF 00 8C 3A

Return data         :01 05 00 00 FF 00 8C 3A

 

For example 2, Write channel 1 to OFF:

 

Send data(address 1):01 05 00 00 00 00 CD CA

Return data         :01 05 00 00 00 00 CD CA

 

 

In addition, the DO digital output is also mapped to the 40000 interval register. The user can write the DO digital output value through the 06/16 function code.

 

Modbus Address(PLC):40129

RS485 address :0x01~0x3F

Function code:0x06/0x10

Register address:0x0080

 

For example, Write channel 0/1 to ON:

Send data(address 1):01 06 00 80 00 01 49 E2  

Return data         :01 06 00 80 00 01 49 E2

 

 

 

 

 

 

4.Write multiple DO digital output status (relay output):

Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

Modbus Address(PLC):00001

RS485 address :0x01~0x3F

Function code:0x0F

Register address:0x0000

 

For example 1, Write channel 0 to OFF:

Send data(address 1):01 0F 00 00 00 01 01 00 2E 97

Return data         :01 0F 00 00 00 01 94 0B  

 

For example 1, Write channel 0 ON:

Send data(address 1):01 0F 00 00 00 01 01 01 EF 57

Return data         :01 0F 00 00 00 01 94 0B

 

 

 

In addition, the DO digital output is also mapped to the 40000 interval register. The user can write the DO digital output value through the 06/16 function code.

 

Modbus Address(PLC):40129

RS485 address :0x01~0x3F

Function code:0x06/0x10

Register address:0x0080

 

For example, Write channel 0 to ON:

Send data(address 1):01 06 00 80 00 01 49 E2    

Return data         :01 06 00 80 00 01 49 E2

 

 

 

 

 

 

Special function Register 

1.Write baud rate

Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

Modbus Address(PLC):40255

RS485 address :0x01~0x3F

Function code:Write 0x06/0x16;Read 0x03

Register address:0x00FE(254)

Value: 2 bytes (values 0-7)

 

For example 1, Change the baud rate to 4800bps:

Send data(address 1):01 06 00 FE 00 02 69 FB

Return data         :01 06 00 FE 00 02 69 FB

 

Baud rate corresponds to the number: 0:1200  1:2400  2:4800 3:9600  4:19200  6:57600  7 115200 8: Factory reset

Note: 1 The baud rate will be updated only when the module is powered on again when this command is used!       

  2 When the number corresponding to the baud rate is 8, the factory settings can be restored

For example:01 06 00 FE 00 08 E9 FC

 

For example 2  Read the current baud rate:

Send data(address 1):01 03 00 FE 00 01 E5 FA

Return data         :01 03 02 00 03 F8 45

 

01 RS485 address,03 Function,02 length,F8 45 crc16,03 means the current baud rate is 9600bps

 

Baud rate corresponds to the number: 0:1200  1:2400  2:4800 3:9600  4:19200  6:57600  7 115200

 

 

 

2. Set digital input and output relationship (DI-DO relationship):

Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

Modbus Address(PLC):40251

RS485 address :0x01~0x3F

Function code:Write 0x06/0x16;Read 0x03

Register address:0x00FA(250)

Value: 2 bytes (values 0-5)

 

For example, set the input and output to be unrelated, and change the register value to 0X0000:

Send data(address 1):01 06 00 FA 00 00 A9 FB

Return data         :01 06 00 FA 00 00 A9 FB

 

Register value:

0x0000 Unrelated

0x0001 Self-locking relationship (default)

0x0002 Interlocking relationship

0x0003 Momentary relationship

0x0004  Interlocking relationship (2 channels)

0x0005  Output=Input 

Other values are the same as 0x0000

 

For example: read the current input-output relationship

Send data(address 1):01 03 00 FA 00 01 A4 3B

Return data         :01 03 02 00 01 79 84

01 RS485 address,03 Function,02 length 0001is Self-locking relationship

,15 FA crc16

 

 

 

 

 

 

 

 

3. Set DI digital input status to automatically report (4 channels are set at the same time):(Automatic reporting of digital input(DI) status)

Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

Modbus Address(PLC):40249

RS485 address :0x01~0x3F

Function code:Write 0x06/0x16;Read 0x03

Register address:0x00F8(248)

Value: 2 bytes (values 0-255)

 

For example : For example, the current query function should be changed to automatic reporting:

 

1 second automatic report : 01 06 00 F8 00 01 C9 FB

2 second automatic report : 01 06 00 F8 00 02 89 FA

3 second automatic report : 01 06 00 F8 00 03 48 3A

4 second automatic report : 01 06 00 F8 00 04 09 F8

5 second automatic report : 01 06 00 F8 00 05 C8 38

10 second automatic report : 01 06 00 F8 00 0A 88 3C

 

Disable reporting function(Query function): 01 06 00 F8 00 00 08 3B

 

4.Set Command(Date) Return Time

Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

 

 

Modbus Address(PLC):40253

RS485 address :0x01~0x3F

Function code:Write 0x06/0x16;Read 0x03

Register address:0x00FC(252)

Value: 2 bytes (values 0-25)

 

For example, set the data return delay to 200ms

Send data(address 1):01 06 00 FC 00 05 89 F9

Return data         :01 06 00 FC 00 05 89 F9

Return the delay time calculation formula:X = 05 * 40 = 200MS

 

Note: The maximum can be set to 1000MS. If it exceeds 1000MS, that is, the setting value is greater than 25, and the data return delay will be initialized.

That is: 01 06 00 FC 00 20 48 22 can make the data return delay to restore initialization 0

 

5.Set Parity

Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

 

Modbus Address(PLC):40256

RS485 address :0x01~0x3F

Function code:Write 0x06/0x16;Read 0x03

Register address:0x00FF(255)

Value: 2 bytes (values 0-2)

 

For example, set the parity to even parity

Send data(address 1):01 06 00 FF 00 01 78 3A

Return data         :01 06 00 FF 00 01 78 3A

0 None Parity 1 Odd Parity  2 Even Parity 

Note: 1. When using this command, the module is powered on again, and the check digit will be updated!

2. When the setting is greater than 2, the default value will be restored to 0 after powering on again, and there will be no verification.

 

 

6.Factory reset:

Send data

RS485 address

(Station address) 

(1)

Function (1)

Register address (2)

Read number (2)

CRC16(2)

Returns data

RS485 address

(Station address) 

(1)

Function (1)

Number of bytes  (1)

data (n)

CRC16(2)

Modbus Address(PLC):40252

RS485 address : 0x01~0x3F

Function code:Write 0x06;

Register address:0x00FB(251)

Send data(address 1):FF 06 00 FB 00 00 ED E5

Return data         :FF 06 00 FB 00 00 ED E5

 

Hardware reset: short the RESET jumper of the board for 5 seconds, then power on again.

 

Back to blog