Merging the BC3100 in the TwinCAT System Manager
basic properties:
The basic properties of the bus terminal controller are handled in the system manager. The terminals of the bus terminal controller can be assigned directly to the Lightbus master or to the BC3100. Terminals that are assigned directly to the BC3100 are displayed in the system manger with "PLC", and are not visible to the master. A further distinction between "Complex" and "Compact" is also made in the analogue terminals.
- Complex: complete representation of the analogue terminals with control/status, 4 bytes input/output per channel
- Compact: user data only, 2 bytes per channel
The terminals that are assigned to the master are invisible to the bus terminal controller. If it is desired to make a terminal visible to both systems, the terminal must first be assigned to the BC3100, and then the data from the terminal are transmitted to the master via the PLC variables.
If you merge the PLC variables, the following dialog opens. It determines the start address.
The settings for the PLC in the bus terminal controller are found under the "PLC" tab. All the basic settings that control the properties of the PLC in the BC3100 are handled there.
PLC Cycle Time
The PLC cycle time determines the program's repetition frequency. This time is not deterministic. This means that when the program in the bus terminal controller needs more time, the PLC cycle time rises. If the program needs less than the cycle time, it is repeated at intervals of the set cycle time.The processing of the Lightbus and the serial interfaces is executed in the background time. This should be set to approx. 20 % of the PLC cycle time.
The "mean cycle time" is measured to optimise the system. You will find this item in PLC Control under Online\Coupler. About 20% - 30% is added to this, and the result entered as the PLC cycle time. The background time is then set to 20% of the PLC cycle time.
PLC cycle time = mean cycle time + 20% = 10 ms + 20% = 12 ms
Background time = PLC cycle time * 0,2 = 12 ms * 0,2 = 2,4 ms " 2 ms
Mean cycle time
The measured cycle time also includes that required for the terminal bus update. This results in a connection between the number of terminals that are inserted and the cycle time. Before initiating the program, the bus terminal controller executes a terminal bus update, to interrogate the inputs. After the program has been executed, the BC3100 carries out another terminal bus update, to write the current outputs. The background time follows this. The cycle time can also be shortened if the terminal bus update is carried out simultaneously for inputs and outputs (see Terminal Bus Update).
PLC Variables
PLC variables are variables that are situated in the BC3100 from addresses %IB128 and %QB128. This offset can be shifted. These addresses are not assigned to any terminal, so that signals or data can be transmitted to or received from the master via the PLC variables.
Remanent Variables
Retained or remanent variables are data that retain their value when voltage is not present. In PLC Control this data is placed in the allocated flags area. Following the default setting, this means that all the variables from %MB0 - %MB63 are RETAIN data. The maximum setting is 512 bytes
Terminal Bus (K-Bus) Update
Double Cycle: Terminal bus inputs before the PLC cycleTerminal bus outputs after the PLC cycle
Before PLC: Terminal bus inputs and outputs before the PLC cycle
After PLC: Terminal bus inputs and outputs after the PLC cycle
Program download via the fibre optic ring
TwinCAT offers a facility for transferring the program to the BC3100 over the optical fibre ring. To do this, string communication and the Ams/Ads must be activated in the system manager under the ADS/AMS tab. The TwinCAT system is started after the configuration has been saved. Now the BC3100 target system can be selected in PLC Control.
Thus the PLC tab changes as follows:
If the program is larger, AMS Response during download must be selected.
After saving the configuration you can start the TwinCAT System. In the PLC Control it´s now possible to select the target system of the BC3100.
Selection of the target platform
When TwinCAT PLC Control is restarted, the program asks for the target platform, i.e. the device on which the user will want his program to run. TwinCAT offers two target platforms, the PC as a controller and the BC3100 coupler. For the program transfer with the bus terminal controller there are again two possibilities. "AMS" is for communication over the fieldbus, while the "serial" communication takes place via the PC's serial interface and the BC3100 programming interface. (Zu öffnen unter dem Karteireiter Resourcen -> Steuerungskonfiguration)
Selection of the target system
Once the program has been written, the target system is selected under the "Online" symbol bar. In this example, the FC310x with the Box1 and the Run-Time1 of the bus terminal controller.
Program download via the RS232 interface
Every bus terminal controller offers the possibility of being programmed via the PC's RS232 interface. This can be implemented with the aid of a special cable. For this purpose, the serial interface is selected in PLC Control
Communication parameters
The settings for the serial interface, port number, baud rate etc. are found under Online/Communication parameters in PLC Control. The bus terminal controller requires the following setting:
Baud rate: 19200
Stop bits: 1
Parity: even