0

PROGRAMMING IN STATEMENT LIST

What is Statement List?

Statement List (STL) is a textual programming language that can be used to create the code section of logic blocks. Its syntax for statements is similar to assembler language and consists of instructions followed by addresses on which the instructions act.

The Programming Language STL

Of all the programming languages with which you can program S7 controllers, STL is the closest to the machine code MC7 of the S7 CPU. This means that by using it to program S7 controllers, you can optimize the run time and the use of memory.
The programming language STL has all the necessary elements for creating a complete user program. It contains a comprehensive range of instructions. A total of over 130 different basic instructions and a wide range of addresses are available. Functions and function blocks allow you to structure your STL program clearly.

The Programming Package

The STL programming package is an integral part of the STEP 7 Standard Software. This means that following the installation of your STEP 7 software, all the editor functions, compiler functions and test/debug functions for STL are available to you.
Using STL, you can create your own user program as follows:
_ With the Incremental Editor. The input of the local data structure is made easier with the help of table editors.
_ With a source file in the Text Editor. Text input is made easier with the help of block templates.

There are three programming languages in the standard software, STL, FBD, and LAD. You can switch from one language to the other almost without restriction and choose the most suitable language for the particular block you are programming.
If you write programs in LAD or FBD, you can always switch over to the STL representation. If you convert LAD programs into FBD programs and vice versa, program elements that cannot be represented in the destination language are displayed in STL.

A STATEMENT CONSISTS OF AN INSTRUCTION AND AN ADDRESS

Address of an Instruction

The address of an instruction indicates a constant or the location where the instruction finds a value (data object) on which to perform an operation. The address can have a symbolic name or an absolute designation. The address can point to any of the following items :
_ A constant, the value of a timer or counter, or an ASCII character string to be loaded into accumulator 1 (for example, L +27 See Table 2.1)
_ A bit in the status word of the programmable logic controller
_ A symbolic name (for example, A Motor.On, see Table 2-3)
_ A data block and a location within the data block area (for example, L DB4.DBD10, see Table 2-4)
_ A function (FC), function block (FB), integrated system function (SFC), or integrated system function block (SFB) and the number of the function or block (see Table 2-5)
_ An address identifier and a location within the memory area that is indicated by the address identifier (for example, A I 1.0)



 
COMMANDS USED IN STATEMENT LIST


)                       Nesting Closed
=                      Assign
A                      And
A(                     And with Nesting Open
AN                    And Not
AN(                   And Not with Nesting Open
FN                    Edge Negative
FP                    Edge Positive
O                      Or
O                      And before Or
O(                     Or with Nesting Open
ON                   Or Not
ON(                  Or Not with Nesting Open
R                      Reset
S                      Set



Labels

Actuator Sensor-interface Address Negative Edge Detection Address Positive Edge Detection ADDRESSING ANALOG INPUTS ANALOG OUTPUTS AND Logic Operation AS-i AS-i configuration Assign Authorizations Automation License Manager BASICS Bit Bit Configuration Bit Logic Instructions Block By-passing CiR CiR Modules CiR Objects communication COMPARISON Components Configuration Configuring Connections Conversion Converting Counter CP 343-2 P CP 443-5 Ext CPU CPU 412-1 CPU 412-2 DP CPU 412-2 PCI CPU 414-2 DP CPU 414-3 DP CPU 414-4 H CPU 416-2 DP CPU 416-2 PCI CPU 416-3 DP CPU 416F-2 CPU 417-4 CPU 417-4 H Data Block DI/DO MODULES Diagnosing Diagnosis DIGITAL INPUTS DIGITAL OUTPUTS Downloading DP master English Mnemonics ET 200M Exclusive OR Logic Operation Extended pulse timer fail-safe modules fault FBD Floating- Point Floating-Point Math FUNCTION MODULES German Mnemonics Hardware hmi Input Insert Binary Input install Instructions Integer Math INTERFACE MODULES Jump License License Keys Load Memory Master Control Relay Memory Areas Memory Reset Midline Output Modifying MODULES monitoring variables Move NEG Negate Binary Input Negative RLO Edge Detection Networks Off-delay timer On-delay timer Operating systems OR Logic Operation Output PID Control PLC POS position decoder Positive RLO Edge Detection PROFIBUS Program Control programm Programming Pulse timer RELAY OUTPUTS Remote Reset Output Reset_Set Flip Flop Retentive on-delay timer Rotate RS S5 File S7 Communications S7-300 S7-400 SAVE Save RLO to BR Memory SCADA Set Output Set_Reset Flip Flop Shift siemens SIMATIC SIMATIC Manager Slaves Software SR STATEMENT Status Bit STEP 7 stop mode Time Base Time Value Timer Timer Cell TRAINING MODULE Units Upgrading UPLOADING WinLC RTX Word Logic Work Memory XOR