1 / 29

ECT 464

ECT 464. Lecture 22 Siemens Instructions 1. Today’s Quote: The best way to get the last word is to apologize.

palmer
Télécharger la présentation

ECT 464

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECT 464 Lecture 22 Siemens Instructions 1

  2. Today’s Quote: The best way to get the last word is to apologize. If you have been trapped by what you said,        ensnared by the words of your mouth,then do this, my son, to free yourself,        since you have fallen into your neighbor's hands:        Go and humble yourself;        press your plea with your neighbor! Proverbs 6:2,3

  3. Standard Contacts

  4. Standard Contacts The Normally Open contact instructions (LD, A, and O) and Normally Closed contact instructions (LDN, AN, ON) obtain the referenced value from the memory or from the process-image register. The standard contact instructions obtain the referenced value from the memory (or process-image register if the data type is I or Q). The Normally Open contact is closed (on) when the bit is equal to 1, and the Normally Closed contact is closed (on) when the bit is equal to 0. In FBD, inputs to both the And and Or boxes can be expanded to a maximum of 32 inputs. In STL, the Normally Open instructions Load, AND, or OR the bit value of the address bit to the top of the stack, and the Normally Closed instructions Load, AND, or OR the logical NOT of the bit value to the top of the stack.

  5. Immediate Contacts An immediate contact does not rely on the S7-224 scan cycle to update; it updates immediately. The Normally Open Immediate contact instructions (LDI, AI, and OI) and Normally Closed Immediate contact instructions (LDNI, ANI, and ONI) obtain the physical input value when the instruction is executed, but the process-image register is not updated. The Normally Open Immediate contact is closed (on) when the physical input point (bit) is 1, and the Normally Closed Immediate contact is closed (on) when the physical input point (bit) is 0. The Normally Open instructions immediately Load, AND, or OR the physical input value to the top of the stack, and the Normally Closed instructions immediately Load, AND, or OR the logical NOT of the value of the physical input point to the top of the stack.

  6. Standard Contacts

  7. NOT Instruction The Not instruction (NOT) changes the state of power flow input (that is, it changes the value on the top of the stack from 0 to 1 or from 1 to 0).

  8. Positive and Negative Transition Instructions The Positive Transition contact instruction (EU) allows power to flow for one scan for each off-to-on transition. The Negative Transition contact instruction (ED) allows power to flow for one scan for each on-to-off transition. For the Positive Transition instruction, detection of a 0-to-1 transition in the value on the top of the stack sets the top of the stack value to 1; otherwise, it is set to 0. For a Negative Transition instruction, detection of a 1-to-0 transition in the value on the top of the stack sets the top of the stack value to 1; otherwise, it is set to 0.

  9. Example 1

  10. Example 2

  11. Example 3

  12. Output Instructions

  13. Output Instructions The Output instruction (=) writes the new value for the output bit to the process-image register. When the Output instruction is executed, the S7-224 turns the output bit in the process-image register on or off. For LAD and FBD, the specified bit is set equal to power flow. For STL, the value on the top of the stack is copied to the specified bit.

  14. Output Instructions The Output Immediate instruction (=I) writes the new value to both the physical output and the corresponding process-image register location when the instruction is executed. When the Output Immediate instruction is executed, the physical output point (Bit) is immediately set equal to power flow. For STL, the instruction immediately copies the value on the top of the stack to the specified physical output bit (STL). The “I” indicates an immediate reference; the new value is written to both the physical output and the corresponding process-image register location when the instruction is executed. This differs from the non-immediate references, which write the new value to the process-image register only.

  15. Output Instructions The Set (S) and Reset (R) instructions set (turn on) or reset (turn off) the specified number of points (N), starting at the specified address (Bit). You can set or reset from 1 to 255 points. If the Reset instruction specifies either a timer bit (T) or counter bit (C), the instruction resets the timer or counter bit and clears the current value of the timer or counter.

  16. Output Instructions The Set Immediate and Reset Immediate instructions immediately set (turn on) or immediately reset (turn off) the number of points (N), starting at specified address (Bit). You can set or reset from 1 to 128 points immediately. The “I” indicates an immediate reference; when the instruction is executed, the new value is written to both the physical output point and the corresponding process-image register location. This differs from the non-immediate references, which write the new value to the process-image register only.

  17. Output Example 1

  18. Output Example 2

  19. Output Example 3

  20. Logic Stack Instructions AND Load - The AND Load instruction (ALD) combines the values in the first and second levels of the stack using a logical AND operation. The result is loaded in the top of stack. After the ALD is executed, the stack depth is decreased by one. OR Load - The OR Load instruction (OLD) combines the values in the first and second levels of the stack, using a logical OR operation. The result is loaded in the top of the stack. After the OLD is executed, the stack depth is decreased by one.

  21. Logic Stack Instructions Logic Push - The Logic Push instruction (LPS) duplicates the top value on the stack and pushes this value onto the stack. The bottom of the stack is pushed off and lost. Logic Read - The Logic Read instruction (LRD) copies the second stack value to the top of stack. The stack is not pushed or popped, but the old top-of-stack value is destroyed by the copy. Logic Pop - The Logic Pop instruction (LPP) pops one value off of the stack. The second stack value becomes the new top of stack value.

  22. Logic Stack Instructions AND ENO - The AND ENO instruction (AENO) performs a logical AND of the ENO bit with the top of the stack to generate the same effect as the ENO bit of a box in LAD or FBD. The result of the AND operation is the new top of stack. ENO is a Boolean output for boxes in LAD and FBD. If a box has power flow at the EN input and is executed without error, the ENO output passes power flow to the next element. You can use the ENO as an enable bit that indicates the successful completion of an instruction. The ENO bit is used with the top of stack to affect power flow for execution of subsequent instructions. STL instructions do not have an EN input. The top of the stack must be a logic 1 for conditional instructions to be executed. In STL there is also no ENO output. However, the STL instructions that correspond to LAD and FBD instructions with ENO outputs set a special ENO bit. This bit is accessible with the AENO instruction.

  23. Logic Stack Instructions Load Stack - The Load Stack instruction (LDS) duplicates the stack bit (N) on the stack and places this value on top of the stack. The bottom of the stack is pushed off and lost. N is a byte from 0-8.

  24. Logic Stack Instructions

  25. Logic Stack Example 1

  26. Logic Stack Example 2

  27. Set and Reset Dominant Bistable Instructions The Set Dominant Bistable is a latch where the set dominates. If the set (S1) and reset (R) signals are both true, the output (OUT) is true. The Reset Dominant Bistable is a latch where the reset dominates. If the set (S) and reset (R1) signals are both true, the output (OUT) is false. The Bit parameter specifies the Boolean parameter that is set or reset. The optional output reflects the signal state of the Bit parameter.

  28. Set and Reset Dominant Bistable Instructions

  29. Set and Reset Dominant Bistable Instructions

More Related