Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To add to Jim C's answer, it is worth noting, also, that many (most?) PLCs will allow you to use a special "immediate" type instruction which reads the status of the contact/relay/input/etc directly (as opposed to reading from the IO image) when the CPU scan reaches that particular rung. This typically does not update the IO image, meaning that all other normal reads of that contact for the remainder of the CPU scan will read the old value in the register unless they too are of the "immediate" type.</p> <p>Example :</p> <pre><code>//Start of Program // Here the CPU scan starts with X1 closed, X2 closed in the IO image LD X1 //(X1 = closed) AND X2 //(X2 = closed) OUT Y1 //(Y1 will be set high/closed) // **suddenly X1 opens** //(using LDI here to denote "immediate") LDI X1 //(open - reading true status) AND X2 //(closed) OUT Y1 //(Y1 will now open) LD X1 //(reading from image = closed, still) AND X2 //(closed) OUT Y1 //(Y1 will close again) END of Program </code></pre> <p>Then, on the next CPU scan the image will update with the new value (X1=open) and all three rungs will return Y1 open.</p> <p>Immediate instructions usually come with a time penalty, of course, because the PLC must take extra time to seek the current value of the contact rather than read from the image. They can, however, be useful depending on how you want your program to operate. These instructions MUST be used explicitly, however, and the normal operation is simply to read from the IO image, as Jim noted.</p> <p>ps: I used "LDI" here to denote the immediate instruction, but all PLCs will use different syntax. Koyos, for example, use STR (store) instead of LD and STRI (store immediate).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload