RSLogix 500

Discussion in 'Programmer's Corner' started by TK33, Sep 15, 2011.

  1. TK33

    Thread Starter New Member

    Sep 15, 2011
    2
    0
    Using RSLogix to program Micrologix 1000.

    I'm having problems writing a program that uses 1-push button to turn on LED then push the same button to turn the LED off.

    I can use a seal-in circuit or a latch to turn it on but cant figure out how to write the next rung to turn it off with the same button.

    Any suggestion?
     
  2. ftsolutions

    Active Member

    Nov 21, 2009
    48
    2
    Use a state variable to keep track of the LED state (ON |OFF). Simply toggle the variable from one state to the other each time the button is pressed and released. Have a rung simply turn the light on or off based on the state variable.
     
  3. TK33

    Thread Starter New Member

    Sep 15, 2011
    2
    0
    Im not quite sure if I understand how to set a state variable? Is that similar to setting the I/O to a simple 0;1?

    The only thing I could imagine is a latch then seal the input then somehow unlatch using some parallel command..
     
Loading...