Siemens Simatic Manager Tutorial

Siemens Simatic Manager Tutorial

Most of the professionals search simatic manager tutorial at beginners stage. Here we are representing simatic manager tutorial by help of which beginners can get a good hand on SIEMENS Simatic Manager.

SIEMENS ADDRESS

Although this is Simatic manager tutorial but if you learn this basic part you can also work with the advanced TIA portal.

System Default Address

Input 

I124.0…………………………I124.7

Output

Q124.0………………………………..Q124.7

(System Default address Input/output address is the input/output address we get on selection of CPU from hardware)

User Define Address 

Input 

I0.0…………………………….I0.7

I1.0………………………………I1.7

Output

Q0.0…………………………….Q0.7

Q1.0……………………………..Q1.7

Internal Memory Bit 

M0.0……………………………M0.7

M1.0……………………………..M1.7

Upto

M124.0………………………….M124.7

Integer

MW0 , MW2 , MW4 ,…….  Upto…..   MW124

Double Integer

MD0 , MD4 , MD8 ,……….  Upto…..   MD124

Timer

T0,T1,T2…..   Upto………..  T255

Counter 

C0,C1,C2,….    Upto……….   C255

Procedure for Configuration

Requirement

You must have opened a project or created a new project in the SIMATIC Manager.

Basic Procedure

To configure and assign parameters to a structure, proceed as shown below:

Create a station→Call up the application”Configuring Hardware”→ Arrange racks → Arrange Modules → Determine Module Properties → save configuration → Download configuration to the PLC

Creating a New Project

Requirement

You must have opened the SIMATIC Manager and opened a project or created a new project.

Procedure

A station can only be created directly beneath a project.

  1. Select the project in the left half of the project window.
  2. Select the menu command Insert > Station > SIMATIC 300-
    The station is created with a preset name. You can replace the name of the station with a more relevant name of your own.

Configure the Hardware

Requirement

You must have created a station (SIMATIC 300,).

Procedure

  1. Select the “Station” object in the project window so that the “Hardware” object becomes visible in the right half of the station window.

  1. Double­click on the ”Hardware” object.

Rack

Requirement

The station window must be open and you must have a plan of the hardware configuration of the station.

Procedure

  1. Select a suitable central rack (“Rack”) for your configuration from the ”Hardware Catalog” window; in SIMATIC 300 the Rail.

 

Drag the rack to the station window.
The rack appears in the form of a small configuration table in the upper part of the station window. In the lower part of the window, the detailed view of the rack appears with additional information such as the order number, MPI address, and I/O addresses.
Alternatively to steps 1 and 2, you can also double-click the rack in the

Slot Rules (S7-300)

Rack 0:

  • Slot 1: Power supply only (for example, 6ES7 307-…) or empty
  • Slot 2: CPU only (for example, 6ES7 314-…)
  • Slot 3: Interface module (for example, 6ES7 360-…/361-…) or empty
  • Slots 4 through 11: Signal or function modules, communications processors, or free.

Save and Compile

Download to PLC

Project Structure

Projects are used to store the data and programs which are created when you put together an automation solution. The data collected together in a project include:

  • Configuration data on the hardware structure and parameters for modules,
  • Configuration data for communication in networks, and
  • Programs for programmable modules.

The main task when you create a project is preparing these data for programming.

Data are stored in a project in object form. The objects in a project are arranged in a tree structure (project hierarchy). The display of the hierarchy in the project window is similar to that of the Windows Explorer. Only the object icons have a different appearance.

The top end of the project hierarchy is structured as follows:

Project Object

The project represents the entirety of all the data and programs in an automation solution, and is located at the top of an object hierarchy.

Station Object

A SIMATIC 300station represents a S7 hardware configuration with one or more programmable modules.

Programmable Module Object

A programmable module represents the parameter assignment data of a programmable module (CPUxxx, FMxxx, CPxxx). The system data of modules with no retentive memory (for example, CP312C) are loaded via the CPU of the station. For this reason, no “system data” object is assigned to such modules and they are not displayed in the project hierarchy.

S7 Program Object

A (S7)program folder contains software for S7 CPU modules or software for non-CPU modules (for example, programmable CP or FM modules).

Source File Folder Object

A source file folder contains source programs in text format

Block Folder Object

A block folder of an offline view can contain: logic blocks (OB, FB, FC, SFB, SFC), data blocks (DB), user-defined data types (UDT) and variable tables. The system data object represents system data blocks.

The block folder of an online view contains the executable program parts that have been downloaded to the programmable controller.

Organization Blocks (OBs)

Organization Blocks (OBs) are the interface between the operating system of the CPU and the user program. OBs are used to execute specific program sections:

 

Bit Logic Instructions

Bit logic instructions work with two digits, 1 and 0. These two digits form the base of a number system called the binary system. The two digits 1 and 0 are called binary digits or bits. In the world of contacts and coils, a 1 indicates activated or energized, and a 0 indicates not activated or not energized.

 

—|   |—      Normally Open Contact (Address)

—|  |— (Normally Open Contact) is closed when the bit value stored at the specified <address> is equal to “1”. When the contact is closed, ladder rail power flows across the contact and the result of logic operation = “1”.

When used in series, —|  |—  is linked to the logic operation bit by AND logic. When used in parallel, it is linked to the logic operation by OR logic.

 —| / |—      Normally Closed Contact (Address)

–| / |— (Normally Closed Contact) is closed when the bit value stored at the specified <address> is equal to “0”. When the contact is closed, ladder rail power flows across the contact and the result of logic operation = “1”.

When used in series, –| / |—  is linked to the logic operation bit by AND logic. When used in parallel, it is linked to the logic operation by OR logic.

—(SAVE)   Save

—(SAVE) to save the logic operation by the network the next network.

 —(  )           Output Coil  

 —(   ) (Output Coil) works like a coil in a relay logic diagram. If there is power flow to the coil the bit at location <address> is set to “1”. If there is no power flow to the coil, the bit at location <address> is set to “0”. An output coil can only be placed at the right end of a ladder rung. Multiple output elements (max. 16) are possible (see example). A negated output can be created by using the —|NOT|— (invert power flow) element.

—( # )—      Midline Output

—( # )— (Midline Output) is an intermediate assigning element which saves the logic operation bit (power flow status) to a specified <address>. The midline output element saves the logical result of the preceding branch elements. In series with other contacts, —( # )— is inserted like a contact. A —( # )— element may never be connected to the power rail or directly after a branch connection or at the end of a branch. A negated —( # )— can be created by using the —|NOT|— (invert power flow) element.

—|NOT|—   Invert Power Flow

  –|NOT|— (Invert Power Flow) negates the bit.

 

—( S )     Set Coil

—( S ) (Set Coil) is executed only if the logic operation of the preceding instructions is “1” (power flows to the coil). If the RLO is “1” the specified <address> of the element is set to “1”.

—( R )     Reset Coil

–( R ) (Reset Coil) is executed only if the logic operation of the preceding instructions is “1” (power flows to the coil). If power flows to the coil, the specified <address> of the element is reset to “0”. A logic operation of “0” (no power flow to the coil) has no effect and the state of the element’s specified address remains unchanged. The <address> may also be a timer (T no.) whose timer value is reset to “0” or a counter (C no.) whose counter value is reset to “0”.

SR           Set-Reset Flip Flop

SR (Set-Reset Flip Flop) is set if the signal state is “1” at the S input, and “0” at the R input. Otherwise, if the signal state is “0” at the S input and “1” at the R input, the flip flop is reset. If the logic operation is “1” at both inputs, the order is of primary importance. The SR flip flop executes first the set instruction then the reset instruction at the specified <address>, so that this address remains reset for the remainder of program scanning.

The S (Set) and R (Reset) instructions are executed only when the logic operation is “1”. logic operation “0” has no effect on these instructions and the address specified in the instruction remains unchanged.

 

RS        Reset-Set Flip Flop

   RS (Reset-Set Flip Flop) is reset if the signal state is “1” at the R input, and “0” at the S input. Otherwise, if the signal state is “0” at the R input and “1” at the S input, the flip flop is set. If the logic operation is “1” at both inputs, the order is of primary importance. The RS flip flop executes first the reset instruction then the set instruction at the specified <address>, so that this address remains set for the remainder of program scanning.

The S (Set) and R (Reset) instructions are executed only when the logic operation is “1”. logic operation “0” has no effect on these instructions and the address specified in the instruction remains unchanged.

 

—(N)—    Negative Edge Detection

   —( N )— (Negative Edge Detection) detects a signal change in the address from “1” to “0” and displays it as logic operation = “1” after the instruction. The current signal state in the logic operation is compared with the signal state of the address, the edge memory bit. If the signal state of the address is “1” and the logic operation was “0” before the instruction, the logic operation will be “1” (pulse) after this instruction, and “0” in all other cases. The logic operation prior to the instruction is stored in the address.

 

—(P)—    Positive Edge Detection

—( P )— (Positive Edge Detection) detects a signal change in the address from “0” to “1” and displays it as logic operation = “1” after the instruction. The current signal state in the logic operation is compared with the signal state of the address, the edge memory bit. If the signal state of the address is “0” and the logic operation was “1” before the instruction, the logic operation will be “1” (pulse) after this instruction, and “0” in all other cases. The logic operation prior to the instruction is stored in the address.

 

NEG         Address Negative Edge Detection

   NEG (Address Negative Edge Detection) compares the signal state of <address1> with the signal state from the previous scan, which is stored in <address2>. If the current logic operation state is “1” and the previous state was “0” (detection of rising edge), logic operation bit will be “1” after this instruction.

 

POS         Address Positive Edge Detection

POS (Address Positive Edge Detection) compares the signal state of <address1> with the signal state from the previous scan, which is stored in <address2>. If the current logic operation state is “1” and the previous state was “0” (detection of rising edge), the logic operation bit will be “1” after this instruction.

 

Comparison Instructions

IN1 and IN2 are compared according to the type of comparison you choose:

==     IN1  is equal to  IN2

<>     IN1  is not equal to  IN2

 

>       IN1  is greater than  IN2

<       IN1  is less than  IN2

 

>=     IN1  is greater than  or equal to  IN2

<=     IN1  is less than  or  equal to  IN2

 

Conversion Instructions

The conversion instructions read the contents of the parameters IN and convert these or change the sign. The result can be queried at the parameter OUT.

The following conversion instructions are available:

BCD_I       BCD to Integer

BCD_I (Convert BCD to Integer) reads the contents of the IN parameter as a three-digit, BCD coded number (+/- 999) and converts it to an integer value (16-bit). The integer result is output by the parameter OUT. ENO always has the same signal state as EN.

I_BCD       Integer to BCD

I_BCD (Convert Integer to BCD) reads the content of the IN parameter as an integer value (16-bit) and converts it to a three-digit BCD coded number (+/- 999). The result is output by the parameter OUT. If an overflow occurred, ENO will be “0”.

 

BCD_DI     BCD to Double Integer

    BCD_DI (Convert BCD to Double Integer) reads the content of the IN parameter as a seven-digit, BCD coded number (+/- 9999999) and converts it to a double integer value (32-bit). The double integer result is output by the parameter OUT. ENO always has the same signal state as EN.

 

I_DINT       Integer to Double Integer

    I_DINT (Convert Integer to Double Integer) reads the content of the IN parameter as an integer (16-bit) and converts it to a double integer (32-bit). The result is output by the parameter OUT. ENO always has the same signal state as EN.

DI_BCD     Double Integer to BCD

    DI_BCD (Convert Double Integer to BCD) reads the content of the IN parameter as a double integer (32-bit) and converts it to a seven-digit BCD coded number (+/- 9999999). The result is output by the parameter OUT. If an overflow occurred, ENO will be “0”.

DI_REAL    Double Integer to Floating-Point

       DI_REAL (Convert Double Integer to Floating-Point) reads the content of the IN parameter as a double integer and converts it to a floating-point number. The result is output by the parameter OUT. ENO always has the same signal state as EN.

 

INV_I        Ones Complement Integer

      INV_I (Ones Complement Integer) reads the content of the IN parameter and performs a Boolean XOR function with the hexadecimal mask W#16#FFFF. This instruction changes every bit to its opposite state. ENO always has the same signal state as EN.

INV_DI     Ones Complement Double Integer

     INV_DI (Ones Complement Double Integer) reads the content of the IN parameter and performs a Boolean XOR function with the hexadecimal mask W#16#FFFF FFFF .This instruction changes every bit to its opposite state. ENO always has the same signal state as EN.

 

NEG_I      Twos Complement Integer

NEG_I (Twos Complement Integer) reads the content of the IN parameter and performs twos complement instruction. The twos complement instruction is equivalent to multiplication by (-1) and changes the sign (for example: from a positive to a negative value). ENO always has the same signal state as EN with the following exception: if the signal state of EN = 1 and an overflow occurs, the signal state of ENO = 0.

NEG_DI    Twos Complement Double Integer

  NEG_DI (Twos Complement Double Integer) reads the content of the IN parameter and performs a twos complement instruction. The twos complement instruction is equivalent to multiplication by (-1) and changes the sign (for example: from a positive to a negative value). ENO always has the same signal state as EN with the following exception: if the signal state of EN = 1 and an overflow occurs, the signal state of ENO = 0.

 

NEG_R      Negate Floating-Point Number

NEG_R (Negate Floating-Point) reads the contents of the IN parameter and changes the sign. The instruction is equivalent to multiplication by (-1) and changes the sign (for example: from a positive to a negative value). ENO always has the same signal state as EN.

 

ROUND     Round to Double Integer

       ROUND (Round Double Integer) reads the content of the IN parameter as a floating-point number and converts it to a double integer (32-bit). The result is the closest integer number (“Round to nearest”). If the floating-point number lies between two integers, the even number is returned. The result is output by the parameter OUT. If an overflow occurred ENO will be “0”.

TRUNC      Truncate Double Integer Part

         TRUNC (Truncate Double Integer) reads the content of the IN parameter as a floating-point number and converts it to a double integer (32-bit). The double integer result of the (“Round to zero mode”) is output by the parameter OUT. If an overflow occurred, ENO will be “0”.

CEIL          Ceiling

          CEIL (Ceiling) reads the contents of the IN parameter as a floating-point number and converts it to a double integer (32-bit). The result is the lowest integer which is greater than the floating-point number (“Round to + infinity”). If an overflow occurs, ENO will be “0”.

 

FLOOR      Floor

FLOOR (Floor) reads the content of the IN parameter as a floating-point number and converts it to a double integer (32-bit). The result is the greatest integer component which is lower than the floating-point number (“Round to – infinity”). If an overflow occurred ENO will be “0”.

Counter Instructions

You can vary the count value within this range by using the following counter instructions:

S_CUD      Up-Down Counter

       S_CUD (Up-Down Counter) is preset with the value at input PV if there is a positive edge at input S. If there is a 1 at input R, the counter is reset and the count is set to zero. The counter is incremented by one if the signal state at input CU changes from “0” to “1” and the value of the counter is less than “999”. The counter is decremented by one if there is a positive edge at input CD and the value of the counter is greater than “0”.

If there is a positive edge at both count inputs, both instructions are executed and the count value remains unchanged.

If the counter is set and if RLO = 1 at the inputs CU/CD, the counter will count accordingly in the next scan cycle, even if there was no change from a positive to a negative edge or viceversa.

S_CU         Up Counter

S_CU (Up Counter) is preset with the value at input PV if there is a positive edge at input S.

The counter is reset if there is a “1” at input R and the count value is then set to zero.

The counter is incremented by one if the signal state at input CU changes from “0” to “1” and the value of the counter is less than “999”.

If the counter is set and if RLO = 1 at the inputs CU, the counter will count accordingly in the next scan cycle, even if there was no change from a positive to a negative edge or viceversa.

S_CD         Down Counter

      S_CD (Down Counter) is set with the value at input PV if there is a positive edge at input S.

The counter is reset if there is a 1 at input R and the count value is then set to zero.

The counter is decremented by one if the signal state at input CD changes from “0” to “1” and the value of the counter is greater than zero.

If the counter is set and if RLO = 1 at the inputs CD, the counter will count accordingly in the next scan cycle, even if there was no change from a positive to a negative edge or viceversa.

Logic Control Instructions

You can use logic control instructions in all logic blocks: organization blocks (OBs), function blocks (FBs), and functions (FCs).

There are logic control instructions to perform the following functions:

—( JMP )—     Conditional Jump

      —( JMP ) (jump within the block when 1) functions as an absolute jump when there is no other Ladder element between the left-hand power rail and the instruction (see example).

A destination (LABEL) must also exist for every —( JMP ).

All instructions between the jump instruction and the label are not executed.

Example

 

—( JMPN )—   Jump-If-Not

—( JMPN ) (Jump-If-not) corresponds to a “goto label” function which is executed if the RLO is “0”.

A destination (LABEL) must also exist for every —( JMPN ).

All instructions between the jump instruction and the label are not executed.

If a conditional jump is not executed, the RLO changes to “1” after the jump instruction.

Example

Integer Math Instructions

Using integer math, you can carry out the following operations with two integer numbers (16 and 32 bits):

 

ADD_I  ,  Add Integer , ADD_DI    Add Double Integer,

ADD_R    Add Real

          ADD_I (Add Integer), ADD_DI(Add Double Integer), ADD_R(Add Real) is activated by a logic “1” at the Enable (EN) Input. IN1 and IN2 are added and the result can be scanned at OUT. You can use the double integer,Real instructions to perform the following math instructions using two 32-bit

Example

SUB_I     Subtract Integer  , SUB_DI    Subtract Double Integer,

SUB_R    Subtract Real,

        SUB_I (Subtract Integer) is activated by a logic “1” at the Enable (EN) Input. IN2 is subtracted from IN1 and the result can be scanned at OUT. You can use the double integer,Real math instructions to perform the following math instructions using two 32-bit

Example

MUL_I     Multiply Integer , MUL_DI    Multiply Double Integer

MUL_R    Multiply Real

           MUL_I (Multiply Integer) is activated by a logic “1” at the Enable (EN) Input. IN1 and IN2 are multiplied and the result can be scanned at OUT. You can use the double integer,Real math instructions to perform the following math instructions using two 32-bit

Example

 

DIV_I       Divide Integer , DIV_DI      Divide Double Integer

DIV_R     Divide Real

    ADD_I (Add Integer) is activated by a logic “1” at the Enable (EN) Input. IN1 and IN2 are added and the result can be scanned at OUT. You can use the double integer,Real math instructions to perform the following math instructions using two 32-bit

Example

 

MOD_DI    Return Fraction Double Integer

MOD_DI (Return Fraction Double Integer) is activated by a logic “1” at the Enable (EN) Input. IN1 is divided by IN2 and the fraction can be scanned at OUT.

Example

Floating-Point Math Instruction

The IEEE 32-bit floating-point numbers belong to the data type called REAL. You can use the floating-point math instructions to perform the following math instructions using two 32-bit IEEE floating-point numbers:

Using floating-point math, you can carry out the following operations with one 32-bit IEEE floating-point number:

ABS

      ABS establishes the absolute value of a floating-point number.

Example

SQR 

SQR establishes the square of a floating-point number.

Example

SQRT

     SQRT establishes the square root of a floating-point number. This instruction issues a positive result when the address is greater than “0”. Sole exception: the square root of -0 is -0.

Example

EXP

      EXP establishes the exponential value of a floating-point number on the basis e (=2,71828…).

Example

Establish the following Trigonometrical functions of an angle represented as a 32-bit IEEE floating-point number

 SIN Sine

SIN establishes the sine value of a floating-point number. The floating-point number represents an angle in a radian measure here.

Example

 

 ASIN Arc Sine 

      ASIN establishes the arc sine value of a floating-point number with a definition range -1 <= input value <= 1. The result represents an angle in a radian measure within the range.

Example

COS Cosine

COS establishes the cosine value of a floating-point number. The floating-point number represents an angle in a radian measure here.

Example

  ACOS Arc Cosine 

              ACOS establishes the arc cosine value of a floating-point number with a definition range -1 <= input value <= 1. The result represents an angle in a radian measure within the range

Example

 

TAN Tangent

TAN establishes the tangent value of a floating-point number. The floating-point number represents an angle in a radian measure here.

Example

ATAN Arc Tangent 

           ATAN establishes the arc tangent value of a floating-point number. The result represents an angle in a radian measure within the range

Example

 

 

  MOVE

        MOVE (Assign a Value) is activated by the Enable EN Input. The value specified at the IN input is copied to the address specified at the OUT output. MOVE can copy only WORD, DWORD data objects

Example

PROGRAM CONTROL

   Establish the following Program Control functions.

—( CALL )

—(Call) is used to call a function (FC)

Example

Shift and Rotate Instructions

You can use the Shift instructions to move the contents of input IN bit by bit to the left or the right

SHR_I         Shift Right Integer

SHR_I (Shift Right Integer) is activated by a logic “1” at the Enable (EN) Input. The SHR_I instruction is used to shift bits 0 to 15 of input IN bit by bit to the right. Bits 16 to 31 are not affected. The input N specifies the number of bits by which to shift. If N is larger than 16, the command acts as if N were equal to 16. The bit positions shifted in from the left to fill vacated bit positions are assigned the logic state of bit 15 (sign bit for the integer). This means these bit positions are assigned “0” if the integer is positive and “1” if the integer is negative. The result of the shift instruction can be scanned at output OUT. The CC 0 bit and the OV bit are set to “0” by SHR_I if N is not equal to 0.

SHR_DI       Shift Right Double Integer

SHR_DI (Shift Right Double Integer) is activated by a logic “1” at the Enable (EN) Input. The SHR_DI instruction is used to shift bits 0 to 31 of input IN bit by bit to the right. The input N specifies the number of bits by which to shift. If N is larger than 32, the command acts as if N were equal to 32. The bit positions shifted in from the left to fill vacated bit positions are assigned the logic state of bit 31 (sign bit for the double integer). This means these bit positions are assigned “0” if the integer is positive and “1” if the integer is negative. The result of the shift instruction can be scanned at output OUT. The CC 0 bit and the OV bit are set to “0” by SHR_DI if N is not equal to 0.

This is all about the basic Simatic Manager Tutorial. For More Programming Tutorial Keep in Touch with our website. Visit our education partner Etrishna for education related search …

Leave a Reply

Your email address will not be published. Required fields are marked *