S7 Library Functions - HTML
S7 Library Functions - HTML
Pgina 1 de 8
automation
Search
Categories
S7 Library Functions
Home
S7/1200 Ethernet
DC/DC Converters
Contact
Family
IEC_TC
IEC_TC
IEC_TC
IEC_TC
IEC_TC
IEC_TC
COM_FUNC
COM_FUNC
COM_FUNC
COM_FUNC
COM_FUNC
COM_FUNC
COM_FUNC
COM_FUNC
COM_FUNC
COM_FUNC
COM_FUNC
COM_FUNC
TIMERS
SFB 33 ALARM
COM_FUNC
SFB 34 ALARM_8
COM_FUNC
COM_FUNC
SFB 37 AR_SEND
COM_FUNC
SFB 38 HSC_A_B
COUNTERS
SFB 39 POS
ICONT
SFB 41 CONT_C
ICONT
SFB 42 CONT_S
ICONT
SFB 43 PULSEGEN ICONT
SFB 44 ANALOG
TEC_FUNC
SFB 46 DIGITAL
TEC_FUNC
SFB 47 COUNT
TEC_FUNC
Description
Count Up
Count Down
Count Up/Down
Generate a Pulse
Generate an On Delay
Generate an Off Delay
Uncoordinated Sending of Data
Uncoordinated Receiving of Data
Sending Segmented Data
Receiving Segmented Data
Read Data from a Remote CPU
Write Data to a Remote CPU
Send Data to Printer
Initiate a Warm or Cold Restart on a Remote Device
Changing a Remote Device to the STOP State
Initiate a Hot Restart on a Remote Device
Query the Status of a Remote Partner
Receive the Status of a Remote Device
Counter (high-speed counter, integrated function) (only
exist on the CPU 312 IFM and CPU 314 IFM)
Frequency Meter (frequency meter, integrated function
(only exist on the CPU 312 IFM and CPU 314 IFM)
Generating block related messages without
acknowledgement indication
Implement a Sequencer
Generate Block-Related Messages with Acknowledgment
Display
Generate Block-Related Messages without Values for 8
Signals
Generate Block-Related Messages with Values for 8
Signals
Generate Block-Related Messages without
Acknowledgment Display
Send Archive Data
Counter A/B (integrated function) (only exist on the CPU
314 IFM)
Position (integrated function) (only exist on the CPU 314
IFM)
Continuous Control (only exist on the CPU 314 IFM)
Step Control (only exist on the CPU 314 IFM)
Pulse Generation (only exist on the CPU 314 IFM)
Positioning with Analog Output (only exist on the S7300C CPUs)
Positioning with Digital Output (only exist on the S7300C CPUs)
Controlling the Counter (only exist on the S7-300C CPUs)
Controlling the Frequency Measurement (only exist on
the S7-300C CPUs)
SFB 49 PULSE
TEC_FUNC
SFB 52 RDREC
SFB 53 WRREC
SFB 54 RALRM
DP
DP
DP
DP
IO_FUNCT
Pgina 2 de 8
Family
CLK_FUNC
CLK_FUNC
CLK_FUNC
CLK_FUNC
CLK_FUNC
IO_FUNCT
DB_FUNCT
DP
SFC 9
COM_FUNC
EN_MSG
SFC 10 DIS_MSG
COM_FUNC
SFC
SFC
SFC
SFC
SFC
SFC
DP
DP
DIAGNSTC
DP
DP
PMC_FUNC
11
12
13
14
15
17
DPSYC_FR
D_ACT_DP
DPNRM_DG
DPRD_DAT
DPWR_DAT
ALARM_SQ
SFC 18 ALARM_S
PMC_FUNC
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
BLKMOV
FILL
CREAT_DB
DEL_DB
TEST_DB
COMPRESS
UPDAT_PI
UPDAT_PO
SET_TINT
CAN_TINT
ACT_TINT
QRY_TINT
SRT_DINT
CAN_DINT
QRY_DINT
MP_ALM
MSK_FLT
DMSK_FLT
READ_ERR
DIS_IRT
EN_IRT
SFC 41 DIS_AIRT
MOVE
MOVE
DB_FUNCT
DB_FUNCT
DB_FUNCT
DB_FUNCT
IO_FUNCT
IO_FUNCT
PGM_CNTL
PGM_CNTL
PGM_CNTL
PGM_CNTL
PGM_CNTL
PGM_CNTL
PGM_CNTL
PGM_CNTL
DIAGNSTC
DIAGNSTC
DIAGNSTC
IRT_FUNC
IRT_FUNC
IRT_FUNC
Description
Set System Clock
Read System Clock
Set Run-time Meter
Start/Stop Run-time Meter
Read Run-time Meter
Query Logical Address of a Channel
Read OB Start Information
Trigger a Hardware Interrupt on the DP Master
Enable Block-Related, Symbol-Related and Group Status
Messages
Disable Block-Related, Symbol-Related and Group Status
Messages
Synchronize Groups of DP Slaves
Deactivation and activation of DP slaves
Read Diagnostic Data of a DP Slave (Slave Diagnostics)
Read Consistent Data of a Standard DP Slave
Write Consistent Data to a DP Standard Slave
Generate Acknowledgeable Block-Related Messages
Generate Permanently Acknowledged Block-Related
Messages
Query the Acknowledgment Status of the last ALARM_SQ
Entering State Message
Copy Variables
Initialize a Memory Area
Create Data Block
Delete Data Block
Test Data Block
Compress the User Memory
Update the Process Image Update Table
Update the Process Image Output Table
Set Time-of-Day Interrupt
Cancel Time-of-Day Interrupt
Activate Time-of-Day Interrupt
Query Time-of-Day Interrupt
Start Time-Delay Interrupt
Cancel Time-Delay Interrupt
Query Time-Delay Interrupt
Trigger Multicomputing Interrupt
Mask Synchronous Errors
Unmask Synchronous Errors
Read Error Register
Disable New Interrupts and Asynchronous Errors
Enable New Interrupts and Asynchronous Errors
Delay Higher Priority Interrupts and Asynchronous
Errors
SFC 42 EN_AIRT
IRT_FUNC
SFC
SFC
SFC
SFC
SFC
SFC
SFC
SFC
PGM_CNTL
DIAGNSTC
PGM_CNTL
PGM_CNTL
CLK_FUNC
IO_FUNCT
IO_FUNCT
DIAGNSTC
43
44
46
47
48
49
50
51
RE_TRIGR
REPL_VAL
STP
WAIT
SNC_RTCB
LGC_GADR
RD_LGADR
RDSYSST
54
55
56
57
58
59
60
61
RD_PARM IO_FUNCT
WR_PARM IO_FUNCT
WR_DPARM IO_FUNCT
PARM_MOD IO_FUNCT
WR_REC
IO_FUNCT
RD_REC
IO_FUNCT
GD_SND
COM_FUNC
GD_RCV
COM_FUNC
SFC 62 CONTROL
COM_FUNC
SFC 63 AB_CALL
SFC 64 TIME_TCK
PLASTICS
CLK_FUNC
SFC 65 X_SEND
COM_FUNC
SFC 66 X_RCV
COM_FUNC
SFC 67 X_GET
COM_FUNC
SFC 68 X_PUT
COM_FUNC
SFC 69 X_ABORT
COM_FUNC
SFC 70 GEO_LOG
SFC 71 LOG_GEO
IO_FUNCT
IO_FUNCT
SFC 72 I_GET
COM_FUNC
SFC 73 I_PUT
COM_FUNC
SFC 74 I_ABORT
COM_FUNC
SFC 78
SFC 79
SFC 80
SFC 81
SFC 82
SFC 83
SFC 84
SFC 85
SFC 87
SFC 90
SFC100
SFC101
SFC102
SFC103
SFC104
SFC105
SFC106
DIAGNSTC
BIT_LOGC
BIT_LOGC
MOVE
DB_CTRL
DB_CTRL
DB_CTRL
DB_FUNCT
COM_FUNC
HF_FUNCT
CLK_FUNC
CLK_FUNC
IO_FUNCT
DP
PGM_CNTL
PMC_FUNC
PMC_FUNC
OB_RT
SET
RSET
UBLKMOV
CREA_DBL
READ_DBL
WRIT_DBL
CREA_DB
C_DIAG
H_CTRL
SET_CLKS
RTM
RD_DPARA
DP_TOPOL
CIR
READ_SI
DEL_SI
PMC_FUNC
SFC112 PN_IN
PROFIne2
SFC113 PN_OUT
PROFIne2
Pgina 3 de 8
SFC114 PN_DP
PROFIne2
SFC126 SYNC_PI
IO_FUNCT
SFC127 SYNC_PO
IO_FUNCT
Pgina 4 de 8
Family
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
FC 71
MLD_EZW
S5_CNVRT
FC 72
MLD_EDW
S5_CNVRT
FC 73
FC 74
MLD_SAMW S5_CNVRT
MLD_SAM S5_CNVRT
FC 75
MLD_EZ
FC 78
MLD_EDWK S5_CNVRT
FC 79
MLD_EZK
S5_CNVRT
FC 80
MLD_EDK
S5_CNVRT
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
COD_B4
COD_16
MUL_16
DIV_16
ADD_32
SUB_32
MUL_32
DIV_32
RAD_16
REG_SCHB
REG_SCHW
REG_FIFO
REG_LIFO
DB_COPY1
DB_COPY2
RETTEN
LADEN
COD_B8
COD_32
AE_460_1
AE_460_2
AE_463_1
AE_463_2
AE_464_1
AE_464_2
AE_466_1
AE_466_2
RLG_AA1
RLG_AA2
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
FC 110 PER_ET1
S5_CNVRT
S5_CNVRT
Description
Change fixed point number to floating point number
Change floating point number to fixed point number
Add floating point numbers
Subtract floating point numbers
Multiply floating point number
Divide floating point numbers
Compare floating point numbers
Extract root of floating point numbers
Clock generator
Clock generator (timing element)
Message of first value with single flashing light,
wordwise, A
Message of first value with double flashing light,
wordwise, A
Collected message, wordwise (sound alert)
Collected message, bitwise
Message of first value with single flashing light, bitwise,
A
Message of first value with double flashing light,
wordwise, A+M
Message of first value with single flashing light, bitwise,
A+M
Message of first value with double flashing light, bitwise,
A+M
Change BCD number to 16 bit dual number
Change 16 bit dual number to BCD number
Multiply 16 bit dual numbers
Divide 16 bit dual numbers
Add 32 bit dual numbers
Subtract 32 bit dual numbers
Multiply 32 bit dual numbers
Divide 32 bit dual numbers
Extract roots of 16 bit dual numbers
Bi-directional shift register, bitwise
Bi-directional shift register, wordwise
Buffer memory (FIFO)
Stack register (LIFO)
Copy data block, direct assignment of parameters
Copy data block, indirect assignment of parameterization
Save scratchpad memory
Load scratchpad memory
Change BCD number to 32 bit dual number
Change 32 bit dual number to BCD number
Read analog value
Read analog value
Read analog value
Read analog value
Read analog value
Read analog value
Read analog value
Read analog value
Output analog value
Output analog value
Read and Write for extended periphery (direct
assignment of parameters)
FC 111 PER_ET2
S5_CNVRT
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
FC
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
S5_CNVRT
112
113
114
115
116
117
118
119
120
121
122
123
124
125
SINUS
COSINUS
TANGENS
COTANG
ARCSIN
ARCCOS
ARCTAN
ARCCOT
LN_X
LG_X
B_LOG_X
E_H_N
ZEHN_H_N
A2_H_A1
Pgina 5 de 8
Description
Point Math Add duration to a time
Combine two STRING variables
Combine DATE and TIME_OF_DAY to DT
Delete in a STRING variable
Data type conversion DINT to STRING
Extract the DATE from DT
Extract the day of the week from DT
Extract the TIME_OF_DAY from DT
Compare DT for equal
Compare STRING for equal
Find in a STRING variable
Compare DT for greater than or equal
Compare STRING for greater than or equal
Compare DT for greater than
Compare STRING for greater than
Data type conversion INT to STRING
Insert in a STRING variable
Compare DT for smaller than or equal
Compare STRING for smaller than or equal
Left part of a STRING variable
Length of a STRING variable
Point Math Limit
Compare DT for smaller than
Compare STRING for smaller than
Point Math Select maximum
Middle part of a STRING variable
Point Math Select minimum
Bi-directional shift register, bitwise
Compare STRING for unequal
Data type conversion REAL to STRING
Replace in a STRING variable
Right part of a STRING variable
Data type conversion S5TIME to TIME
Point Math Subtract two time values
Point Math Subtract duration from a time
Point Math Binary selection
Data type conversion STRING to DINT
Data type conversion STRING to INT
Data type conversion STRING to REAL
Data type conversion TIME to S5TIME
Family
ICONT
Description
Continuous Control
FB
FB
FB
FB
42
43
58
59
CONT_S
PULSEGEN
TCONT_CP
TCONT_S
ICONT
ICONT
CONTROL
CONTROL
Pgina 6 de 8
Step Control
Pulse Generation
Temperature Continuous Controller
Temperature Step Controller
Communication Blocks
Number Name
FB 2
IDENTIFY
FB 3
READ
Family
CP_300
CP_300
FB 4
REPORT
CP_300
FB 5
STATUS
CP_300
FB 6
WRITE
CP_300
FB
FB
FB
FB
FB
FB
USEND
URCV
BSEND
BRCV
GET
PUT
CP_300
CP_300
CP_300
CP_300
CP_300
CP_300
FB 20
GETIO
IO_FUNCT
FB 21
SETIO
IO_FUNCT
FB 22
GETIO_PART
IO_FUNCT
FB 23
SETIO_PART
IO_FUNCT
FB 55
IP_CONFIG
CP_300
FB 63
FB 64
TSEND
TRCV
COMM
COMM
FB 65
TCON
COMM
FB 66
TDISCON
COMM
FB
FB
FC
FC
FC
FC
TUSEND
TURCV
DP_SEND
DP_RECV
DP_DIAG
DP_CTRL
COMM
COMM
CP_300
CP_300
CP_300
CP_300
FC 5
AG_SEND
CP_300
FC 6
AG_RECV
CP_300
FC 7
AG_LOCK
CP_300
FC 8
AG_UNLOCK
CP_300
FC 10
AG_CNTRL
CP_300
FC 11
PNIO_SEND
CP_300
FC 12
PNIO_RECV
CP_300
FC
FC
FC
FC
FC
FTP_CONNECT
FTP_STORE
FTP_RETRIEVE
FTP_DELETE
FTP_QUIT
CP_300
CP_300
CP_300
CP_300
CP_300
AG_LSEND
CP_300
8
9
12
13
14
15
67
68
1
2
3
4
40
41
42
43
44
FC 50
Description
For checking device properties
Combine two STRING variables
Allows unconfirmed transmission of variables by an
FMS server.
allows status information to be requested from the
communications partner on the specified FMS
connection.
Transfers data from a specified local data area to a
data area on the communication partner.
Uncoordinated Sending of Data
Uncoordinated Receiving of Data
Sending Segmented Data
Receiving Segmented Data
Read Data from a Remote CPU
Write Data to a Remote CPU
Read All Inputs of a DP Standard Slave/PROFINET IO
Device
Write All Outputs of a DP Standard Slave/PROFINET
IO Device
Read a Part of the Inputs of a DP Standard
Slave/PROFINET IO Device
Write a Part of the Outputs of a DP Standard
Slave/PROFINET IO Device
Transfers a configuration data block (CONF_DB)
containing connection data for an Ethernet CP.
Sending Data via TCP native and ISO on TCP
Receiving Data via TCP native and ISO on TCP
Establishing a Connection using TCP native and ISO
on TCP
Terminating a Connection using TCP native and ISO
on TCP
Sending Data via UDP
Receiving Data via UDP
transfers data to the PROFIBUS CP
receives data on PROFIBUS
used to request diagnostic information
transfers control jobs to the PROFIBUS CP
data by means of a configured connection to the
communication partner (<= 240 bytes).
data by means of a configured connection from the
communication partner (<= 240 bytes, not email).
the external data access by means of FETCH/WRITE
(not for UDP, email).
the external data access by means of FETCH/WRITE
(not for UDP, email).
allows you to diagnose connections. When necessary,
you can reinitialize connection establishment using
the FC.
used for data transfer in the CP modes PROFINET IO
controller or PROFINET IO device.
used to receive data in the CP modes PROFINET IO
controller or PROFINET IO device.
Establish an FTP connection
Store a file on the FTP server
Retrieve a file from the FTP server
Delete a file on the FTP server
Enable an FTP connection
data by means of a configured connection to the
communication partner.
FC 60
AG_LRECV
CP_300
FC 62
C_CNTRL
CP_300
Pgina 7 de 8
Family
CONVERT
TIMERS
TIMERS
COMPARE
COMPARE
TIMERS
MOVE
TIMERS
MOVE
BIT_LOGC
BIT_LOGC
TABLE
TABLE
TABLE
TABLE
TABLE
TABLE
SHIFT
TABLE
SHIFT
CONVERT
CONVERT
CONVERT
CONVERT
CONVERT
CONVERT
CONVERT
BIT_LOGC
BIT_LOGC
MATH_FP
TABLE
TABLE
CONVERT
CONVERT
Description
Lead/Lag Algorithm
Discrete Control Alarm Timer
Motor Control Alarm Timer
Index Matrix Compare
Scan Matrix Compare
Event Maskable Drum
Pack Data
Software Timer On DelayRetentive
Indirect Block Move
Reset Range of Outputs
Set Range of Outputs
Add to Table
First In/First Out Unload Table
Table Find
Last In/First Out Unload Table
Table
Move Table to Word
Word Shift Register
Word to Table
Bit Shift Register
Seven Segment Decoder
ASCII to Hex
Hex to ASCII
Encode Binary Position
Decode Binary Position
Tens Complement
Sum Number of Bits
Reset Range of Immediate Outputs
Set Range of Immediate Outputs
Standard Deviation
Correlated Data Table
Table to Table
Scaling Values
Unscaling Values
Miscellaneous Blocks
Number Name
Family
FB 60
SET_SW
TIMEFUNC
FB 61
SET_SW_S TIMEFUNC
FB 62
TIMESTMP TIMEFUNC
FC 60
LOC_TIME TIMEFUNCL
FC 61
BT_LT
TIMEFUNC
FC 62
LT_BT
TIMEFUNC
FC 63
S_LTINT
TIMEFUNC
Description
supports the summertime/wintertime changeover in CPUs
that do not have the time status. For this purpose it sets
the CPU clock to the current time and according to the
changeover rules in the Control DB.
supports the summertime/wintertime changeover in CPUs
that do have the time status. For this purpose it sets the
time status to the current time and according to the
changeover rules in the Control DB.
transfers the time-stamped messages of an IM153-2 into
its instance DB.
reads the time status or time of the CPU and calculates
the local time. It is therefore only useful on CPUs with
time status.
calculates the local time from the base time given at the
input.
calculates the base time from the local time given at the
input.
sets the required time interrupt to the preset time. This
time is given in local time.
Pgina 8 de 8
-55%
-50%