Programming Example for Standard Function Blocks
9.5 Example "Printing" and "Reading and Controlling the CP 340 Inputs/Outputs"
PtP coupling and configuration of CP 340
154 Manual, 04/2011, A5E00369892-03
Symbol Input/output Flag Comment
A_V24_STAT_RI_IN Q 5.5 M 9.5 STAT_RI_IN
Q 5.6 M 9.6 "0"
Q 5.7 M 9.7 "0"
Input/Output parameters for FC 5 and FC 6
The table below shows how the input/output parameters of FC 5 and FC 6 are mapped to bit
memories.
Symbol Address Data format Comment
BGADR MW 21 INT Logical base address
V24_STAT_DTR_OUT M 13.0 BOOL STAT: DTR_OUT parameter
V24_STAT_DSR_IN M 13.1 BOOL STAT: DSR_IN parameter
V24_STAT_RTS_OUT M 13.2 BOOL STAT: RTS_OUT parameter
V24_STAT_CTS_IN M 13.3 BOOL STAT: CTS_IN parameter
V24_STAT_DCD_IN M 13.4 BOOL STAT: DCD_IN parameter
V24_STAT_RI_IN M 13.5 BOOL STAT: RI_IN parameter
PRINT_DBNO MW 56 INT PRINT: DB_NO parameter
PRINT_DWNO MW 58 INT PRINT: DBB_NO parameter
PRINT_STATUS MW 61 WORD PRINT: STATUS parameter
PRINT_DONE M 60.0 BOOL PRINT: DONE parameter
PRINT_ERROR M 60.1 BOOL PRINT: ERROR parameter
PRINT_BIE M 60.2 BOOL PRINT: Binary result