Modbus client data type mapping
Each internal data type provided by Automation Control is accessible through the Modbus TCP Client Support. This section defines all available mapping options and mapping options are also provided at the end of this section in table format.
Reading a Digital Input
-
Any digital input (virtual or physical) may be read.
-
A dgital input may be read using the Modbus Read Discrete Inputs function or Modbus Read Coils function.
-
Multiple Input reads are supported.
Writing a Digital Input
-
Only virtual digital inputs may be written. Physical inputs cannot be written.
-
A value may be written to a virtual digital input using the Modbus Write Single Coil function or Modbus Write Multiple Coils function.
-
Multiple digital input writes are supported.
Reading a Digital Output
-
Any digital output (virtual or physical) may be read.
-
A digital output may be read using the Modbus Read Coils function or Modbus Read Discrete Inputs function.
-
Multiple digital output reads are supported.
Writing a Digital Output
-
Any digital output (virtual or physical) may be written.
-
A digital output may be written using the Modbus Write Single Coil function, or Modbus Write Multiple Coils function.
-
Multiple digital output writes are supported.
Reading a Numeric Input
-
Any numeric input (virtual or physical) may be read.
-
If the input source is any of the following, a Double Register (32 bit) read is required and may be done using either a Modbus Read Input Registers function or a Modbus Read Holding Registers Function.
-
Analog input
-
Pulse input
-
Virtual numeric input
-
32 bit Modbus holding or input register
-
16 bit Modbus holding or input register: Each 16 bit Modbus holding or input register will be mapped to a 32 bit Numeric Input.
-
-
Multiple 32 bit register reads are supported.
-
If a numeric input is configured with a fractional scale set to 0, a 32 bit integer value will be returned.
-
If a numeric input is configured with a fractional scale other than 0, a 32 bit floating point value will be returned.
-
16 Bit Option: A single register (16 bit) read may be performed on a numeric input using the Modbus Read Input Registers function or a Modbus Read Holding Registers function to perform a single 16 bit integer read. Multiple register reads are not supported in 16 bit mode.
Writing a Numeric Input:
-
Only virtual numeric inputs may be written. Physical inputs cannot be written.
-
A value may be written to a virtual numeric input using a Double Register (32 bits) write. The Modbus Write Multiple Holding Register function may be used to write the 32 bit value to the selected Virtual Input.
-
Multiple 32 bit register writes are supported.
-
If the virtual numeric input being written is configured with a fractional scale set to 0, the two words will be interpreted as an integer value.
-
If the virtual numeric input being written is configured with a fractional scale other than 0, the two words will be interpreted as a floating point value.
-
16 Bit Option: A single register (16 bit) Modbus Write Single Holding Register function may be used to write an integer value to a single Virtual Numeric Input.
Reading a Numeric Output
-
Any numeric input (virtual or physical) may be read.
-
If the output destination is any of the following, a Double Register (32 bit) read is required and may be done using a Modbus Read Input Registers function or a Modbus Read Holding Registers Function:
-
Virtual output
-
32 bit Modbus holding register
-
16 bit Modbus holding register: Each 16 bit Modbus holding register will be mapped to a 32 bit Numeric Output.
-
-
Multiple register reads are supported in 32 bit mode.
-
If a numeric output is configured with a fractional scale set to 0, a 32 bit integer value will be returned.
-
If a numeric output is configured with a fractional scale other than 0, a 32 bit floating point value will be returned.
-
16 Bit Option: A single register (16 bit) read may be performed on a Numeric Output using the Modbus Read Input Registers function or a Modbus Read Holding Registers function to perform a single
Writing a Numeric Output
-
Any numeric input (virtual or physical) may be written.
-
If the output destination is any of the following a Double Register (32 bit) write is required and may be done using a Modbus Write Multiple Holding Register Function:
-
Virtual output
-
32 bit Modbus holding register
-
16 bit Modbus holding register: Each 16 bit Modbus holding register will be mapped to a 32 bit Numeric Output.
-
-
Multiple register writes are supported in 32 bit mode.
-
If the fractional scale of the numeric output is 0, a 2 word (32 bit) Modbus Write Multiple Holding Registers function will be interpreted as a 32 bit integer write to the selected output.
-
If the fractional scale of the numeric output is not 0, a 2 word (32 bit) Modbus Write Multiple Holding Registers function will be interpreted as a floating point write to the selected output.
-
16 Bit Option: A single register (16 bit) Modbus Write Single Holding Register function may be used to write an integer value to a single Numeric Output.
Reading a Hex Input
-
Any hex input (virtual or physical) may be read.
-
If the input source is any of the following, a Double Register (32 bit) read is required and may be done using a Modbus Read Input Registers function or a Modbus Read Holding Registers Function.
-
Virtual hex input
-
32 bit Modbus holding or input register
-
16 bit Modbus holding or input register: Each 16 bit Modbus holding or input register will be mapped to a 32 bit Hex Input.
-
-
A 32 bit integer value will be returned.
-
16 Bit Option: A single register (16 bit) read may be performed on a hex input using the Modbus Read Input Registers function or a Modbus Read Holding Registers function to perform a single 16 bit integer read. Multiple register reads are not supported in 16 bit mode.
Writing a Hex Input:
-
Only virtual hex inputs may be written. Physical inputs cannot be written.
-
A value may be written to a virtual hex input using a Double Register (32 bits) write. The Modbus Write Multiple Holding Register function may be used to write the 32 bit value to the selected Virtual Input.
-
Multiple 32 bit register writes are supported.
-
The 32 bit value will be interpreted as an integer.
-
16 Bit Option: A single register (16 bit) Modbus Write Single Holding Register function may be used to write an integer value to a single Virtual Hex Input.
Reading Hex Output
-
Any hex output (virtual or physical) may be read.
-
If the output destination is any of the following, a Double Register (32 bit) read is required and may be done using a Modbus Read Input Registers function or a Modbus Read Holding Registers Function.
-
Virtual output
-
32 bit Modbus holding register
-
16 bit Modbus holding register - Each 16 bit Modbus holding register will be mapped to a C32 bit Hex Output.
-
-
Multiple register reads are supported in 32 bit mode.
-
A 32 bit integer value will be returned.
-
16 Bit Option: A single register (16 bit) read may be performed on a Hex Output using the Modbus Read Input Registers function or a Modbus Read Holding Registers function to perform a single 16 bit integer read. Multiple register reads are not supported in 16 bit mode.
Writing a Hex Output
-
Any hex output (virtual or physical) may be written.
-
If the output destination is any of the following a Double Register (32 bit) write is required and may be done using a Modbus Write Multiple Holding Register Function:
-
Virtual output
-
32 bit Modbus holding register
-
16 bit Modbus holding register - Each 16 bit Modbus holding register will be mapped to a 32 bit Numeric Output.
-
-
Multiple register writes are supported in 32 bit mode.
-
The value written will be interpreted as a 32 bit integer write to the selected output.
-
16 Bit Option: A single register (16 bit) Modbus Write Single Holding Register function may be used to write an integer value to a single hex output.