Siemens SIMATIC S7-200 System Manual page 288

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

Advertisement

SIMATIC Instructions
INTERRUPT 0
Network 1
SM0.0
AIW0
32000
AC0
Network 2
I0.0
VB100
Network 3
SM0.0
VD108
32000
AC0
AC0
Figure 9-28 Example of PID Loop Control for SIMATIC LAD, STL, and FBD (continued)
9-100
LAD
I_DI
EN
ENO
IN
OUT
AC0
DI_R
EN
ENO
AC0
IN
OUT
AC0
DIV_R
EN
ENO
IN1
OUT
AC0
AC0
IN2
MOV_R
EN
ENO
IN
VD100
OUT
PID
EN
ENO
TBL
0
LOOP
MUL_R
EN
ENO
IN1
OUT
OUT
AC0
IN2
ROUND
EN
ENO
IN
OUT
AC0
DI_I
EN
ENO
IN
OUT
AQW0
STL
NETWORK 1
//Convert PV to a
//normalized real
//number value - PV is
//a unipolar input and
//cannot be negative.
LD
SM0.0
ITD
AIW0, AC0
//Save the unipolar
//analog value in
//the accumulator.
DTR
AC0, AC0
//Convert the 32-bit
//integer to a real
//number.
/R
32000.0, AC0 //Normalize the value
//in the
//accumulator.
MOVR AC0, VD100
//Store the normalized
//PV in the loop TABLE.
NETWORK 2
//Execute the loop when
//placed in auto mode.
LD
I0.0
//When auto mode is
//entered,
PID
VB100, 0
//invoke PID execution.
NETWORK 3
//Convert M
//sixteen-bit integer.
//M
n
//and cannot be negative.
LD
SM0.0
MOVR VD108, AC
//Move the loop output
//to the accumulator.
*R
32000.0, AC0 //Scale the value in
//the accumulator.
ROUND AC0, AC0
//Convert the real
//number value to
//a 32-bit integer.
DTI
AC0, AQW0
//Write the 16-bit
//integer value to
//the analog output.
//end of Interrupt
Routine 0
S7-200 Programmable Controller System Manual
to a scaled,
n
is a unipolar value
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents