mhalbern

MrPLC Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mhalbern

  • Rank
    Hi, I am New!

Profile Information

  • Country United States
  1. Simple STL program acts weird

    I developed this simple code as a first example of STL programming for my Mechatronics class. See the program text below. It simply uses a push button switch (X1) to activate (SET) and deactivate (RST) indicator lamps (Y0- Y2). The weird aspect is that when the program is executed for the very first time, push button input X1 must be activated (pressed) twice for the operation to continue. After that, the program functions properly, looping back and only requiring a single button press. Does anyone have a clue regarding this behavior? A reply is greatly appreciated. Thank you. 0 LD M8002 1 ZRST S0 S100 6 ZRST Y000 Y024 11 SET S0 13 STL S0 14 LD X000 15 SET Y004 16 SET S10 18 RET 19 STL S10 20 LDP X001 22 SET Y000 23 SET S20 25 RET 26 STL S20 27 LDP X001 29 SET Y001 30 SET S30 32 RET 33 STL S30 34 LDP X001 36 SET Y002 37 SET S40 39 RET 40 STL S40 41 LDP X001 43 ZRST Y000 Y002 48 OUT S10 50 RET 51 END