Programming
BC8050 und BC815046 Version: 3.0.0
5.5 Allocated flags
4kbyte of allocated flags are available. They can be used to assign different variable types to the same
address, e.g. for converting strings to bytes. Data can also be placed here that can be read or written via
ADS by the controller.
Note
Allocated variables are not remanent data
For the Bus Terminal Controllers of the BX series and the BCxx50 the allocated variables
are not saved as remanent data.
Reading/writing of allocated flags via ADS
The flags may also be read via the controller and ADS. In PROFIBUS, the DPV-1 services are used for this
purpose, in CANopen SDO communication is used.
The AmsNetID can be obtained from the System Manager, or it can be displayed via the Bus Terminal
Controller menu.
The PLC port number is 800.
Index group Meaning Index offset (value range)
0x4020 Flag (only BXxxx0) 0..4096
Example
BX program
VAR
Flag_01AT%MB0:WORD;
END_VAR
TwinCAT PC/CX master program
VAR
fbADRSREAD:ADSREAD;
Flag_M:WORD;
END_VAR
fbADRSREAD(
NETID:='172.16.3.0.2.3',(*AMSNetIdBX*)
PORT:=800,(*800-PLC*)
IDXGRP:=16#4020,(*0x4020hexfalgs*)
IDXOFFS:=0,(*byteoffset*)
LEN:=2,(*Lenghtbyte*)
DESTADDR:=ADR(Merker),
READ:=TRUE,
TMOUT:=t#1s);
IFNOTfbADRSREAD.BUSYTHEN
fbADRSREAD(READ:=FALSE);
END_IF
5.6 Local process image in delivery state
The process image of the BX/BCxx50 consists of an input, output and flag area. In addition, there are
unallocated data without fixed address. They are created without specifying an address. For this type of
variable 256/48 kB of memory are available on the BX/BCxx50. The maximum size of a variable or structure
(array) is 16kbyte. For the allocated data 2048 bytes of input data and 2048 bytes of output data are
available. The BX/BCxx50 has 4 kB of memory for the allocated flag area. In the delivery state (default
configuration) of the BX/BCxx50, fixed addresses are allocated for all connected Bus Terminals. The data for
fieldbus communication start from address offset 1000
dec
. The fieldbus data length depends on the fieldbus
system used.
Inputs Outputs
Bus Terminal %IB0 ... Bus Terminal %QB0 ...
Fieldbus data (PLC variables) %IB1000 ... Fieldbus data (PLC variables) %QB1000 ...
... %IB2047 maximal ... %QB2047 maximal