You are on page 1of 21

SIMATIC APT Quick Reference Guide

Order Number: PPX:APT81109 Text Assembly Number: 26012750009 Ninth Edition

Copyright 1998 by Siemens Energy & Automation, Inc. All Rights Reserved Printed in USA
Reproduction, transmission, or use of this document or contents is not permitted without express consent of Siemens Energy & Automation, Inc. All rights, including rights created by patent grant or registration of a utility model or design, are reserved. Since Siemens Energy & Automation, Inc., does not possess full access to data concerning all of the uses and applications of customers products, we do not assume responsibility either for customer product design or for any infringements of patents or rights of others which may result from our assistance.

Modules and I/O


Series 500t Modules Module Code
2AO 4AI 8AI 8AO 8WI 8WO 8DI 8DO 32DI 32DO ASCII BASIC DCOMM ESPt HSPI HSPID NIM PLINK RTD SERVO TC TURBO 110VO 110VR 120VR 24VDC USER

Series 505t Modules Module Code


2AO 4AO 2AI4O 4AI4O 6AI2O 8AI4O 8AI 8AO 8WI 8WO 8DI 8DO 8WOSF 16AF 16AI

I/O Type
AO AI AI AO WI WO DI DO DI DO WI, WO WI, WO WI, WO WI, WO WI, WO, DO WI, WO DO WI, WO RT WI, WO TC WI, WO DI, DO DI, DO DI, DO DI, DO DI, DO, WI, WO

Description
2-Channel Analog Output 4-Channel Analog Input 8-Channel Analog Input 8-Channel Analog Output Parallel Word Input Parallel Word Output 8-Channel Discrete Input 8-Channel Discrete Output 32-Channel Discrete Input 32-Channel Discrete Output ASCII Message Output Programmable BASIC Dual Communications Port MS-DOS Computer High-Speed Pulse Input High-Speed PID Controller Network Interface/TIWAYt Peerlinkt RTD Servo Axis Thermocouple Injection Machine Control 110 VAC Redundant Output 110 VAC Rapid Response 120 VDC Rapid Response 24 VDC Rapid Response User-defined Module

I/O Type
AO AO AI, AO AI, AO AI, AO AI, AO AI AO WI WO DI DO WO DI, DO, WI, WO AI DI DO WI WO DI DO WI, WO WI, WO WI, WO WI, WO WI, WO WI, WO DI, DO DO WI, WO WI, WO RT RT DI, DO WI, WO DI, DO, WO WI, WO DI, DO, WO TC WI, WO DI, DO, WI, WO

Description
2-Channel Analog Output 4-Channel Analog Output 20-Channel Analog In/4 Ch Analog Out 4-Channel Analog In/4 Ch Analog Out 6-Channel Analog In/2 Ch Analog Out 8-Channel Analog In/4 Ch Analog Out 8-Channel Analog Input 8-Channel Analog Output Parallel Word Input Parallel Word Output 8-Channel Discrete Input 8-Channel Discrete Output Parallel Word Output Special Function 16-Channel Advanced Function 16-Channel Analog Input 16-Channel Discrete Input 16-Channel Discrete Outut Parallel Word Input Parallel Word Output 32-Channel Discrete Input 32-Channel Discrete Output 80386 Computer with Hard Disk or Diskette Drive Programmable BASIC Ethernet TCP/IP Adapter SINECr H1 Network Communications Processor High-Speed Counter High-Speed Counter Encoder Isolated Discrete Interrupt Module Network Interface/TIWAY Peerlink Program Port Expander RTD RTD Self-contained block of I/O Field Interface; controls SIMOREGr DC Drive Field Interface; controls SIMOREG DC Drive in broadcast mode Field Interface; controls SIMOVERTr AC Drive Field Interface; controls SIMOVERT AC Drive in broadcast mode Thermocouple Injection Machine Control User-defined Module

16DI 16DO 16WI 16WO 32DI 32DO ATM BASIC ENET H1 HSC HSCE INTRP NIM PLINK PPEXP 8RTD 16RTD SLICE SREG SREGB SVRT SVRTB TC TURBO USER

Modules and I/O (continued) S5 I/O


I/O Type
Analog In Input ut

Code
AI

Address Types and Ranges


PW 128 to 254 OW 0 to 254 IW 0 to 126 PW 128 to 254

Analog g Output

AO

OW 0 to 254 QW 0 to 126 I 0.0 to 127.7

Discrete Input

DI

P O Q 0.0 to 127.7 P O IW 0 to 126

Discrete Output

DO

BCD Input

BI

PW 0 to 254 OW 0 to 254 QW 0 to 126 Q

BCD Output

BO

PW 0 to 254 OW 0 to 254 IW 0 to 126

Word Input

WI

PW 0 to 254 OW 0 to 254 QW 0 to 126

Word Out Output ut

WO

PW 0 to 254 OW 0 to 254

I/O Extensions *
I/O Type
AI BI BO TC** RT**

Read-only Boolean

Read-only Integer
.RAW RAW .RAW .OUT .RAW RAW RAW .RAW

Read-only Real
I/O name .SRV I/O name I/O name I/O name .SRV I/O name .SRV

Read/Write Integer

Read/Write Real
.FTAU FTAU

.FTAU FTAU FTAU .FTAU

* AO, DI, DO, WI, and WO do not have any extensions. ** The TC and RT I/O types are supported for Series 505 controllers only only. Resistance Temperature Detector and Thermocouple inputs for
S5 are configured as AIs.

Digital Flag Commands


Commands
LATCH ON CLEAR

Modules and I/O (continued) Program and Unit Extensions


Level
.TSCAN .PWRFL Program g .TODS .TOD .ECODE1 .ECODE2 .ENABL Unit .ABORT .OVRUN2* .ECODE1* .SNUM1* .SNUM2* .IID1* .IID2* .OVRUN2* .IHOUR .ECODE2* .SNUM1* .SNUM2* .DIS_SF1

Extension
.IMIN .ISEC .IYEAR .IMONTH .IDAY .IDOW .DIS_SF2 .IID1* .IID2* .BCH_REQ .BCH_REQ_RESP .BCH_REQ_INFO .DIS_SF1 .DIS_SF2 .ENABL .ABORT

* Series 505 controllers only

Declarations Single-Value Declarations


Type
Integer Real Boolean APT Flag Text Scaled Integer Counter Fast Timer Slow Timer

Code
I R B F T SI CT FT ST

Range of Values
32768 to +32767 9.223372 E18 to +9.223372 E18 for Series 505; 1.701412 E38 to +1.701412 E38 for S5 0 and 1 0 and 1 Any printable character 32768 to +32767 0 to 32767 counts 0 to 32767 counts 0 to 32767 counts

Comments

Use LATCH, CLEAR and ON commands Similar to OSx text tag

Counts in milliseconds (0.001 seconds); however, accuracy is 0.01 seconds for S5 controllers Counts in tenths of seconds (0.1 seconds)

Array Declarations
Type
Integer Array Real Array Boolean Array DI10 Array DO10 Array Sequence Array Shift Register Text Array

Code
IA RA BA IX DX SA SR TA

Size of Array for Series 505


1 to 32767 elements 1 to 16383 elements 1 to 1024 elements 10 elements 10 elements 1 to 256 elements 1 to 1023 elements 1 to 2184 elements

Size of Array for S5


1 to 256 elements 1 to 128 elements 1 to 4096 elements 10 elements 10 elements 1 to 256 elements 1 to 256 elements 1 to 17 elements

Range of Values for Each Element


32768 to +32767 9.223372 E18 to +9.223372 E18 for Series 505; 1.701412 E38 to +1.701412 E38 for S5 Boolean: 0 and 1 Boolean: 0 and 1 Boolean: 0 and 1 32768 to +32767 32768 to +32767 Any printable character

Declarations (continued) Commands


Integer and Scaled Integer Commands *
INCREMENT (INC) DECREMENT (DEC)

* Valid only with integers named in the Declaration Table. Cannot be used in user subroutines. Flag Commands
LATCH ON CLEAR

Sequence Array Commands and Extensions


Command
RESET ADVANCE .EMPTY .PTR .IOUT

Extension

Extension Type
Read-only Boolean Read-only Integer

Shift Register Commands and Extensions


Command
SHIFT SET_RESET CLEAR_RESET ENABLE DISABLE .PV .RESET .RESET .ENABL .ENABL

Extension

Extension Type
Read/Write Integer Read/Write Boolean Read/Write Boolean Read/Write Boolean Read/Write Boolean

Counter Commands and Extensions


Command
.COUT .TCC There are no Counter commands. .TCP .ENABL .INPUT

Extension

Extension Type
Read-only Boolean Read-only Integer Read/Write Integer Read/Write Boolean Read/Write Boolean

Fast/Slow Timer Commands and Extensions


Command Flag
.TOUT .TCC DELAY .RENA RENA .RESET .ENABL .TCP

Extension

Extension Type
Read-only Boolean Read-only Integer Read/Write Boolean Read/Write Integer

Safe-State Commands
Syntax
SSENTRY label; SSRETURN label; SSDEFINE LEVEL level; SSDEFINE LEVEL level RETENTIVE; SSDEFINE LOCAL TO sfc_name; SSTRIGGER identifier; SSARM sfc_name; SSDISARM sfc_name; SSABORT; SSDEFINE LOCAL TO sfc_name RETENTIVE;

Recipe Commands and Extensions


Command
.INUSE .DSTBL SELECT destination_recipe d ti ti i source_recipe; i UNLOCK CLEAR .DRDY .SCALE .RECREQ .HOLDREQ

Extension

Extension Type
Read/Write Boolean Read/Write Boolean Read/Write Boolean Read/Write Real Read/Write Integer Read/Write Boolean

Key Words Key Words Reserved by APT


ABS ASM BITS_TO_INT BY COM4 END FRAC INIT INTERPOLATE LOG LPT3 MOD ONN PRAGMA PUBLIC REVERSE SFC SSDISARM TAN TYPE AND AUX BITSET CHAR CON ENDIF FRS IN_OUT LEAD_LAG LOGSTEP LPT4 NIL ONS PRINT RANGE RIGHTSHIFT SIN SSENTRY THEN UNSCALE ARCCOS BCDBIN BITTEST CLEAR COS EXP GLOBAL INTEGER LEFTSHIFT LOOKUP_TABLE MATH NOT OR PRIORITY REAL ROUND SQRT SSRETURN TIMING UNTIL ARCSIN BEGIN BLOCK COM1 EDGE FALSE IF INT_TO_BITS LIMIT LOOP MAX OF ORDER PRN RECORD SCALE SSABORT SSTRIGGER TRIGGER WHILE ARCTAN BINBCD BODY COM2 ELSE FLAG IN IN_ASM LN LPT1 MIN OFF OUT PROUND RETENTIVE SCOPE SSARM STATUS TRUE XOR ARRAY BITCLEAR BOOLEAN COM3 ELSIF FOR INHERIT INT_TO_REAL LOAD_ARRAY LPT2 MINMAX ON PBITS_TO_INT PTRUNC RETURN SETSSI SSDEFINE SUBROUTINE TRUNC

Devices Types of Devices


Device Type
Hand-Operated/Dual-Feedback Single-Drive/Null-Feedback (Energize Open) Single-Drive/Null-Feedback (Energize Closed) Single-Drive/Single-Feedback (Energize Open) Single-Drive/Single-Feedback (Energize Closed) Single-Drive/Dual-Feedback (Energize Open) Valves Single-Drive/Dual-Feedback (Energize Closed) Dual-Drive/Dual-Feedback Motor-Drive/Dual-Feedback Three-Position Low/High/Dual-Feedback Three-Position Open/Position/Dual-Feedback User-defined Single-Drive/Null-Feedback Single-Drive/Single-Feedback Motors Dual-Drive/Null-Feedback Dual-Drive/Single-Feedback User-defined Reversible Motors Two-S eed Two-Speed Motors Forward/Reverse/Dual-Feedback Drive/Direction/Dual-Feedback Low/High/Dual-Feedback Drive/Speed/Dual-Feedback Dual-Feedback (Energize Extend) Cylinders Dual-Feedback (Energize Retract) User-defined Hand Press/Dual-Feedback Single-Drive/Null-Feedback (Energize Raise) Single-Drive/Null-Feedback (Energize Lower) Single-Drive/Single-Feedback (Energize Raise) Single-Drive/Single-Feedback (Energize Lower) Single-Drive/Dual-Feedback (Energize Raise) Presses Single-Drive/Dual-Feedback (Energize Lower) Dual-Drive/Dual-Feedback Motor-Drive/Dual-Feedback Three-Position Low/High/Dual-Feedback Three-Position Raise/Position/Dual-Feedback User-defined Stopwatch Timer VND VSN (O) VSN (C) VSS (O) VSS (C) VSD (O) VSD (C) VDD VMD BV1 BV2 VUD MSN MSS MDN MDS MUD RM1 RM2 TS1 TS2 CSD (E) CSD (R) CUD PND PSN (Type R) PSN (Type L) PSS (Type R) PSS (Type L) PSD (Type R) PSD (Type L) PDD PMD PS1 PS2 PUD TMR Down Up Down Up Down Up Down Down Down Down User-defined Closed Open Closed Open Closed Open Closed Closed Closed Closed User-defined Stopped Stopped Stopped Stopped User-defined Stopped Stopped Stopped Stopped Retracted Extended User-defined

Code

Failed State

Devices (continued) Motor Commands


Command
LOCK UNLOCK START STARTF STARTR STARTH STARTL STOP RESET

Flag
.RTL .RTU .RTR .RFWRD .RREV .RHIGH .RLOW .RTS .RSTOP .RESET MSS MSN MSS MDN MSN MSN MSN MSS MSS MSS MDN MDN MDN

Motor Types
MDS MDS MDS RM1/2 RM1/2 TS1/2 TS1/2 MDS RM1/2 MDS RM1/2 TS1/2 TS1/2 MUD MUD RM1/2 RM1/2 TS1/2 TS1/2 MUD MUD MUD

Valve Commands
Command
LOCK UNLOCK OPEN OPENL OPENH OPENA OPENB CLOSE RESET

Flag
.RTL .RTU .RTO .RLOW .RHIGH .RTOA .RTOB .RTC .RESET VSN VSS VSS VSD VSD VSN VSN VSN VSS VSS VSS VSD VSD VSD

Valve Types
VDD VDD VDD VMD VMD VMD BV1/2 BV1/2 BV1/2 BV1/2 VUD VUD VUD VUD VUD VUD VUD VDD VDD VMD VMD BV1/2 BV1/2 VUD VUD

Cylinder Commands
Command
LOCK UNLOCK RESET EXTEND RETRACT

Flag
.RTL .RTU .RESET .RTE .RTR CSD CSD CSD CSD CSD

Cylinder Types
CUD CUD CUD CUD CUD

Press Commands
Command
LOCK UNLOCK RAISE RAISEL RAISEH RAISEA RAISEB LOWER RESET

Flag
.RTL .RTU .RTO .RLOW .RHIGH .RTOA .RTOB .RTC .RESET PSN PSS PSS PSD PSD PSN PSN PSN PSS PSS PSS PSD PSD PSD

Press Types
PDD PDD PDD PMD PMD PMD PS1/2 PS1/2 PS1/2 PS1/2 PUD PUD PUD PUD PUD PUD PUD PDD PDD PMD PMD PS1/2 PS1/2 PUD PUD

Devices (continued) Motor Extensions


Extension Type Boolean Extensions
.CMMD .STRTC .STOPC .SFWRD .SREV Output bits (read-only) (read only) .SHIGH .SLOW .DRV .DIR .SPEED .RUNNG .RUNF .RUNR Position bits (read (read-only) only) .RUNH .RUNL .STPPD .TRVL .RUNIO .FIO Feedback inputs (read-only) .RIO .HIO .LIO .FTR .FTS .FTRF Fail bits (read-only) (read only) .FTRR .FTRH .FTRL .FAILD .DSBLD .LOCKD .NRDY Operation bits (read/write) .MSTRT .MREV .MHIGH .OVRD .OVRDF Override bits (read/write) .OVRDR .OVRDH .OVRDL Device status (read-write) Device status (read-only) .STATUS .VFLAGS (Series 505 only) .RTCP .RTCC Timer/Counter (read/write) .STCP .STCC .STPTO Timeout (read-only) (read only) Device alarm timer (read/write) .STRTO .RRESET .SRESET MSN MSN MSN MSN MSN MSN MSS MSS MSS MSS MSS MSS MDN MDN MDN MDN MDN MDN MDS MDS MDS MDS MDS MDS MDS MDS RM1/2 RM1/2 RM1/2 RM1/2 RM1/2 RM1/2 RM1/2 RM1/2 MSS MDS RM1/2 RM1/2 TS1/2 TS1/2 TS1/2 TS1/2 TS1/2 TS1/2 TS1/2 TS1/2 TS1/2 TS1/2 MUD MUD MUD MUD MUD MUD MUD MUD MUD MUD MSN MSN MSN MSN MSS MSS MSS MSS MDN MDN MDN MDN MDS MDS MDS MDS RM1/2 RM1/2 RM1/2 RM1/2 RM1/2 RM1/2 TS1/2 MUD MSS MSS MDS MDS RM1/2 RM1/2 RM1/2 RM1/2 TS1/2 TS1/2 TS1/2 TS1/2 TS1/2 TS1/2 TS1/2 MUD MUD MUD MUD MSN MSN MSS MSS MSS MDN MDN MDS MDS MDS RM1/2 RM1/2 TS1/2 TS1/2 TS1/2 TS1/2 MUD MUD RM1/2 RM1/2 MSN MSS MDN MDS RM1/2 RM1/2 RM1/2 TS1/2 TS1/2 TS1/2 TS1/2 MUD MUD MUD RM2 RM2 TS2 TS1/2 MUD MSN MSS MDN MDN MDN

Motor Types
MDS MDS MDS RM1 RM1 TS1 TS1 TS2 MUD MUD MUD

Devices (continued) Valve Extensions


Extension Type Boolean Extensions
.CMMD .OPENC .SHIGH Output (read-only) Out ut bits (read only) .SLOW .DRV .POS .CLSC .OPND .CLSD .OPNDA Position bits (read (read-only) only) .OPNDB .OPNDH .OPNDL .TRVL .OLS Feedback inputs in uts (read-only) ( y) .CLS .HIO .LIO .FTO .FTC Fail bits (read-only) (read only) .FTOH .FTOL .FAILD .DSBLD .LOCKD .NRDY Operation bits (read/write) .MOPEN .MHIGH .RTS .OVRD .OVRDO .OVRDC Override bits (read/write) .OVRDH .OVRDL .CRESET .ORESET Device Alarm Timer (readwrite) Device status (read-write) Device status (read-only) Timer status (read-only) (read only) .ORESET .CRESET .STATUS .VFLAGS (Series 505 only) .CLSTO .OPNTO .CTCC .OTCC Ti Timer integer i t (read/write) ( d/ it ) .CTCP .OTCP VSN VSN VSN VSN VSS VSS VSS VSS VSD VSD VSD VSD VND VSN VSN VSS VSS VSD VSD VDD VDD VDD VDD VDD VDD VDD VDD VMD VMD VMD VMD VMD VMD VMD VMD BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 VSS VSD VSD VDD VDD VMD VMD BV1/2 BV1/2 VUD VUD VUD VUD VUD VUD VUD VUD VUD VUD VUD VUD VUD VUD VMD VND VND VSN VSN VSN VSN VSS VSS VSS VSS VSD VSD VSD VSD VSD VDD VDD VDD VDD VDD VMD VMD VMD VMD VMD VSN VSN VSS VSS VSD VSD VDD VDD VMD VMD VND VND VSN VSS VSS VSS VSD VSD VSD VDD VDD VDD VMD VMD VMD BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 BV1/2 VUD VUD VUD VUD VUD VUD VUD BV1/2 BV1/2 BV1/2 VND VND VSN VSN VSS VSS VSD VSD VDD VDD VDD VMD VMD VMD BV1/2 BV1/2 VSN VSS

Valve Types
VSD VDD VDD VMD VMD BV1 BV1 BV2 BV2 VUD VUD VUD VUD VUD VUD VUD VUD VUD VUD VUD VUD

Devices (continued) Cylinder Extensions


Extension Type
Output Out ut bits (read (read-only) only)

Boolean Extensions
.CMMD .EXTC .RETC .TRVL CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD CSD .EXTENDED .RETRACTED .ELS .RLS .FAILD .FTE .FTR .DSBLD .LOCKD CSD

Cylinder Types
CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD CUD

(read-only) Position bits (read only)

Feedback inputs in uts (read-only)

Fail bits (read-only) (read only)

Operation bits (read/write)

.NRDY .MEXTEND .OVRDE

Override bits (read/write) Device status (read-write) Device status (read-only)

.OVRDR .STATUS .VFLAGS (Series 505 only) .ETCP .ETCC

Timer/Counter (read/write)

.RTCP .RTCC .EXTTO

Timeout (read-only) (read only) Device alarm timer (read/write)

.RETTO .ERESET .RRESET

Stopwatch Commands and Extensions


Command
START STOP HOLD RESET CONTINUE

Flag
.RSTART .RSTOP .RHOLD .RESET .RCONT

Read-only Boolean Extension


.TOUT .GT .EQ .MAXC .HOLD

Read/Write Integer Extension


.PSET .RATE .CUR

Read/Write Boolean Extension


.RUNNG

10

Devices (continued) Press Extensions


Extension Type Boolean Extensions
.CMMD .UPC .SHIGH Output (read-only) Out ut bits (read only) .SLOW .DRV .POS .DOWNC .UP .DOWN .UPA Position bits (read (read-only) only) .UPB .UPH .UPL .TRVL .ULS Feedback inputs in uts (read-only) .DLS .HIO .LIO .FTR .FTL Fail bits (read-only) (read only) .FTRH .FTRL .FAILD .DSBLD .LOCKD .NRDY Operation bits (read/write) .MRAISE .MHIGH .RTS .OVRD .OVRDD .OVRDU Override bits (read/write) .OVRDH .OVRDL .DRESET .URESET .UPTO Timer status (read-only) (read only) .DOWNTO .DTCC .UTCC Ti Timer integer i t (read/write) ( d/ it ) .DTCP .UTCP PSN PSN PSN PSN PSS PSS PSS PSS PSD PSD PSD PSD PDD PDD PDD PDD PDD PDD PMD PMD PMD PMD PMD PMD PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PSS PSD PSD PDD PDD PMD PMD PS1/2 PS1/2 PUD PUD PUD PUD PUD PUD PUD PUD PUD PUD PMD PND PND PSN PSN PSN PSN PSS PSS PSS PSS PSD PSD PSD PSD PSD PDD PDD PDD PDD PDD PMD PMD PMD PMD PMD PSS PSS PSD PSD PDD PDD PMD PMD PND PND PSN PSS PSS PSS PSD PSD PSD PDD PDD PDD PMD PMD PMD PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PS1/2 PUD PUD PUD PUD PUD PUD PUD PS1/2 PS1/2 PS1/2 PUD PUD PUD PND PND PSN PSN PSS PSS PSD PSD PDD PDD PDD PMD PMD PMD PS1/2 PS1/2 PSN PSS

Press Types
PSD PDD PDD PMD PMD PS1 PS1 PS2 PS2 PUD PUD PUD PUD PUD PUD PUD

11

Continuous Function Charts CFBs


Control Type
Analog Alarm On/Off Standard PD Loop PID Loop Dead Time Delay Dynamic First Order Lag First Order Lead Lag Second Order Lead Lag Dead Time Compensator Advanced Limiter Feedforward Output Adjust Feedforward Setpoint Adjust Output Limiter Average Selector Selector Inswitch Selector Median Selector Threshold Selector Valve Motor Position Control Proportional Time Control Absolute Value Interlock Math Multiplier Square Root Summer Correlated Lookup Table Other Anti-Reset Windup/Constraint Type Anti-Reset Windup/Select Type Scale Split Range Valve Sequencer Divider Math Square Subtractor Rate Limiter High Selector Low Selector Outswitch Selector Dual Mode Ratio Station Derivative Integrator Second Order Lag

Continuous Function Blocks


I Loop P Loop PI Loop

CFB Commands
Command Flag
Analog Alarm Anti-Reset Windup/C Anti-Reset Windup/S ENABLE (ENA) DISABLE (DIS) .REN .RDIS Average Selector Correlated Lookup Dead Time Delay Derivative 1st Order Lag AUTO MANUAL (MAN) CASCADE (CAS) AUTO MANUAL (MAN) CASCADE (CAS) ENABLE (ENA) DISABLE (DIS) ENABLE (ENA) DISABLE (DIS) SWITCH .RATO .RMAN .RCAS .RATO .RMAN .RCAS .REN .RDIS .REN .RDIS Dead Time Compensator Feedforward Setpoint Adjust I Loop Dual Mode Feedforward Output Adjust j

Blocks
First Order Lead Lag High Selector Integrator Low Selector Math Median Selector Motor Position Output Limiter On/Off P Loop PD Loop Proportional Time Control Rate Limiter Scale 2nd Order Lag 2nd Order Lead Lag Split Range Threshold Selector Valve Sequencer PI Loop PID Loop Ratio Station

Inswitch Selector Outswitch Selector

12

Continuous Function Charts (continued) Standard Blocks


CFB Extension Type
Read-only Boolean Read-only Integer Read-only Real Analog g Alarm Read/Write Boolean Read/Write Integer Read/Write Real .INHHA .DSABL .ECODE* .ERR .ENABL .IIN* .IN .LA .SPH .IMAN .INYDA .IOUT* .ERR .NRDY .IIN* .IN .ST .LA .BIAS .IMAN .INYDA .ECODE* .ERR .NRDY .IIN* .IN .PVL .SP .GMAN .IPV* .LPV .HHA .SPH .GAUTO .ISP* .LSP .HA .SPL .GCASC .IMN* .LMN .LA .BIAS .RMAN .CFL .RSP .LLA .RATO .CFH .ST .ODA .RCAS .IBIAS* .PV .YDA .PVH .RCA .NRDY .IPV* .RSP .LLA .SPL .IAUTO .INODA .ECODE* .OUT .GMAN .IPV* .LPV .PVH .LLA .IAUTO .INODA .IID* .GAUTO .ISP* .LSP .PVL .ODA .ICASC .INRCA .SNUM* .GCASC .IMN* .LMN .KC .YDA .SERR .INBTA* .SMODE .RMAN .AWS .HLIM .TI .RCA .INHHA .OVRUN .VFLAG .RATO .CFL .LLIM .TD .SP .INHA .DOUT .IERR* .RCAS .CFH .PV .HHA .SPH .INLA .IOUT* .IBIAS* .RSP .HA .SPL .INLLA .REN .ISP* .ST .ODA .ADB .ICASC .INRCA .IID* .RDIS .CFL .PV .YDA .SERR .INBTA* .SNUM* .CFH .PVH .RCA .INHHA .OVRUN .SMODE .PVL .SP .INHA .VFLAG .HHA .APV .INLA .IERR* .HA .ASP .INLLA .INHA .INLLA .IID* .INLA .SNUM*

Extensions
.INYDA .SMODE .INODA .VFLAG .INRCA .IERR* .INBTA* .OVRUN

Read-only Boolean Read-only Integer Read-only Real PID Read/Write Boolean Read/Write Integer Read/Write Real

Read-only Boolean Read-only Integer Read-only Real On/Off Read/Write Boolean Read/Write Integer Read/Write Real * Series 505 controllers only

Valve Control Blocks


CFB Extension Type
Read-only Boolean Read-only Integer Motor Position Control Read-only Real Read/Write Boolean Read/Write Real Read-only Boolean Proportional Pro ortional Time Control Read-only Integer Read/Write Boolean Read/Write Real Read-only Boolean Read-only Integer Split S lit Range Read-only Real Read/Write Boolean Read/Write Real Read-only Boolean Read-only Integer Valve Sequencer Read-only Real Read/Write Boolean Read/Write Real * Series 505 controllers only .ACTV .ECODE* .PV .ENABL .IN .DOUT .ECODE* .ENABL .IN .ENABLD .IOUT1 .OUT1 .ENABL .IN .ENABLD .IOUT .OUT .ENABL .IN .NRDY .BRKPH .DOUT .BRKPL .REN .RGN .RDIS .ECODE* .IID* .SNUM* .IOUT2 .OUT2 .NRDY .BRKP1 .REN .BRKP2 .RDIS .ECODE* .IID* .SNUM* .IID* .NRDY .DUTY .SNUM* .REN .RDIS .NRDY .SP .REN .DBAND .RDIS .IID* .SNUM*

Extensions

13

Continuous Function Charts (continued) Advanced Blocks


CFB Extension Type
Read-only Boolean Read-only Integer Read-only Real Dead Time Compensator Read/Write Boolean Read/Write Integer Read/Write Real .IMAN .INYDA .IOUT* .ERR .NRDY .IIN* .IN .PV .LA .GAIN .IMAN .INYDA .IOUT* .ERR .NRDY .RDIS .IIN* .IBIAS* .IN .PV .LA .PRSET .IMAN .INYDA .IOUT* .ERR .NRDY .RDIS .IIN* .IBIAS* .IN .PV .LA .GAIN .IMAN .INYDA .IOUT* .ERR .NRDY .IIN* .IN .PV .LA .GAIN .IMAN .INYDA .IOUT* .ERR .NRDY .IIN* .IBIAS* .IN .PV .LA .OFFST .IAUTO .INODA .ECODE* .OUT .GMAN .IPV* .LPV .PVH .LLA .TAU1 .IAUTO .INODA .ECODE* .OUT .GMAN .IPV* .LPV .PVH .LLA .DLY1 .IAUTO .INODA .ECODE* .OUT .GMAN .IPV* .LPV .PVH .LLA .TAU1 .IAUTO .INODA .ECODE* .OUT .GMAN .IPV* .LPV .PVH .LLA .TAU1 .IAUTO .INODA .ECODE* .OUT .GMAN .IPV* .LPV .PVH .LLA .WPV .GAUTO .ISP* .LSP .PVL .ODA .TAU2 .ICASC .INRCA .IID* .RATIO .GAUTO .ISP* .LSP .PVL .ODA .BIAS .GCASC .IMN* .LMN .KC .YDA .RMAN .AWS .HLIM .TI .RCA .RATO .CFL .LLIM .TD .SP .RCAS .CFH .RSP .HHA .SPH .IWPV .ST .HA .SPL .GCASC .IMN* .LMN .KC .YDA .TLEAD .SERR .INBTA* .SNUM* .RMAN .AWS .HLIM .TI .RCA .DTIME .INHHA .OVRUN .SMODE .RATO .CFL .LLIM .TD .SP .MTHI .INHA .VFLAG .RCAS .CFH .RSP .HHA .SPH .MTHO .INLA .IERR* .IBIAS* .ST .HA .SPL .BIAS .INLLA .GAUTO .ISP* .LSP .PVL .ODA .DLY2 .ICASC .INRCA .IID* .FFO .GAUTO .ISP* .LSP .PVL .ODA .TAU2 .ICASC .INRCA .IID* .GCASC .IMN* .LMN .KC .YDA .BIAS .SERR .INBTA* .SNUM* .SOUT .GCASC .IMN* .LMN .KC .YDA .TLEAD .SERR .INBTA* .SNUM* .RMAN .AWS .HLIM .TI .RCA .DTIME .INHHA .OVRUN .SMODE .RATO .CFL .LLIM .TD .SP .BIAS .INHA .DSABL .VFLAG .RCAS .CFH .RSP .HHA .SPH .INLA .IERR* .REN .FMODE .ST .HA .SPL .INLLA .RMAN .AWS .HLIM .TI .RCA .INHHA .OVRUN .SMODE .RATO .CFL .LLIM .TD .SP .INHA .ENABL .VFLAG .RCAS .CFH .RSP .HHA .SPH .INLA .IERR* .REN .DMODE .ST .HA .SPL .INLLA .ICASC .INRCA .IID* .MOUT .GAUTO .ISP* .LSP .PVL .ODA .TAU2 .ICASC .INRCA .IID*

Extensions
.SERR .INBTA* .SNUM* .DMOUT .GCASC .IMN* .LMN .KC .YDA .DTIME .SERR .INBTA* .SNUM* .INHHA .OVRUN .SMODE .SPV .RMAN .AWS .HLIM .TI .RCA .BIAS .INHHA .OVRUN .SMODE .RATO .CFL .LLIM .TD .SP .INHA .VFLAG .RCAS .CFH .RSP .HHA .SPH .INLA .IERR* .IBIAS* .ST .HA .SPL .INLLA .INHA .VFLAG .INLA .IERR* .INLLA

Read-only Boolean Read-only Integer Read-only Real Read/Write Boolean Dual Mode Read/Write Integer

Read/Write Real

Read-only Boolean Read-only Integer Read-only Real Feedforward Output Adj st Adjust Read/Write Boolean Read/Write Integer

Read/Write Real

Read-only Boolean Read-only Integer Read-only Real Feedforward Setpoint Adj st Adjust Read/Write Boolean Read/Write Integer Read/Write Real

Read-only Boolean Read-only Integer Read-only Real Read/Write Boolean Ratio Station Read/Write Integer

Read/Write Real * Series 505 controllers only

14

Continuous Function Charts (continued) Dynamic Blocks


CFB Extension Type
Read-only Boolean Read-only Integer Dead Time Delay Read-only Real Read/Write Boolean Read/Write Real Read-only Boolean Read-only Integer Derivative Read-only Real Read/Write Boolean Read/Write Real Read-only Boolean Read-only Integer Integrator Read-only Real Read/Write Boolean Read/Write Real Read-only Boolean Read-only Integer First Order Lag Read-only Real Read/Write Boolean Read/Write Real Read-only Boolean Read-only Integer First Order Lead Lag Read-only Real Read/Write Boolean Read/Write Real Read-only Boolean Read-only Integer Second Order Lag Read-only Real Read/Write Boolean Read/Write Real Read-only Boolean Read-only Integer Second Order Lead Lag Read-only Real Read/Write Boolean Read/Write Real * Series 505 controllers only .ENABLD .IOUT .OUT .ENABL .IN .ENABLD .IOUT .OUT .ENABL .IN .ENABLD .IOUT .OUT .ENABL .IN .ENABLD .IOUT .OUT .ENABL .IN .ENABLD .IOUT .OUT .ENABL .IN .ENABLD .IOUT .OUT .ENABL .IN .ENABLD .IOUT .OUT .ENABL .IN .TAU2 .ECODE* .DMOUT .NRDY .INIC .REN .OUTIC .RDIS .GAIN .DTIME .TLEAD .TAU1 .IID* .SNUM*. .ECODE* .DMOUT .NRDY .INIC .REN .OUTIC .RDIS .GAIN .DTIME .TAU1 .TAU2 .IID* .SNUM* .ECODE* .DMOUT .NRDY .INIC .REN .OUTIC .RDIS .GAIN .DTIME .TLEAD .TAU1 .IID* .SNUM*. .ECODE* .DMOUT .NRDY .INIC .REN .OUTIC .RDIS .GAIN .DTIME .TAU1 .IID* .SNUM* .ECODE* .DMOUT .NRDY .INIC .REN .OUTIC .RDIS .GAIN .DTIME .TAU1 .IID* .SNUM* .NRDY .REN .RDIS .ECODE* .IID* .SNUM* .ECODE* .DMOUT .NRDY .INIC .REN .OUTIC .RDIS .GAIN .DTIME .IID* .SNUM*

Extensions

15

Continuous Function Charts (continued) Selector Blocks


CFB Extension Type
Read-only Boolean Read-only Integer Read-only Real Average Selector Read/Write Boolean Read/Write Integer Read/Write Real Read-only Boolean Read-only Integer Read-only Real High Selector Read/Write Boolean Read/Write Integer Read/Write Real Read-only Boolean Read-only Integer Read-only Real Low Selector Read/Write Boolean Read/Write Integer Read/Write Real Read-only Boolean Read-only Integer Read-only Real Inswitch Selector Read/Write Boolean Read/Write Integer Read/Write Real Read-only Boolean Read-only Integer Read-only Real Median Selector Read/Write Boolean Read/Write Integer Read/Write Real Read-only Boolean Read-only Integer Read-only Real Outswitch Selector Read/Write Boolean Read/Write Integer Read/Write Real Read-only Boolean Read-only Integer Threshold Selector Read/Write Boolean Read/Write Integer Read/Write Real * Series 505 controllers only .ENABLD .IOUT .OUT .ENABL .IIN1 .IN1 .ENABLD .IOUT .OUT .ENABL .IIN1 .IN1 .ENABLD .IOUT .OUT .ENABL .IIN1 .IN1 .ENABLD .IOUT .OUT .ENABL .IIN1 .IN1 .ENABLD .IOUT .OUT .ENABL .IIN1 .IN1 .ENABLD .ECODE* .OUT1 .ENABL .IIN .IN .DOUT .ECODE* .ENABL .IIN .IN .IID* .OUT2 .NRDY .POS .PV1 .ENABLD .IID* .NRDY .LIMIT .LIMIT .SNUM* .REN .RDIS .PV2 .PV3 .PV4 .SNUM* .OUT3 .REN .IOUT1 .OUT4 .RDIS .IOUT2 .IOUT3 .IOUT4 .NRDY .IIN2 .IN2 .REN .IIN3 .IN3 .RDIS .POS .ECODE* .IID* .SNUM* .NRDY .IIN2 .IN2 .REN .IIN3 .IN3 .RDIS .IIN4 .IN4 .POS .ECODE* .IID* .SNUM* .NRDY .IIN2 .IN2 .REN .IIN3 .IN3 .RDIS .IIN4 .IN4 .SW1 .SW2 .SW3 .SW4 .POS .ECODE* .IID* .SNUM* .NRDY .IIN2 .IN2 .REN .IIN3 .IN3 .RDIS .IIN4 .IN4 .SW1 .SW2 .SW3 .SW4 .POS .ECODE* .IID* .SNUM* .NRDY .IIN2 .IN2 .REN .IIN3 .IN3 .TVAL .RDIS .IN10K .POS .IN20K .ECODE*

Extensions
.IN30K .IID* .SNUM* .STAT .ISTATUS

16

Continuous Function Charts (continued) Limiter Blocks


CFB Extension Type
Read-only Boolean Read-only Integer Read-only Real O t t Limiter Output Li it Read/Write Boolean Read/Write Integer Read/Write Real Read-only Boolean Read-only Integer Read-only Real Rate Limiter Read/Write Boolean Read/Write Integer Read/Write Real * Series 505 controllers only .ENABLD .IOUT .OUT .ENABL .IIN .IN .ENABLD .IOUT .OUT .ENABL .IIN .IN .RLIM .NRDY .REN .RDIS .HLIM .EQ .ECODE* .IID* .SNUM* .LLIM .NRDY .REN .RDIS .ECODE* .IID* .SNUM*

Extensions

Math Control Blocks


CFB
Absolute Value, Square q Root, , Square q

Extension Type
Read-only Integer Read-only Real Read/Write Integer Read/Write Real Read-only Integer Read-only Real Read/Write Integer Read/Write Real Read-only Boolean Read-only Integer Read-only Real .IOUT .OUT .IIN .IN .IOUT .OUT .IIN1 .IN1 .ENABLD .IOUTE .OUTE .ENABL .IINA .INA .IIN2 .IN2 .DOUTE .IOUTF .OUTF .NRDY .IINB .INB .DOUTF .IOUTG .OUTG .REN .IINC .INC

Extensions

Divider, Multiplier, Multi lier, , Summer Subtractor,

.DOUTG .IOUTH .OUTH .RDIS .IIND .IND

.DOUTH .ECODE* .DINA .IID* .DINB .SNUM* .DINC .DIND

Math Block

Read/Write Boolean Read/Write Integer Read/Write Real

Interlock * Series 505 controllers only

There are no extensions associated with the interlock blocks.

17

Continuous Function Charts (continued) Other Control Blocks


CFB
Anti-Reset Windup/Constraint

Extension Type
Read-only Integer Read/Write Boolean Read/Write Real Read-only Integer Read/Write Boolean Read/Write Real Read-only Boolean Read-only Integer Read-only Real Read/Write Boolean Read/Write Integer Read/Write Real Read-only Boolean Read-only Integer Read-only Real .ECODE* .ENABL .IN .ECODE* .ENABL .IN .ENABLD .IOUT .OUT .ENABL .IIN .IN .ENABLD .IOUT .OUT .ENABL .IIN .IN .HRIN .LRIN .NRDY .REN .ECODE* .IID* .NRDY .REN .ECODE* .IID* .IID* .NRDY .HLIM .IID* .NRDY .SNUM* .REN .LLIM .SNUM* .REN

Extensions
.RDIS

Anti-Reset Windup/Select

.RDIS

.SNUM* .RDIS

.POS

Lookup Correlated Looku Table

.SNUM* .RDIS .HROUT .LROUT

Scale

Read/Write Boolean Read/Write Integer Read/Write Real

* Series 505 controllers only

Math Language Math Language Functions


Type of Function Format of Function ABS(expression) EXP(expression) FRAC(expression) INT_TO_REAL(expression) Arithmetic Functions LN(expression) LOG(expression) ROUND(expression) SQRT(expression) TRUNC(expression) ARCCOS(expression) ARCSIN(expression) Trigonometric Functions ARCTAN(expression) COS(expression) SIN(expression) TAN(expression) BITS_TO_INT(array variable) BITTEST(variable,integer) Bit Functions EDGE(expression) LEFTSHIFT(expression,expression) RIGHTSHIFT(expression,expression) Resultant Value Type Real/Integer Real Real Real Real Real Integer Real Integer Real Real Real Real Real Real Integer Boolean Boolean Integer Integer Code Type RLL/SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM RLL RLL SFPGM SFPGM STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL

18

Math Language (continued) Math Language Procedures


Value Type(s) Used
Boolean SETSSI(Boolean); * UNPACK_BITS(Boolean array,variable); INT_TO_BITS(Boolean array,variable); Boolean to Integer g PACK_BITS(Boolean array,variable); PBITS_TO_INT(variable,integer); CLEAR(flag_variable); Flag LATCH(flag_variable); ON(flag_variable); BCDBIN(variable,variable); BINBCD(variable,variable); BIT_ASSIGN(variable,integer,expression); Integer BITCLEAR(variable,integer); BITSET(variable,integer); IREAD(variable); IWRITE(variable); INTERPOLATE(in1,out1,array1,array2); Real LEAD_LAG(in1,last in,out2,lead,lag,gain); LOOKUP_TABLE(in1,out1,array1,array2); COPY_BYTES(source,source offset,destination, destination offset,# of bytes); * COPY_DIRECT(destination,source,integer); Real or Integer (all values of same type) ( y ) LIMIT(in1,out1,low,high); LOAD_ARRAY(in1,array); MAX(in1,max); MIN(in1,min); MINMAX(in1,max,min); Integer to Real Real to Integer * Series 505 controllers only SCALE(in1,out1,type,low,high); UNSCALE(in1,out1,type,low,high); PROUND(integer, variable); PTRUNC(integer, variable);

Format of Procedure
FRS(Boolean expression, Boolean variable); RLL RLL RLL

Code Type
STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL STL

RLL/SFPGM RLL SFPGM RLL RLL RLL RLL/SFPGM RLL/SFPGM RLL RLL/SFPGM RLL/SFPGM RLL RLL SFPGM SFPGM SFPGM RLL RLL/SFPGM SFPGM RLL/SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM SFPGM

STL STL STL STL STL STL STL STL STL STL

SIMATIC, S5, SINEC, SIMOREG, and SIMOVERT are registered trademarks of Siemens AG. APT, Series 500, Series 505, ESP, PCS, Peerlink, and TIWAY are trademarks of Siemens Energy & Automation, Inc.

19

You might also like