Communication via Function Blocks
6.6 Use of function blocks to output message texts to a printer
CP 341 Point-to-Point Communication, Installation and Parameter Assignment
Manual, 09/2008, A5E02191071-01
167
Assignment in the data area, pointer DB
The FB P_PRINT_RK uses the DB_NO and DBB_NO parameters to access a pointer DB in
which the pointers to the data blocks containing the message texts and variables are stored
in a fixed sequence. You have to create the pointer DB.
The figure shows the structure of the pointer DB that is addressed by the DB_NO and
DBB_NO parameters of the FB P_PRINT_RK.
'%QXPEHU
'%%QXPEHU
/HQJWK
'%QXPEHU
'%%QXPEHU
/HQJWK
'%QXPEHU
'%%QXPEHU
/HQJWK
'%QXPEHU
'%%QXPEHU
/HQJWK
'%QXPEHU
'%%QXPEHU
/HQJWK
3RLQWHUWRVWYDULDEOH
3RLQWHUWRQGYDULDEOH
3RLQWHUWRUGYDULDEOH
3RLQWHUWRWKYDULDEOH
3RLQWHUWRWKHIRUPDWVWULQJ
Figure 6-7
Structure of the POINTER DB for the FB P_PRINT_RK function block
Permissible DB numbers
The permissible DB numbers are CPU-specific. If the value 16#00 is specified as the DB
number for "Pointer to variable", this variable is interpreted as not present and the pointer is
set to the next variable or the format string.
If the DB number is equal to the value 16#00 in "Pointer to format string", the print request is
canceled and event number 16#1E43 is indicated in the STATUS parameter output of the FB
P_PRINT_RK.
Permissible DBB numbers
The variable or format string is located starting at the assigned DBB number. The maximum
length of the variables is 32 bytes and the maximum length of the format string is 150 bytes.
If the maximum length is exceeded, the print request is canceled and event number
16#1E41 is indicated in the STATUS parameter output of the FB P_PRINT_RK.
长沙工控帮教育科技有限公司
www.gkbpx.com