Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2016
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SCL 1.13 KB | None | 0 0
  1. GVL_IO
  2. ////////
  3. {attribute 'qualified_only'}
  4. VAR_GLOBAL
  5.     Axis1:AXIS_REF;
  6.     Axis2:AXIS_REF;
  7. END_VAR
  8.  
  9. MAIN
  10. ////////
  11. PROGRAM MAIN
  12. VAR
  13. END_VAR
  14. ////////
  15. PGR_Power();
  16. PGR_MOVE();
  17.  
  18. PGR_MOVE
  19. ////////
  20. PROGRAM PGR_MOVE
  21. VAR
  22.     axis1Abs:MC_MoveAbsolute;
  23.     bExecuteAxis1: BOOL;
  24.     fPositionAxis1: LREAL;
  25.     fVelocityAxis1: LREAL;
  26. END_VAR
  27. ////////
  28. axis1Abs(
  29.     Axis:= GVL_IO.Axis1,
  30.     Execute:= bExecuteAxis1,
  31.     Position:= fPositionAxis1,
  32.     Velocity:= fVelocityAxis1,
  33.     Acceleration:= 0.0,
  34.     Deceleration:= 0.0,
  35.     Jerk:= 0.0,
  36.     BufferMode:= 0,
  37.     Options:= ,
  38.     Done=> ,
  39.     Busy=> ,
  40.     Active=> ,
  41.     CommandAborted=> ,
  42.     Error=> ,
  43.     ErrorID=> );
  44. ///////
  45.  
  46. PGR_Power
  47. ///////
  48. PROGRAM PGR_Power
  49. VAR
  50.     axis1Power:MC_Power;
  51.     axis2Power:MC_Power;
  52.     bEnable: BOOL;
  53.     fOverrideAxis1: LREAL;
  54.     bStatus: BOOL;
  55. END_VAR
  56. ///////
  57. axis1Power(
  58.     Axis:= GVL_IO.Axis1,
  59.     Enable:= bEnable, //ready
  60.     Enable_Positive:= TRUE, //povoleny pohyb vpred
  61.     Enable_Negative:= TRUE, //povoleny pohyb vzad
  62.     Override:= fOverrideAxis1,
  63.     BufferMode:= MC_Aborting,
  64.     Options:= ,
  65.     STATUS=> bStatus,
  66.     Busy=> ,
  67.     Active=> ,
  68.     Error=> ,
  69.     ErrorID=> );
  70. /////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement