Hardware assignment at the BC bus controller

For a PC controller or a CX1000 controller, the serial port used is linked with the Modbus RTU function block within the TwinCAT System Manager. In contrast, in a program for a BC bus controller, this assignment is carried out manually directly in the PLC programming environment.

Once an instance of a Modbus RTU function block has been created in the PLC program, the hardware address of the serial Bus Terminal to be addressed is specified in the variable configuration. To this end, the menu item Insert - All Instance Paths is selected under Resources in the Variable_Configuration (VAR_CONFIG) block.

Hardware assignment at the BC bus controller 1:

When this menu item is selected, the local I/O addresses used in all function blocks are listed.

Hardware assignment at the BC bus controller 2:

Initially, the variables have no address. It has to be assigned manually according to the Bus Terminal assignment of the bus controller. If the Bus Terminal is the first non-digital terminal at the bus controller, the address is zero, for example.

 
VAR_CONFIG MAIN.Terminal.com.Port.IO.out AT %QB0 : ModbusKL6outData5B;
    MAIN.Terminal.com.Port.IO.in AT %IB0 : ModbusKL6inData5B;
END_VAR