Download Print this page
Siemens SIMATIC S7-300 Reference Manual

Siemens SIMATIC S7-300 Reference Manual

Comparison list for programming languages based on the international mnemonics
Hide thumbs Also See for SIMATIC S7-300:

Advertisement

SIMATIC
S7-1200 / S7-1500
Comparison list for programming languages based on the international mnemonics
Reference manual
Edition
12/2014

Advertisement

loading

Summary of Contents for Siemens SIMATIC S7-300

  • Page 1 SIMATIC S7-1200 / S7-1500 Comparison list for programming languages based on the international mnemonics Reference manual Edition 12/2014...
  • Page 2: Legal Information Warning Notice System

    Comparison list for S7 300, S7 400, S7 1200, S7 1500 Reference manual Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage have no safety alert symbol.
  • Page 3 WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems.
  • Page 4 Overview of the comparison list • Measuring runtime of instructions and program parts (see below) • Loading objects to the CPU: which changes and which changed blocks you can load to the CPU in which operating mode. (next page) • Overview, requirements, framework conditions and legends to the comparison list (page 7) •...
  • Page 5 Loading objects to the CPU The table shows which changes and which changed blocks can be loaded in which operating mode. Very complex programs can prevent loading in RUN mode. Possible solutions: • Use a memory card with sufficient capacity. •...
  • Page 6 Changes and blocks S7-300 S7-400 S7-1200 S7-1500 S7-1200 S7-1200 S7-1500 as of V4.0 V1.7 V1.0 - 2.1 V2.2 - V3.0 V1.0-V1.6 New FB/FC/DB/PLC data type STOP (UDT) Deleted FB/FC/DB/PLC data STOP type (UDT) Changed FB/FC: Code change, STOP change of comments Changed FB/FC: Interface STOP STOP...
  • Page 7 Changes and blocks S7-300 S7-400 S7-1200 S7-1500 S7-1200 S7-1200 S7-1500 as of V4.0 V1.7 V1.0 - 2.1 V2.2 - V3.0 V1.0-V1.6 Changed retentivity settings (bit STOP STOP STOP STOP STOP STOP STOP memory area, DB area) Motion Control technology STOP STOP objects: Changes to MC servo cycle clock, change from...
  • Page 8 Structure of the comparison list • Basic instructions Instructions that you often use such as bit logic operations, timers, counters, mathematic functions • Extended instructions Sophisticated instructions for more options, such as date and time, interrupts, alarms, PROFIenergy • Technological instructions (technology) Technological functions, such as PID control, Motion Instructions for communication (communication) •...
  • Page 9: Instruction Groups

    Basic instructions Extended instructions Technology Communication Instructions in the section "Basic instructions" Instruction groups Page Instruction groups Page Instruction groups Page General Comparator operations Word logic operations Bit logic operations Math functions Shift and rotate instructions Safety functions Move Load and transfer Timers Conversion operations Legacy...
  • Page 10: Basic Instructions

    Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ ✔ OR logic operation >=1 ✔ ✔ ✔ ✔ ✔ EXCLUSIVE or operation ✔ ✔ ✔ ✔ ✔ Assignment -( )- -[=] ✔ ✔ Negate assignment -(/)- -[/=] ✔...
  • Page 11 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ Set tag on positive signal edge R_TRIG ✔ ✔ Set tag on negative signal edge F_TRIG ✔ ✔ ✔ ✔ Normally open contact -||- ✔ ✔ ✔...
  • Page 12 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ ✔ Safety only: Acknowledgment for simultaneous reintegration of all F-I/O / channels of the F-I/O of an F-runtime group ACK_GL after communication errors and/or F-I/O / channel errors Timers IEC timers...
  • Page 13 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Legacy ✔ ✔ ✔ Assign pulse timer parameters and start S_PULSE S_PULSE ✔ ✔ ✔ Assign extended pulse timer parameters and S_PEXT S_PEXT start ✔ ✔ ✔ Assign on-delay timer parameters and start S_ODT S_ODT ✔...
  • Page 14 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Counters IEC counters ✔ ✔ ✔ ✔ Count up ✔ ✔ ✔ ✔ Count down ✔ ✔ ✔ ✔ Count up and down CTUD CTUD Legacy ✔ ✔ ✔...
  • Page 15 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ ✔ Greater or equal CMP >= >= I/D/R >= ✔ ✔ ✔ ✔ Less or equal CMP <= <= I/D/R <= ✔ ✔ ✔ ✔ Greater than CMP >...
  • Page 16 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Variant ✔ ✔ Check data type of a VARIANT tag TypeOf ✔ ✔ Check data type of an ARRAY element of a TypeOfElements VARIANT tag ✔ ✔ Compare data type for EQUAL with the data type EQ_Type of a tag ✔...
  • Page 17 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Math functions ✔ ✔ Calculate CALCULATE ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Subtract ✔ ✔ ✔ ✔ Multiply ✔ ✔ ✔ ✔ Divide ✔ ✔ ✔ ✔...
  • Page 18 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ ✔ Form cosine value ✔ ✔ ✔ ✔ Form tangent value ✔ ✔ ✔ ✔ Form arcsine value ASIN ✔ ✔ ✔ ✔ Form arccosine value ACOS ✔...
  • Page 19 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ Do not fill block uninterruptible UFILL_BLK ✔ ✔ Swap SWAP ARRAY DB ✔ ✔ Read from ARRAY data block ReadFromArrayDB ✔ ✔ Write to ARRAY data block WriteToArrayDB ✔...
  • Page 20 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Read/write access Recommendation: program symbolically ✔ ✔ Read data in little-endian format READ_LITTLE ✔ ✔ Write data in little-endian format WRITE_LITTLE ✔ ✔ Read data in big-endian format READ_BIG ✔...
  • Page 21 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Conversion operations ✔ ✔ (✔) ✔ Convert value CONVERT CONVERT S7-1200/1500: is applied implicitly and therefore generally not necessary. S7-1200: not as Safety instruction ✔ ✔ ✔ ✔ Safety only: Convert data from BOOL data BO_W type to data of WORD data type...
  • Page 22 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ ✔ Convert integer (32 bit) to BCD DINT_TO_BCD32 ✔ ✔ ✔ ✔ Convert integer (16 bit) to integer (32 bit) INT_TO_DINT S7-1500: The conversion is also performed implicitly ✔...
  • Page 23 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ Switch bytes in the right word of accumulator 1 ✔ ✔ ✔ Switch all bytes in accumulator 1 Variant ✔ Convert VARIANT to DB_ANY VARIANT_TO_DB_ANY ✔...
  • Page 24 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Program control operations ✔ ✔ ✔ ✔ Run conditionally IF… THEN… ✔ ✔ ✔ ✔ Branch conditionally IF… THEN… ELSE… ✔ ✔ ✔ ✔ Branch conditionally multiple times IF…...
  • Page 25 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Jumps ✔ ✔ ✔ ✔ Jump GOTO… ✔ ✔ ✔ ✔ Jump if RLO = 1 -(JMP) -[JMP] ✔ ✔ ✔ ✔ Jump if RLO = 0 -(JMPN) -[JMPN] ✔...
  • Page 26 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ Jump if the result is less than zero ✔ ✔ ✔ Jump if the result is greater than or equal to zero ✔ ✔ ✔ Jump if the result is less than or equal to zero ✔...
  • Page 27 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Code blocks ✔ ✔ ✔ Call block CALL LAD / FBD: only with S7-300/400 ✔ ✔ ✔ Conditional block call ✔ ✔ ✔ Unconditional block call Runtime control ✔...
  • Page 28 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Word logic operations ✔ ✔ ✔ ✔ Create ones complement INVERT ✔ ✔ ✔ ✔ Decode DECO ✔ ✔ ✔ ✔ Encode ENCO ✔ ✔ ✔ ✔ Select ✔...
  • Page 29 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ ✔ Shift right word by word ✔ ✔ ✔ ✔ Shift left word by word ✔ ✔ ✔ Shift word by word with sign ✔ ✔...
  • Page 30 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Transfer ✔ ✔ ✔ Transfer ✔ ✔ ✔ Transfer accumulator 1 to status word T STW ✔ ✔ ✔ Switch AR1 and AR2 ✔ ✔ ✔ Transfer AR1 to accumulator 1 TAR1 ✔...
  • Page 31 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ Time accumulator TONR_X ✔ ✔ Save data to shift register ✔ ✔ Shift bit to shift register SHRB ✔ ✔ Get status bit Status -||- A 0V ✔...
  • Page 32 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ Program display (null instruction) ✔ ✔ ✔ Null instruction NOP 0 ✔ ✔ ✔ Null instruction NOP 1 A5E33285102-AB Page 31...
  • Page 33: Instruction Groups

    Basic instructions Extended instructions Technology Communication Instructions in the section "Advanced instructions" Instruction groups Page Instruction groups Page Instruction groups Page Date and time Module parameter assignment Recipes & data logging String and Character Interrupts Data block functions Process image Alarms Table functions Distributed I/O...
  • Page 34 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Time-of-day functions ✔ ✔ ✔ ✔ Set time-of-day WR_SYS_T ✔ ✔ ✔ ✔ Read time-of-day RD_SYS_T ✔ ✔ Read local time RD_LOC_T ✔ ✔ Write local time WR_LOC_T ✔...
  • Page 35 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ Set daylight saving time/standard time without SET_SW time-of-day status ✔ ✔ Transfer time-stamped alarms TIMESTMP ✔ Set daylight saving time/standard time with time- SET_SW_S of-day status String and Character ✔...
  • Page 36 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Additional instructions ✔ ✔ ✔ ✔ Determine the length of a character string ✔ ✔ ✔ ✔ Combine character strings CONCAT ✔ ✔ ✔ ✔ Read the left characters of a character string LEFT ✔...
  • Page 37 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Process image ✔ ✔ Update the process image inputs UPDAT_PI ✔ ✔ Update the process image outputs UPDAT_PO ✔ ✔ ✔ Synchronize the process image inputs SYNC_PI ✔ ✔...
  • Page 38: Additional Instructions

    Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Additional instructions ✔ ✔ ✔ Read data record from I/O RD_REC ✔ ✔ ✔ Write data record to I/O WR_REC ✔ ✔ ✔ ✔ Read consistent data of a DP standard slave DPRD_DAT ✔...
  • Page 39 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) PROFIenergy IO controller ✔ ✔ ✔ Start and exit energy-saving mode PE_START_END ✔ ✔ ✔ Start and exit energy-saving mode / Read out PE_CMD status information ✔ ✔ ✔...
  • Page 40 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ Generate list of supported measured values as PE_Measurement_List_RSP answer ✔ ✔ Generate queried measured values as answer PE_Measurement_Value_RSP Module parameter assignment ✔ ✔ ✔ Read module data record RD_DPAR ✔...
  • Page 41 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ ✔ Cancel time-of-day interrupt CAN_TINT ✔ ✔ ✔ ✔ Enable time-of-day interrupt ACT_TINT ✔ ✔ ✔ ✔ Query status of time-of-day interrupt QRY_TINT Time-delay interrupt ✔...
  • Page 42 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Alarms ✔ Generate program alarm with associated values Program_Alarm ✔ Get alarm status Get_AlarmState ✔ Generate user diagnostics alarm that will be Gen_UsrMsg entered in the diagnostics buffer. ✔...
  • Page 43 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ Report up to eight signal changes NOTIFY_8P P stands for process (associated values) ✔ Create PLC alarms without associated values for ALARM_8 eight signals ✔ Create PLC alarms with associated values for ALARM_8P eight signals P stands for process (associated values)
  • Page 44 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ Determine current connection status C_DIAG ✔ ✔ Read system status list RDSYSST ✔ ✔ Read LED status ✔ Read out name of a module Get_Name ✔ Read out information of an IO device GetStationInfo ✔...
  • Page 45 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ Empty data log DataLogClear ✔ ✔ Close data log DataLogClose ✔ Delete data log DataLogDelete ✔ ✔ Data log in new file DataLogNewFile Data block functions ✔ Create data block CREAT_DB ✔...
  • Page 46 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ Execute table instruction ✔ ✔ Copy value from table TBL_WRD ✔ ✔ Link value logically with table element and save WRD_TBL ✔ ✔ Calculate standard deviation ✔...
  • Page 47 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ Determine the module slot belonging to a logical LOG_GEO address S7-1500: only exists to provide compatibility - not recommended ✔ ✔ ✔ Determine the IO addresses from the RD_LGADR hardware ID ✔...
  • Page 48 Basic instructions Extended instructions Technology Communication A5E33285102-AB Page 47...
  • Page 49 Basic instructions Extended instructions Technology Communication Instructions in the section "Technology" Instruction groups Page Instruction groups Page Instruction groups Page Counting (and measuring) Function modules Time-controlled inputs/outputs PID cntrol – compact PID S7-300C functions Motion control Description LAD / FBD (not S7-1200) Counting (and measuring) ✔...
  • Page 50 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) PID basic functions ✔ ✔ ✔ Continuous controller CONT_C ✔ ✔ ✔ Step controller for integrating actuators CONT_S ✔ ✔ ✔ Pulse generator for proportional actuators PULSEGEN ✔ ✔...
  • Page 51 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) S7-300C functions ✔ Position with analog output ANALOG ✔ Position with digital output DIGITAL ✔ Control counter COUNT ✔ Control frequency measurement FREQUENC ✔ Control pulse width modulation Pulse Time-controlled inputs/outputs ✔...
  • Page 52 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Motion control S7-1x00 motion control ✔ ✔ Enable axis MC_Power ✔ ✔ Acknowledge error MC_Reset ✔ ✔ Reference axis MC_Home ✔ ✔ Stop axis MC_Halt ✔ ✔ Move axis to absolute position MC_MoveAbsolute ✔...
  • Page 53 Basic instructions Extended instructions Technology Communication Instructions in the section "Communication" Instruction groups Page Instruction groups Page Instruction groups Page PROFINET and PROFIBUS Fail-safe HMI Panels Communication w. iSlave /iDevice S7 communication Modbus TCP PROFINET CBA Open User Communication Communications processors MPI communication WEB server S7-300C functions...
  • Page 54 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ Receive data uncoordinated URCV ✔ ✔ ✔ Send data in segments BSEND ✔ ✔ ✔ Receive data in segments BRCV ✔ Query connection status C_CNTRL ✔...
  • Page 55 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Open User Communication ✔ ✔ Manage the communications connection and TSEND_C send data via Ethernet ✔ ✔ Manage the communications connection and TRCV_C receive data via Ethernet ✔ ✔...
  • Page 56 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ Change IP configuration parameters IP_CONF ✔ ✔ Exchange data using FETCH and WRITE via FW_TCP ✔ ✔ Exchange data using FETCH and WRITE via FW_IOT ISO-on-TCP WEB server ✔...
  • Page 57 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ For second-generation mobile panels: F_FB_KTP_RNG Managing panels in the effective range Modbus TCP ✔ ✔ Communicate as Modbus TCP client via MB_CLIENT PROFINET ✔ ✔ Communicate as Modbus TCP server via MB_SERVER PROFINET...
  • Page 58 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Communications processors Not for SIMATIC S7-1500 Software Controller CPU 150xS Point-to-point or PtP communication S7-300/400: Commands for ET200SP CM PtP ✔ Configured communications parameters PORT_CFG dynamically ✔ ✔ ✔...
  • Page 59 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ ✔ Receive data Receive_P2P Delete receive buffer RCV_RST ✔ ✔ ✔ ✔ Delete receive buffer Receive_Reset Query RS-232 signals SGN_GET ✔ ✔ ✔ ✔ Read status Signal_Get Set RS-232 signals SGN_SET...
  • Page 60 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) MODBUS (RTU) S7-300/400: Commands for ET200SP CM PtP ✔ Configure port on the PtP module for Modbus MB_COMM_LOAD ✔ ✔ ✔ ✔ Configure communications module for Modbus_Comm_Load Modbus ✔...
  • Page 61 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) PtP link: CP 341 ✔ ✔ Receive data or make data available P_RCV_RK ✔ ✔ Send or fetch data P_SND_RK ✔ ✔ Output message text with up to 4 tags on P_PRT341 printer ✔...
  • Page 62 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) MODBUS slave (RTU) ✔ ✔ Modbus slave instruction for CP 341 MODB_341 ✔ ✔ Modbus slave instruction for CP 441 MODB_441 MODBUS: CP 443 ✔ ✔ Establish communication between MODBUSCP a CP and a partner that supports the OPEN MODBUS/TCP protocol...
  • Page 63 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ Set data flow control using auto. control of the S_V24 RS-232C accompanying signals ✔ ✔ ✔ Modbus slave instruction for ET 200S 1SI S_MODB ✔ ✔...
  • Page 64 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) PROFIBUS DP ✔ ✔ Data transfer to the CP as DP master or DP DP_SEND slave ✔ ✔ Receipt of data from the CP as DP master or DP_RECV DP slave ✔...
  • Page 65 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) PROFIenergy ✔ ✔ Start or end the energy-saving pause PE_START_END_CP ✔ ✔ Extended starting or ending of the energy- PE_CMD_CP saving pause ✔ ✔ Handling of the commands of the IO controller PE_I_DEV_CP in the PROFIenergy device ✔...
  • Page 66 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) GPRSComm:CP 1242-7 ✔ Establish connection via the GSM network TC_CON ✔ Terminate connection via the GSM network TC_DISCON ✔ Send data via the GSM network TC_SEND ✔ Receive data via the GSM network TC_RECV ✔...
  • Page 67 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) Communication with iSlave ✔ ✔ Read data of a communications partner within I_GET own S7 station ✔ ✔ Write data of a communications partner within I_PUT own S7 station ✔...
  • Page 68 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ Write data to communications partner outside X_PUT own S7 station ✔ ✔ Abort existing connection to the X_ABORT communications partner outside own S7 station TeleService ✔ Transfer e-mail TM_Mail ✔...
  • Page 69: Appendix: Optional Instructions

    Basic instructions Extended instructions Technology Communication Appendix: optional instructions Description LAD / FBD (not S7-1200) SIMATIC Ident ✔ ✔ ✔ ✔ Read data from transponder Read ✔ ✔ ✔ ✔ Read out data from code reading system Read_MV ✔ ✔ ✔...
  • Page 70 Basic instructions Extended instructions Technology Communication Description LAD / FBD (not S7-1200) ✔ ✔ ✔ ✔ Switch on/off antennas of RF620R/RF630R Set_ANT_RF600 ✔ ✔ ✔ ✔ Set UHF parameters in the reader Set_Param ✔ ✔ ✔ ✔ Write EPC ID of a UHF transponder Write_EPC_ID ✔...
  • Page 71 Siemens AG Subject to change without prior notice. Digital Factory A5E33285102-AB Postfach 48 48 © Siemens AG 2014 90026 Nuremberg GERMANY www.siemens.com/automation...

This manual is also suitable for:

Simatic s7-1200Simatic s7-400Simatic s7-1500