Jump to content

Recommended Posts

Posted
Hellow, From what I know the PLC cicle is something like this: 1. The inputs are scanned 2. The rungs are logicaly solved 3. The autputs are scanned My question is, after a rung is logicaly solved and it's afferent output is energised, and that output is used in the very next rung, what value is taken in consideration in this next rung, the value that was recently solved on the anterior rung, or the value that was wirtten in the output tabel at the final of the anterior cycle. An example: Q2 Q1 | / |------------- ( ) Q1 Q2 | | ------------- ( ) | | Q2 | | | ---- Variant I: 1. The inputs are scaned 2. First rung is logicaly solved, Q1 coil is energized, takes the boolean value 1 3. Now is the second rung turn. The Q1 contact is open ( because Q1 wasn't writen in the output table at the step 3 of the PLC cycle ) the Q2 contact is open too. 4. At the final o this PLC cycle, the outputs are updated: Q1 is true and Q2 is false Now follows the next cycle: 1. Rung 1: Q2 normal closed stays closed and Q1 coil is energised 2. Q1 is true form the anetrior cycle and thus Q2 is energised .... .... Variant II: 1. The inputs are scanned 2. First rung is logicaly solved, Q1 coil is energized, takes the value true 3. The second rung: Q1 contact is closed ( because Q1 was energised in the anterior rung ) and the Q2 coil is energised. ... ... Thank you,
Posted
logic is scanned line by line... once one line is processed, modified output variable is ready to be used in the next line of code. in short, it is "variant II"
Posted (edited)
Inputs are scanned and copied into a location in memory called the input image table. While the program is scanned the PLC uses the input image table in memory. It doesn't go back out to the inputs, it goes to the table in memory. As it solves the rungs it writes the result back to memory. Bits that are addressed to an ouput are written to a memory location called an output image table. If an -] [- or -]\[- instruction addresses an output the PLC looks in memory, it doesn't look at the physical outputs. So if a 1 is written into memory location Q1, then a 1 will be there when Q1 is read later on in the program scan. After the end of the program the output image table in memory is copied to the physical outputs. Be aware that not all PLCs use synchronous IO updates. Some PLCs will do periodic IO updates, which means that the image table of the IO in memory can change in the middle of a scan. Edited by TConnolly

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...