Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Sequential ladder programming

alexjaw69
2014-09-29
2014-10-02
  • alexjaw69 - 2014-09-29

    I cant find information about how to initialize the first sequence in a ladder program (in SFC we have the Init). In some Mitsubishi controllers a sequence is initialized with the memory address M8002. What is the corresponding address using Codesys and Codesys control win v3?

     
  • ndzied1 - 2014-09-29

    A ladder program will run when the POU it is in a task that is running and will generally run with a cyclic interval time.

    Other than that, you can create initialization steps that are conditioned from within the program itself by latching bits, etc.

     
  • alexjaw69 - 2014-09-30

    Hmm...
    Here is an image of a sequential ladder program. There are some steps and some transitions. When the program is started there must be a special memory that is TRUE (denoted ???) so that the sequence can can make the first transition from step0 to step1. After this first transition, the special memory address is FALSE and next time the program is back at step0 it will make the transition depending on what is happpening in the process.

    So, I wonder what the address is of this special memory address to be used in the initialization of the sequence. Or is made in a different manner with win v3?

    https://drive.google.com/file/d/0B8t76HfcMd38NUpZR3prMENhbzA/view?usp=sharing

     
  • t.lundahl - 2014-09-30

    Hi,

    Declare variable 'FirstScan : BOOL := TRUE;'

    Or better for you maybe to make: -|/|--|/|--|/|-(Step0)
    (= Step0 := NOT Step1 AND NOT Step2 AND NOT Step3)

    Or use SFC then you will get Init step initilized by default.

    /Torbjörn

     
  • alexjaw69 - 2014-10-02

    t.lundahl hat geschrieben:
    Hi,
    Declare variable 'FirstScan : BOOL := TRUE;'
    Or better for you maybe to make: -|/|--|/|--|/|-(Step0)
    (= Step0 := NOT Step1 AND NOT Step2 AND NOT Step3)
    Or use SFC then you will get Init step initilized by default.
    /Torbjörn

    Great! Tack!

     
  • alexjaw69 - 2014-10-02

    alexjaw69 hat geschrieben:
    Great! Tack!
    (The nice thing with Mitsubishi address M8002 is that its only true once, just as Init in SFC. I tried once to implement a simple process using SFC but nothing happened when I started it. Have to look further at some examples to see how it should be done. Do you possibly have a good link on the subject?)

     

Log in to post a comment.