Programming
BC8050 und BC8150
58
Version: 3.0.0
Seriell_Set data structure
The settings for the RS232 interfaces are transferred with the following data structure.
TYPE ST_COMConfig:
STRUCT
iInputData :INT; (* BC8150: 1..255 *)
iOutputData :INT; (* BC8150: 1..255 *)
Modbus_Mode_BC8150 :E_BC8150_Mode; (* _8data_no_parity, _8data_with_parity, _8data_even_par-
ity, _8data_odd_parity *)
iWatchdog :INT; (* 1000 ms Watchdog für die Modbus und KS8000 Kommunika-
tion , 0 ms Watchdog disabled*)
Modbus_Baudrate :ENUM;(* _1k2Baud, _2k4Baud, _4k8Baud, _9k6kBaud, _19k2Baud, _38k4Baud *)
END_STRUCT
END_TYPE
Key
iInputData
: Number of input data (from the point of view of the BC). Size in words for the KS8000 protocol
(address 1-39)
iOutputData
: Number of output data (from the point of view of the BX). Size in words for the KS8000
protocol (address 1-39)
Modbus_Mode_BC8150
: RS232 settings for the ModbusRTU protocol (address 40-59)
iWatchdog
: Watchdog for KS8000 and Modbus protocol
Modbus_Baudrate
: Baud rate for the ModbusRTU protocol (address 40-59)
iErrorId
Return parameter iErrorId
Meaning
0
no Error
-1
Wrong BC Typ
-2
Wrong firmware version
0x1000_xxxx
xxxx ADS Error Code (see ADS Return Code)
5.12.3
TcBaseBCxx50
5.12.3.1
System task information
VAR_GLOBAL
SystemTaskInfo : SYSTEMTASKINFOTYPE;
END_VAR
System flags are implicitly declared variables. Using the Input Assistant, a variable SystemTaskInfoArr can
be found under system variables. This variable is a field with four structures of type
. The structure definition can be found in the system library. The index in this field is the task ID.
Development environment
Target platform
PLC libraries to be linked
TwinCAT v2.9.0
BCxx50, BC9x20 Controller
TcBaseBCxx50.lbx
5.12.3.2
System Task Info Type
TYPE SYSTEMTASKINFOTYPE
STRUCT
active : BOOL;
taskName : STRING(16);
firstCycle : BOOL;
cycleTimeExceeded : BOOL;
cycleTime : UDINT;
lastExecTime : UDINT;
priority : BYTE;
cycleCount : UDINT;
END_STRUCT
END_TYPE
Содержание BC8050
Страница 2: ......
Страница 44: ...Programming BC8050 und BC8150 44 Version 3 0 0 Fig 45 Build...