SPS-SUB will IF-Bedingung nicht ausführen

  • Hallo Leidensgenossen,


    ich steh völlig auf dem Schlauch und muss um Hilfe rufen.


    Ich will im sps.sub eine Variable (einmalig) zurücksetzen, wenn auf Hand umgeschaltet wird und das Programm abgewählt oder zurückgesetzt wird.


    IF (($MODE_OP<>#EX) AND (($PRO_STATE==#P_FREE) OR ($PRO_STATE==#P_RESET))) THEN
    IF Testbool==TRUE THEN
    Testbool= FALSE
    ENDIF
    ENDIF


    Im SPS SUB wird diese Bedingung nicht ausgeführt, obwohl alle Bedingungen vorhanden sind. Laut Variablenstatus ist $MODE_OP=#T1 und $PRO_STATE=#P_FREE.
    Trotzdem bleibt mein Testbool auf TRUE gesetzt.


    Wenn ich die Bedingung in etwas abgeänderter Form in einem src. file ausführe, dann funktioniert alles.


    Ich weiß jetzt nicht mehr weiter, das will einfach nicht....


    Weiß jemand von euch warum ?


    Gruß madddin

  • AD
  • Nachzulesen Seite 82.
    Pro_State ist immer der, der gerade offen bzw. angewählt ist auf dem KRC.
    Meist immer der, den man nicht haben will.
    Somit immer eine 1 oder 2 dahinter schreiben.

    Files

    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now