2024年10月7日发(作者:哀梦秋)
Application Note
AN238
Raveon Technologies Corp
Applicatoin Note
AN238
Rev A2
GPIO Open Collector/Drain Output
By John Sonnenberg Raveon Technologies Corp
Summary
Raveon has products with various IO options, some of which include Open Drain (OD)
or Open Collector (OC) outputs. This Application Note AN238 describes how these
kinds of features can be used. These IOs are used to turn things on and off.
The RV-M21G and RV-M22G Tech Series radios with the
GPIO interface can be configured to have an Open Collector
output. Here is a picture of the RV-M21G. This document
refers to these M21 and M22 radios at RV-M2x data radios.
The RV-M22 is smaller than the RV-M21 version, but less RF
output power also.
Open Drain outputs are great for turning on lights, valves,
relays, and many other devices. Open Drain (OD) connects
the load to ground when it is turned on.
GPIO Interface on RV-M21 and RV-M22 Data Radios
The General Purpose IO (GPIO) front panel interface has many IO options on 3 pins to
remotely control things or monitor things. Pins 3,4,5 are configurable.
A: Digital TTL Inputs,
C: Open Drain MOSFET
D: DC Power switch outputs.
E: Analog Voltage Inputs.
GPIO uses the same IO connector as the RS-485, and has serial IO and general
purpose IO functions that are software configurable. .
Pin #
1
2
3
4
5
6
Name
RX
TX
IO0
IO1
IO2
GND
Directio
n
Function
Serial data Input
Serial Data
Output
I/O Pin 0
I/O Pin 1
I/O Pin 2
Ground
Level / Specification
RS232
RS232
Configurable General Purpose IO
Configurable General Purpose IO
Configurable General Purpose IO
Connect to earth ground.
In
Out
I/O
I/O
I/O
-
Copyright 2018 1 Raveon Technologies Corp.
Open Drain vs Open Collector
Open Drain means the semiconductor’s output port is directly connected to the "drain"
pin of a MOSFET. It is similar to "Open Collector", where the output port is on a
collector of a TRANSISTOR. OC is a traditional way, but OD is more power full and
more reliable, so we provide Open Drain output to drive relays, lights, and other
devices.
Enabling the GPIO Open Drain feature
Raveon’s Tech Series Radios GPIO General Purpose IO interface pins can be
configured in different ways.
Connect an RS232 serial port to the RX in and TX out
pins of the GPIO interface to send commands and
data into the product. See the user manual on how to
enter the command mode. (+++ enters command
mode)
To set the IO pin to Open Drain mode, have Raveon
configure the radio before shipped to you, or use the
IOPIN command to configure it.
Application Note
AN238
Raveon Technologies Corp
IOPIN XX M is the command to set the GPIO bits on the Tech Series GPIO front panel to
inputs or outputs. Enter IOPIN
XX parameter are the Hexadecimal representation of the pins being configured. For example, to
configure bits 0 and 1, XX should be set to 3. FYI: GPIO pin #4 is called IO1 and is
designated as XX bit 1, which in hex is XX=02.
GPIO Connector Pin #
Index
IO Pin Name
XX value to identify the pin.
Add these up to identify multiple values.
5
2
IO2
4
4
1
IO1
2
3
0
IO0
1
XX is Hexadecimal. To specify all 3 IO pins IO0-IO2, the XX value is 7.
(4+2+1)
M is the IO Type code A: Digital TTL Inputs, B: Digital TTL Outputs, C: Open Drain
MOSFET outputs, D: DC Power switch outputs, E: Analog Voltage Inputs. Different products
have different varieties of GPIO features. Check your product’s data sheets to see what GPIO
features it supports on which IO pins.
IOPIN 1 C command sets The IO pin 0 (first pin) to Open Drain mode.
IOPIN 1 C command sets The IO pin 0 (first pin) to Open Drain mode.
IOPIN 2 C command sets The IO pin 1 to Open Drain mode.
IOPIN 7 C command sets all 3 IO pins to Open Drain mode.
How Open Drain works
Inside Raveon’s products with GPIO and Open Collector (OD) features, there is an OD output
pin connected to the collector of a MOSFET inside the product. The MOSFET is also connected
to the ground of the product.
Copyright 2018 3 Raveon Technologies Corp.
Use Open Drain for enabling: Lights, Relays, LEDs, Valves, AC power switches …
When the GPIO pin is OD mode, and the output is SET, the MOSFET is turned on, and the IO
pin is shored to ground (GND). The device connected to OD will normally be connected to a
voltage power supply (Vcc) or a battery. When the OD pin shorts to ground the device will turn
on. The device can be an LED, light, relay, valve, or many other devices. Devices with inductors,
such as a relays, should have a diode connected to the device so that the voltage spike that is
generated when its turns on and off gets limited.
Use a diode to protect the GPIO interface and keep the wires safe. There are many ways to
reduce voltage spikes when switching a relay. Some add capacitors, some add extra diodes with
resistors. Do the right thing for your system. The Tech Series GPIO interface uses a MOSFET
like the NXP PMV130ENEA . Its specs are:
drain-source voltage : 40V
Max drain current: 2.1A
junction temperature -55 to 150C
electrostatic discharge voltage 1000V
Using the Open Drain (OD) feature
Power on default mode on OD IO pins is open. The OD output is not shorted to ground when the
device powers on. When the device receives an command via the local serial port or over the air
using the radio modem, a command can turn on the OD making the OD IO pin short to ground.
See the product’s data sheet for information about resistance to ground and maximum current
that should be drawn from the IO pin when the open drain is shored to ground.
There are a number of ways to enable on the Open Drain output.
A. Local commands in the command mode.
B. Remote Over The Air (OTA) commands sent to the products.
C. Remote Over The Air (OTA) MODBUS messages sent to the product.
Local commands in the command mode
See the product’s Technical Manual or User Manual for a list of commands that the
product supports. Most products with GPIO support these local commands that can by
typed into the product, or sent via software, when the product is in the Command Mode.
Raveon products can also utilize a serial port protocol called WMX. WMX enables a
user to send commands into a data radio product when it is in operating mode, not
command mode, and the WMX command will still be executed in operating mode.
Here are the commands the RV-M21 and RV-M22 Tech Series radios support.
Command
Command Description
MODB x Enable or disable the MODBUS communication feature.
0=disable. 1=MODBUS RTU mode. 3=MODBUS TCP (If available on the
product)
Parameters
X: 1-3 0=No
MODBUS
Default
Settings
0
MODB
Application Note
AN238
Raveon Technologies Corp
CBIT
SBIT
CBIT XX Clears output bits, XX is hexadecimal format. Any bit in x set to
1 will cause the same output bit in the modem’s output register to be
cleared to 0. No bits get set. X=C3 to set bits 0, 1, 14, 15. To read the
output bit register, enter CLRBIT with no parameter or better to use
GETOUT command.
SBIT XX Sets output bits, XX is hexadecimal format of the bits being set.
Any bit in x set to 1 will cause the same output bit in the modem’s output
register to be set. No bits get cleared. X=C3 to set bits 0, 1, 14, 15. To
read the output bit register, enter SETBIT with no parameter or better to
use GETOUT command.
TBIT XX MMM Sets output bits for a specific time, XX is hexadecimal
format of the bits. Any bit in x set to 1 will cause the same output bit in the
modem’s output register to be set. MMM is in mS. 1000=one second,
60000=one minute,…To set bit #3 to 1 for 250mS: TBIT 4 250 After the
time expires, the bits that was st in XX is cleared to 0.
0-FF
0
0-FF
0-FF
2 – 4000000000
(2mS – 1100hours)
TBIT
CBIT command is to clear a bit. It will disable the Open Drain, and the IO output will not
connect to ground if the output is cleared with the CBIT command.
SBIT command is to set a bit. It will turn on the Open Drain, and the IO output will
connect to ground with the SBIT command if the parameters of the SBIT are for the OD
IO pin that is used and configured for OD.
TBIT command is to set a bit for some time. It will turn on the Open Drain for some time.
The IO output will connect to ground with the SBIT command if the parameters of the
SBIT are for the OD IO pin that is used and configured for OD. The specified OD IO pin
will stay shored to ground for the number of mS specified in the TBIT command.
To enable MODBUS protocol reception on the device, execute the MODB X command.
MODB 1 to enable RTU MODBUS.
WMX commands
All of the Local Commands specified above can be executed with the
WMX message. WMX can be enabled on the product with the
command WMX 1.
See the WMX Technical Node .PDF and the WMX user manual for more WMX
information.
Your custom software can issue WMX messages into a data radio and the message will
be processed. If you pass in a WMX message to a modem, that has the TOID set to the
ID of a remote radio you want the message to be sent to, the radio will send the data in
the WMX message to the remote radio. If you tagged the WMX message as a
“Command” the remote radio will execute the command when it receives the
transmission from the radio that you passed the WMX message into.
WMX can pass over two types of data: 1) Actual rad message data. 2)Commands to be
executed. Because it has the command feature, you can pass those SBIT, CBIT, TBIT
or any other command into a modem using WMX commands messages, and the get
sent over-the-air to the remote radio or SCADA device and the command is executed
remotely.
Over the air WMX command can set and clear the Open Drain IO pins. Most WMX
users have incorporated the WMX protocol into their master controller software. One
Copyright 2018 5 Raveon Technologies Corp.
Raveon’s website is a free software tool called Radio Manager. Radio Manager is for
communication to radios via serial ports or TCP/IP connects. It also has a WMX feature
to send and receive WMX messages so you can experiment with WMX.
MODBUS commands
The RV-M21 and RV-M22 Tech Series radios have a communication feature option that
is compatible with the MODBUS RTU protocol.
You Master Controller computer will pass a
MODBUS message to a Data Radio modem. The
Radio modem connected to your PC will transmit
the message to the RV-M2x Tech Series radio that
will process the MODBUS message, and send the
response.
For more information about MODBUS RTU messages, see
/modbus-information/ or read Raveon’s app note AN234 for
SCADA and MODBUS info about Raveon’s SCADA products. In the RV-M21 data radio
modem’s software must be version D30 or larger to utilize MODBUS.
Raveon Application note AN230 contains all information about using the MODBUS
protocol AN230 (ModbusMx)
With Raveon’s Products that have GPIO interfaces with Open Drain, such as the RV-
M21 and RV-M2 data radio modems.
MODBUS RTU Commands
Modbus is a registered trademark of MODICON, Inc.
Messages sent from devices that utilize SCADA and Telemetry protocols such as
MODBUS RTU are often called “Telegrams”. The MODBUS function 5 (Force single
coil) can be used to set of clear the Open Drain IO pins.
Modbus data is specified as big-endian, which means the most significant value is at the
lowest address.
(05) Force single coil to turn on the Open Drain.
To set the state of output bits and Open Drain (OD) pins (MODBUS refers to them
“coils”), function code 05 is used to send the set command to the remote device. To set
a OD open (coil off) (0) send 0x0000 and to enable and Open Drain output (coil on) (1)
send 0x00FF. The data per OD output are two bytes.
When broadcast, the same function forces the same data output in all attached slave
devices.
Function code 05 (Force Coil Status) is the code used in MODBUS to send a message
to control an Open Drain. The command structure is:
Application Note
AN238
Raveon Technologies Corp
Byte 0:
Byte 1:
Byte 2:
Byte 3:
Byte 4:
Byte 5:
Byte 6:
Byte 7:
Slave Address. The ID of the RTU device
Function Code for this message. 05
Coil Address MSB
Coil Address LSB
Data Force MSB
Data Force LSB
Error Check Low Byte (LSB)
Error Check High Byte (MSB)
The structure of the 05 (Force Coil Status) response back is:
Byte 0:
Byte 1:
Byte 2:
Byte 2 and 4:
2 CRC Bytes
Slave Address. The ID of the RTU device
Function Code for this message. 02
Byte Count (N)
The response Data bytes containing the output
bit status. 0x0000=0 0x00FF=1
Error Check
So for example, the telegram to set bit #2 (Coil address 2) on device 150(0x96) is:
Request: 96 05 00 02 FF 00 31 1D
Response: 96 05 00 02 FF 00 31 1D
(it reported coil 2 is on)
The Register control coils in MODBUS is referred to as a “Coil Address” In Applciation
note AN230, Raveon’s register list has the register number (Coil address) for all the IO
pins and SCADA features that can be accessed with the MODBUS SCADA protocol.
IO0 is Register 1. IO1 is Register 2, IO2 is Register 3. Use these register numbers to
execute MODBUS messages that set coils or read coil status.
For Example, to turn on the Open Drain output (Pin to Ground) for device 30 (0x1E)
using a MODBUS “Force Single Coil” message which used function code 5, here are
some example messages in hex bytes. Each are 8 bytes long.
Device Function Register Data CRC
IO0 On:
IO1 On:
IO2 On:
1E
1E
1E
05
05
05
00 01
00 02
00 03
FF 00
FF 00
FF 00
DF 95
2F 95
7E 55
Copyright 2018 7 Raveon Technologies Corp.
For additional information, contact:
Raveon Technologies Corporation
2320 Cousteau Court
Vista, CA 92081 - USA
Phone: 1-760-444-5995
Fax: 1-760-444-5997
Email:****************
2024年10月7日发(作者:哀梦秋)
Application Note
AN238
Raveon Technologies Corp
Applicatoin Note
AN238
Rev A2
GPIO Open Collector/Drain Output
By John Sonnenberg Raveon Technologies Corp
Summary
Raveon has products with various IO options, some of which include Open Drain (OD)
or Open Collector (OC) outputs. This Application Note AN238 describes how these
kinds of features can be used. These IOs are used to turn things on and off.
The RV-M21G and RV-M22G Tech Series radios with the
GPIO interface can be configured to have an Open Collector
output. Here is a picture of the RV-M21G. This document
refers to these M21 and M22 radios at RV-M2x data radios.
The RV-M22 is smaller than the RV-M21 version, but less RF
output power also.
Open Drain outputs are great for turning on lights, valves,
relays, and many other devices. Open Drain (OD) connects
the load to ground when it is turned on.
GPIO Interface on RV-M21 and RV-M22 Data Radios
The General Purpose IO (GPIO) front panel interface has many IO options on 3 pins to
remotely control things or monitor things. Pins 3,4,5 are configurable.
A: Digital TTL Inputs,
C: Open Drain MOSFET
D: DC Power switch outputs.
E: Analog Voltage Inputs.
GPIO uses the same IO connector as the RS-485, and has serial IO and general
purpose IO functions that are software configurable. .
Pin #
1
2
3
4
5
6
Name
RX
TX
IO0
IO1
IO2
GND
Directio
n
Function
Serial data Input
Serial Data
Output
I/O Pin 0
I/O Pin 1
I/O Pin 2
Ground
Level / Specification
RS232
RS232
Configurable General Purpose IO
Configurable General Purpose IO
Configurable General Purpose IO
Connect to earth ground.
In
Out
I/O
I/O
I/O
-
Copyright 2018 1 Raveon Technologies Corp.
Open Drain vs Open Collector
Open Drain means the semiconductor’s output port is directly connected to the "drain"
pin of a MOSFET. It is similar to "Open Collector", where the output port is on a
collector of a TRANSISTOR. OC is a traditional way, but OD is more power full and
more reliable, so we provide Open Drain output to drive relays, lights, and other
devices.
Enabling the GPIO Open Drain feature
Raveon’s Tech Series Radios GPIO General Purpose IO interface pins can be
configured in different ways.
Connect an RS232 serial port to the RX in and TX out
pins of the GPIO interface to send commands and
data into the product. See the user manual on how to
enter the command mode. (+++ enters command
mode)
To set the IO pin to Open Drain mode, have Raveon
configure the radio before shipped to you, or use the
IOPIN command to configure it.
Application Note
AN238
Raveon Technologies Corp
IOPIN XX M is the command to set the GPIO bits on the Tech Series GPIO front panel to
inputs or outputs. Enter IOPIN
XX parameter are the Hexadecimal representation of the pins being configured. For example, to
configure bits 0 and 1, XX should be set to 3. FYI: GPIO pin #4 is called IO1 and is
designated as XX bit 1, which in hex is XX=02.
GPIO Connector Pin #
Index
IO Pin Name
XX value to identify the pin.
Add these up to identify multiple values.
5
2
IO2
4
4
1
IO1
2
3
0
IO0
1
XX is Hexadecimal. To specify all 3 IO pins IO0-IO2, the XX value is 7.
(4+2+1)
M is the IO Type code A: Digital TTL Inputs, B: Digital TTL Outputs, C: Open Drain
MOSFET outputs, D: DC Power switch outputs, E: Analog Voltage Inputs. Different products
have different varieties of GPIO features. Check your product’s data sheets to see what GPIO
features it supports on which IO pins.
IOPIN 1 C command sets The IO pin 0 (first pin) to Open Drain mode.
IOPIN 1 C command sets The IO pin 0 (first pin) to Open Drain mode.
IOPIN 2 C command sets The IO pin 1 to Open Drain mode.
IOPIN 7 C command sets all 3 IO pins to Open Drain mode.
How Open Drain works
Inside Raveon’s products with GPIO and Open Collector (OD) features, there is an OD output
pin connected to the collector of a MOSFET inside the product. The MOSFET is also connected
to the ground of the product.
Copyright 2018 3 Raveon Technologies Corp.
Use Open Drain for enabling: Lights, Relays, LEDs, Valves, AC power switches …
When the GPIO pin is OD mode, and the output is SET, the MOSFET is turned on, and the IO
pin is shored to ground (GND). The device connected to OD will normally be connected to a
voltage power supply (Vcc) or a battery. When the OD pin shorts to ground the device will turn
on. The device can be an LED, light, relay, valve, or many other devices. Devices with inductors,
such as a relays, should have a diode connected to the device so that the voltage spike that is
generated when its turns on and off gets limited.
Use a diode to protect the GPIO interface and keep the wires safe. There are many ways to
reduce voltage spikes when switching a relay. Some add capacitors, some add extra diodes with
resistors. Do the right thing for your system. The Tech Series GPIO interface uses a MOSFET
like the NXP PMV130ENEA . Its specs are:
drain-source voltage : 40V
Max drain current: 2.1A
junction temperature -55 to 150C
electrostatic discharge voltage 1000V
Using the Open Drain (OD) feature
Power on default mode on OD IO pins is open. The OD output is not shorted to ground when the
device powers on. When the device receives an command via the local serial port or over the air
using the radio modem, a command can turn on the OD making the OD IO pin short to ground.
See the product’s data sheet for information about resistance to ground and maximum current
that should be drawn from the IO pin when the open drain is shored to ground.
There are a number of ways to enable on the Open Drain output.
A. Local commands in the command mode.
B. Remote Over The Air (OTA) commands sent to the products.
C. Remote Over The Air (OTA) MODBUS messages sent to the product.
Local commands in the command mode
See the product’s Technical Manual or User Manual for a list of commands that the
product supports. Most products with GPIO support these local commands that can by
typed into the product, or sent via software, when the product is in the Command Mode.
Raveon products can also utilize a serial port protocol called WMX. WMX enables a
user to send commands into a data radio product when it is in operating mode, not
command mode, and the WMX command will still be executed in operating mode.
Here are the commands the RV-M21 and RV-M22 Tech Series radios support.
Command
Command Description
MODB x Enable or disable the MODBUS communication feature.
0=disable. 1=MODBUS RTU mode. 3=MODBUS TCP (If available on the
product)
Parameters
X: 1-3 0=No
MODBUS
Default
Settings
0
MODB
Application Note
AN238
Raveon Technologies Corp
CBIT
SBIT
CBIT XX Clears output bits, XX is hexadecimal format. Any bit in x set to
1 will cause the same output bit in the modem’s output register to be
cleared to 0. No bits get set. X=C3 to set bits 0, 1, 14, 15. To read the
output bit register, enter CLRBIT with no parameter or better to use
GETOUT command.
SBIT XX Sets output bits, XX is hexadecimal format of the bits being set.
Any bit in x set to 1 will cause the same output bit in the modem’s output
register to be set. No bits get cleared. X=C3 to set bits 0, 1, 14, 15. To
read the output bit register, enter SETBIT with no parameter or better to
use GETOUT command.
TBIT XX MMM Sets output bits for a specific time, XX is hexadecimal
format of the bits. Any bit in x set to 1 will cause the same output bit in the
modem’s output register to be set. MMM is in mS. 1000=one second,
60000=one minute,…To set bit #3 to 1 for 250mS: TBIT 4 250 After the
time expires, the bits that was st in XX is cleared to 0.
0-FF
0
0-FF
0-FF
2 – 4000000000
(2mS – 1100hours)
TBIT
CBIT command is to clear a bit. It will disable the Open Drain, and the IO output will not
connect to ground if the output is cleared with the CBIT command.
SBIT command is to set a bit. It will turn on the Open Drain, and the IO output will
connect to ground with the SBIT command if the parameters of the SBIT are for the OD
IO pin that is used and configured for OD.
TBIT command is to set a bit for some time. It will turn on the Open Drain for some time.
The IO output will connect to ground with the SBIT command if the parameters of the
SBIT are for the OD IO pin that is used and configured for OD. The specified OD IO pin
will stay shored to ground for the number of mS specified in the TBIT command.
To enable MODBUS protocol reception on the device, execute the MODB X command.
MODB 1 to enable RTU MODBUS.
WMX commands
All of the Local Commands specified above can be executed with the
WMX message. WMX can be enabled on the product with the
command WMX 1.
See the WMX Technical Node .PDF and the WMX user manual for more WMX
information.
Your custom software can issue WMX messages into a data radio and the message will
be processed. If you pass in a WMX message to a modem, that has the TOID set to the
ID of a remote radio you want the message to be sent to, the radio will send the data in
the WMX message to the remote radio. If you tagged the WMX message as a
“Command” the remote radio will execute the command when it receives the
transmission from the radio that you passed the WMX message into.
WMX can pass over two types of data: 1) Actual rad message data. 2)Commands to be
executed. Because it has the command feature, you can pass those SBIT, CBIT, TBIT
or any other command into a modem using WMX commands messages, and the get
sent over-the-air to the remote radio or SCADA device and the command is executed
remotely.
Over the air WMX command can set and clear the Open Drain IO pins. Most WMX
users have incorporated the WMX protocol into their master controller software. One
Copyright 2018 5 Raveon Technologies Corp.
Raveon’s website is a free software tool called Radio Manager. Radio Manager is for
communication to radios via serial ports or TCP/IP connects. It also has a WMX feature
to send and receive WMX messages so you can experiment with WMX.
MODBUS commands
The RV-M21 and RV-M22 Tech Series radios have a communication feature option that
is compatible with the MODBUS RTU protocol.
You Master Controller computer will pass a
MODBUS message to a Data Radio modem. The
Radio modem connected to your PC will transmit
the message to the RV-M2x Tech Series radio that
will process the MODBUS message, and send the
response.
For more information about MODBUS RTU messages, see
/modbus-information/ or read Raveon’s app note AN234 for
SCADA and MODBUS info about Raveon’s SCADA products. In the RV-M21 data radio
modem’s software must be version D30 or larger to utilize MODBUS.
Raveon Application note AN230 contains all information about using the MODBUS
protocol AN230 (ModbusMx)
With Raveon’s Products that have GPIO interfaces with Open Drain, such as the RV-
M21 and RV-M2 data radio modems.
MODBUS RTU Commands
Modbus is a registered trademark of MODICON, Inc.
Messages sent from devices that utilize SCADA and Telemetry protocols such as
MODBUS RTU are often called “Telegrams”. The MODBUS function 5 (Force single
coil) can be used to set of clear the Open Drain IO pins.
Modbus data is specified as big-endian, which means the most significant value is at the
lowest address.
(05) Force single coil to turn on the Open Drain.
To set the state of output bits and Open Drain (OD) pins (MODBUS refers to them
“coils”), function code 05 is used to send the set command to the remote device. To set
a OD open (coil off) (0) send 0x0000 and to enable and Open Drain output (coil on) (1)
send 0x00FF. The data per OD output are two bytes.
When broadcast, the same function forces the same data output in all attached slave
devices.
Function code 05 (Force Coil Status) is the code used in MODBUS to send a message
to control an Open Drain. The command structure is:
Application Note
AN238
Raveon Technologies Corp
Byte 0:
Byte 1:
Byte 2:
Byte 3:
Byte 4:
Byte 5:
Byte 6:
Byte 7:
Slave Address. The ID of the RTU device
Function Code for this message. 05
Coil Address MSB
Coil Address LSB
Data Force MSB
Data Force LSB
Error Check Low Byte (LSB)
Error Check High Byte (MSB)
The structure of the 05 (Force Coil Status) response back is:
Byte 0:
Byte 1:
Byte 2:
Byte 2 and 4:
2 CRC Bytes
Slave Address. The ID of the RTU device
Function Code for this message. 02
Byte Count (N)
The response Data bytes containing the output
bit status. 0x0000=0 0x00FF=1
Error Check
So for example, the telegram to set bit #2 (Coil address 2) on device 150(0x96) is:
Request: 96 05 00 02 FF 00 31 1D
Response: 96 05 00 02 FF 00 31 1D
(it reported coil 2 is on)
The Register control coils in MODBUS is referred to as a “Coil Address” In Applciation
note AN230, Raveon’s register list has the register number (Coil address) for all the IO
pins and SCADA features that can be accessed with the MODBUS SCADA protocol.
IO0 is Register 1. IO1 is Register 2, IO2 is Register 3. Use these register numbers to
execute MODBUS messages that set coils or read coil status.
For Example, to turn on the Open Drain output (Pin to Ground) for device 30 (0x1E)
using a MODBUS “Force Single Coil” message which used function code 5, here are
some example messages in hex bytes. Each are 8 bytes long.
Device Function Register Data CRC
IO0 On:
IO1 On:
IO2 On:
1E
1E
1E
05
05
05
00 01
00 02
00 03
FF 00
FF 00
FF 00
DF 95
2F 95
7E 55
Copyright 2018 7 Raveon Technologies Corp.
For additional information, contact:
Raveon Technologies Corporation
2320 Cousteau Court
Vista, CA 92081 - USA
Phone: 1-760-444-5995
Fax: 1-760-444-5997
Email:****************