ProSoft Technology MVI56-AFC User Manual
Page 246
MVI56-AFC Sample Logic
MVI56-AFC ♦ ControlLogix Platform
User Manual
Liquid and Gas Flow Computer
Page 246 of 316
ProSoft Technology, Inc.
February 25, 2011
4 In the sample ladder logic, configure each Modbus Gateway Block using the
following controller tags:
Parameter
Controller Tag
Values
Enable
Transaction
AFC56.ModbusGateway.Command
[0].Config.Enable
0 = The module will ignore this request
1 = The module will process this request.
Start Register
AFC56.ModbusGateway.Command
[0].Config.StartRegister
Start register in the Modbus Slave to be
written or read from
Register Count
AFC56.ModbusGateway.Command
[0].Config RegisterCount
Number of words to be written or read
between the module and the processor.
Maximum of 200 words is supported per
command.
Function Type
AFC56.ModbusGateway.Command
[0].Config.FunctionType_Write
0 = Read from MVI56-AFC
1 = Write to MVI56-AFC
Register Type
AFC56.ModbusGateway.Command
[0].Config.RegisterType_Input
0 = Holding Register
1 = Input Register
Slave Type
AFC56.ModbusGateway.Command
[0].Config.SlaveType_Virtual
0 = Primary Slave
1 = Virtual Slave
Note: It is strongly suggested that you first configure all parameters having the Enable bit set to 0.
After the configuration is finished than the Enable bit can be set to 1.
Example 1 - Modbus Gateway Function
In order to write 200 words from the processor to the Primary Modbus Slave
starting at holding register address 2000, the AFC56.Modbus.Gateway[0] block
should be configured as follows:
1 Refer to the AFC56.ModbusGateway.Command[x].WriteData or
AFC56.ModbusGateway.Command[x].ReadData controller tags depending
on the configured function type:
2 If the Modbus Gateway block uses a READ function type:
The data will be read to the AFC56.ModbusGateway.Command[x].ReadData[
] array.
If the Modbus Gateway block uses a WRITE function type:
The data will be written from the AFC56.Modbus.Gateway[x].WriteData[ ]
array.
Note: The BID and BOD controller tags are automatically generated by the logic so you do not
have to write any value to these controller tags.