Skip to content

Y301-220/222 Technical Manual

Y301-220Y301-222
Y301-220Y301-222

Contents

  1. Overview
  2. Default Settings
  3. Modbus Register Map
  4. Command Examples
  5. Parameter Configuration
  6. Automation Rules
  7. Troubleshooting

1. Overview

This manual describes the Modbus RTU communication commands for the Y301-220 and Y301-222 I/O modules.

ModelDIDOAIDescription
Y301-220220Dual input + dual relay
Y301-222222Dual input + dual relay + dual analog input

Frame format: [slave address][function code][data][CRC low][CRC high]

The examples below use slave address 0x01. Replace it with the actual device address in your application.


2. Default Settings

ParameterDefault
Slave address1
Baud rate9600 bps
Data bits8
ParityNone
Stop bits1

3. Modbus Register Map

3.1 Digital Input (DI) - Function Code 0x02

ChannelAddressSupported Models
DI10x0000Y301-220, Y301-222
DI20x0001Y301-220, Y301-222

Return value: 0 = inactive, 1 = active.

3.2 Digital Output (DO) - Function Code 0x01/0x05

ChannelAddressSupported Models
DO10x0000Y301-220, Y301-222
DO20x0001Y301-220, Y301-222

Write value: 0x0000 = open, 0xFF00 = closed.

3.3 Analog Input (AI) - Function Code 0x04 (Y301-222 only)

ChannelAddressDescription
AI1 voltage0x0000Voltage value in mV
AI1 current0x0001Current value in uA
AI2 voltage0x0002Voltage value in mV
AI2 current0x0003Current value in uA

Each AI channel can be wired for either voltage or current. The other reading is invalid.

3.4 Configuration Registers - Function Code 0x03/0x06

AddressParameterRangeDefault
0x003ESlave address1-2551
0x0057Baud rate600-2304009600
0x0059Data bits8 or 98
0x005AStop bits1 or 21
0x005BParity0=None, 1=Odd, 2=Even0

4. Command Examples

4.1 Read Digital Inputs

Read DI1:

text
Request:  01 02 00 00 00 01 B9 CA
Response: 01 02 01 [status] [CRC]

Read DI2:

text
Request: 01 02 00 01 00 01 E8 0A

4.2 Read Digital Output Status

Read DO1:

text
Request:  01 01 00 00 00 01 FD CA
Response: 01 01 01 [status] [CRC]

Read DO2:

text
Request: 01 01 00 01 00 01 AC 0A

4.3 Control Digital Outputs

OperationCommand
Open DO101 05 00 00 00 00 CD CA
Close DO101 05 00 00 FF 00 8C 3A
Open DO201 05 00 01 00 00 9C 0A
Close DO201 05 00 01 FF 00 DD FA

4.4 Read Analog Inputs (Y301-222 only)

Read AI1 voltage:

text
Request:  01 04 00 00 00 01 31 CA
Response: 01 04 02 [high byte] [low byte] [CRC]

Read AI1 current:

text
Request: 01 04 00 01 00 01 60 0A

Read AI2 voltage:

text
Request: 01 04 00 02 00 01 90 0A

Read AI2 current:

text
Request: 01 04 00 03 00 01 C1 CA

4.5 Quick Reference Table

OperationRequest (Hex)
Read DI101 02 00 00 00 01 B9 CA
Read DI201 02 00 01 00 01 E8 0A
Read DO101 01 00 00 00 01 FD CA
Read DO201 01 00 01 00 01 AC 0A
Open DO101 05 00 00 00 00 CD CA
Close DO101 05 00 00 FF 00 8C 3A
Open DO201 05 00 01 00 00 9C 0A
Close DO201 05 00 01 FF 00 DD FA
Read AI1 voltage01 04 00 00 00 01 31 CA
Read AI1 current01 04 00 01 00 01 60 0A
Read AI2 voltage01 04 00 02 00 01 90 0A
Read AI2 current01 04 00 03 00 01 C1 CA

5. Parameter Configuration

5.1 Change the Slave Address

Set the slave address to 5:

text
Request:  01 06 00 3E 00 05 E8 00
Response: 01 06 00 3E 00 05 E8 00

After the change, subsequent commands must use the new address.

5.2 Change the Baud Rate

Common baud-rate values:

Baud RateValue
96000x00002580
192000x00004B00
384000x00009600
1152000x0001C200

Power-cycle the device after changing the baud rate.

5.3 Restore Factory Defaults

Hold the Reload button for 3-15 seconds to restore:

  • Slave address -> 1
  • Baud rate -> 9600
  • All parameters -> factory defaults

6. Automation Rules

The Y301-220/222 support DI -> DO automation, and the Y301-222 also supports AI threshold triggering.

6.1 Automation Register Map

Rules start at address 0x0080. Each rule uses 8 registers (16 bytes). Up to 4 rules are supported, with 2 rules per DO.

OffsetFieldDescription
+0ModeRule type (see table below)
+1Action0=open, 1=close, 2=toggle
+2DO indexTarget relay, starting from 1
+3Trigger indexSource DI or AI, starting from 1
+4-5Parameter 1Mode-dependent, 32-bit
+6-7Parameter 2Mode-dependent, 32-bit

6.2 Rule Modes

ModeNameDescription
0DI followDO follows the DI state
1DI inverseDO is the inverse of the DI state
2PulseDO outputs a pulse for parameter1 ms when DI triggers
3Delayed ONDO closes parameter1 ms after DI closes
4Delayed OFFDO opens parameter1 ms after DI opens
5CycleDO toggles periodically, parameter1=ON time, parameter2=OFF time
10AI thresholdTrigger when AI exceeds parameter1 (Y301-222 only)

6.3 Example: DO1 Follows DI1

Configuration:

FieldValue
Mode0x0000 (DI follow)
Action0x0001 (close when DI=1)
DO index0x0001
Trigger index0x0001
Parameter 10x00000000
Parameter 20x00000000

Modbus command:

text
01 10 00 80 00 08 10 00 00 00 01 00 01 00 01 00 00 00 00 00 00 00 00 0D FE

6.4 Example: Close DO1 When AI1 Exceeds 5 V (Y301-222 only)

Configuration:

FieldValue
Mode0x000A (AI threshold)
Action0x0001 (close)
DO index0x0001
Trigger index0x0001 (AI1)
Parameter 10x00001388 (5000 mV)
Parameter 20x000003E8 (minimum trigger interval 1000 ms)

7. Troubleshooting

SymptomCauseSolution
No responseWrong address or baud rateCheck settings and try broadcast address 0
CRC errorWiring issue or interferenceCheck RS485 polarity and add termination resistors
DO does not switchLoad exceeds ratingReduce the load and verify contact ratings
DI always reads 0Wiring errorCheck COM/DI wiring and input voltage
AI reading is abnormalWrong wiring modeVerify voltage/current wiring; each channel supports only one mode at a time

LED Indicators

LEDStatusMeaning
POWERSolid onPower is normal
TXFlashingData is being transmitted
RXFlashingData is being received
DI1/DI2OnInput is active
DO1/DO2OnRelay is closed