Operating instructions

Reference PTQ-MCM Quantum / Unity Platform
Modbus Communication Module
ProSoft Technology, Inc. Page 109 of 139
April 29, 2008
Block Pass-Thru Control Blocks
If one or more of the slave ports on the module are configured for the block pass-
through mode of operation, the module will pass blocks with specific identification
codes to the processor for each received write command. Any Modbus function
5, 6, 15 or 16 commands will be passed from the port to the processor. logic
must handle the receipt of all Modbus write functions to the processor and to
respond as expected to commands issued by the remote Modbus master device.
The structure of the formatted pass-through control block is shown in the
following tables:
Function 5
Offset Description Length
1 9958 1
2 2 1
3 Bit Address 1
4 Data 1
Function 6 and 16
Offset Description Length
1 9956/9957 (Floating-point) 1
2 Number of data words 1
3 Data Address 1
4 to 129 Data 125
Function 15
When the module receives a function code 15 when in pass-through mode, the
module will write the data using block ID 9959 for multiple-bit data. First the bit
mask is used to clear the bits to be updated. This is accomplished by ANDing the
inverted mask with the existing data. Next the new data ANDed with the mask is
ORed with the existing data. This protects the other bits in the INT registers from
being affected.
Offset Description Length
1 9959 1
2 Number of Words 1
3 Word Address 1
4 to 53 Data 50
54 to 103 Mask 50
Example - Function 15
The following example shows how to use the pass-thru block functionality with
modbus function 15, assuming that the parameters below were configured by the
user as follows:
Parameter Value Description
Type 2 Port is configured as block pass-thru
Pass Thru
Address
1000
The pass-thru block is copied to the processor starting at
address 41001