Siemens Simatic S7-200 System Manual page 165

Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

Example: PID Loop Instruction
M
A
I
N
S
B
R
0
S7-200 Instruction Set
Network 1
//On the first scan,
//Call the initialization subroutine
LD
SM0.1
CALL
SBR_0
Network 1
//Load PID parameters and
//attach the PID interrupt routine:
//1. Load the loop setpoint = 75% full.
//2. Load the loop gain = 0.25.
//3. Load the loop sample time = 0.1 seconds.
//4. Load the integral time = 30 minutes.
//5. Set no derivative action.
//6. Set the timed interval (100ms)
//
for timed interrupt INT_0.
//7. Set up a timed interrupt to invoke
//
the PID execution.
//8. Enable interrupts
LD
SM0.0
MOVR
0.75, VD104
MOVR
0.25, VD112
MOVR
0.1, VD116
MOVR
30.0, VD120
MOVR
0.0, VD124
MOVB
100, SMB34
ATCH
INT_0, 10
ENI
Chapter 6
6
153

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents