9.5 Example "Printing" And "Reading And Controlling The Cp 340 Inputs/Outputs - Siemens SIMATIC CP 340 User Manual

Ptp coupling and configuration
Hide thumbs Also See for SIMATIC CP 340:
Table of Contents

Advertisement

9.5
Example "Printing" and "Reading and Controlling the CP 340
Inputs/Outputs"
Introduction
The inputs and outputs are mapped to memory bits at the beginning and end of OB 1. Only
the memory bits are used in the test program.
Inputs and outputs used for FC 5 and FC 6
The assignment of the inputs/outputs to memory bits is shown in the table below.
Symbol
ANW_RECH
ANW_DRUCK
RESET_SP
REQ_SP
EN_R_R
AUFTR_1_DR
AUFTR_2_DR
AUFTR_3_DR
AUFTR_4_DR
STEU_DTR
STEU_RTS
A_DONE_SP
A_BIE_SP
A_V24_STAT_DTR_OUT
A_V24_STAT_DSR_IN
A_V24_STAT_RTS_OUT
A_V24_STAT_CTS_IN
A_V24_STAT_DCD_IN
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03

9.5 Example "Printing" and "Reading and Controlling the CP 340 Inputs/Outputs"

Input/output
Flag
I 0.0
M 0.0
I 0.1
M 0.1
I 0.2
M 0.2
I 0.3
M 0.3
I 0.4
M 0.4
I 0.5
M 0.5
I 0.6
M 0.6
I 0.7
M 0.7
I 1.0
M 1.0
I 1.1
M 1.1
I 1.2
M 1.2
I 1.3
M 1.3
I 1.4
M 1.4
I 1.5
M 1.5
I 1.6
M 1.6
I 1.7
M 1.7
Q 4.0
M 8.0
Q 4.2
M 8.2
Q 4.3
M 8.3
Q 4.4
M 8.4
Q 4.5
M 8.5
Q 4.6
M 8.6
Q 4.7
M 8.7
Q 5.0
M 9.0
Q 5.1
M 9.1
Q 5.2
M 9.2
Q 5.3
M 9.3
Q 5.4
M 9.4
Programming Example for Standard Function Blocks
Comment
"0" signal
"1" = select "printing" and "control/status"
Start RESET PRINT
Free
Free
Free
Start PRINT job
Execute SET job
Print job selection; "1" = job 1
Print job selection; "1" = job 2
Print job selection; "1" = job 3
Print job selection; "1" = job 4
Free
Free
Control signal DTR, signal for V24_SET FC
Control signal RTS, signal for V24_SET FC
Display FB parameter
PRINT DONE
PRINT binary result
"0"
"0"
"0"
"0"
"0"
STAT_DTR_OUT
STAT_DSR_IN
STAT_RTS_OUT
STAT_CTS_IN
STAT_DCD_IN
153

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents