SHARE
TWEET

Untitled

a guest Oct 21st, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // FbCylinder1x1y
  2. // 1 limit sensor
  3. // 1 output
  4. // ex:
  5. // cySt1GoDown(gCySt1GoDownAct, xSt1Down, wSt1OnT, wSt1OffT, ySt1GoDown);
  6.  
  7. oDevice := iAct;
  8. tmrOn(IN := oDevice AND NOT iLimit1, PT:= INT_TO_TIME(iOnTO*100));
  9. tmrOff(IN := NOT oDevice AND iLimit1, PT:= INT_TO_TIME(iOffTO*100));
  10.  
  11. RST(iRst AND oErr, oErr);
  12. SET(tmrOn.Q OR tmrOff.Q, oErr);
  13.  
  14. oOn := tmrOnDelay.Q;
  15. oOff := tmrOffDelay.Q;
  16.  
  17. IF oErr THEN
  18.     IF tmrOff.Q THEN
  19.         oErrId := 20;
  20.     ELSIF tmrOn.Q THEN
  21.         oErrId := 10;
  22.     END_IF;
  23. ELSE   
  24.     oErrId := 0;
  25. END_IF;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top