User Tools

Site Tools


plc:motion_commands_from_plc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
plc:motion_commands_from_plc [2021/11/02 15:38] ivanplc:motion_commands_from_plc [2021/11/02 17:03] skirillov
Line 58: Line 58:
 Example <code c>move_up=10; Example <code c>move_up=10;
 g0moveA(0,4,move_up*100);  //Z axis; g0moveA(0,4,move_up*100);  //Z axis;
-timer=10; do{timer--;}while (timer>0);//wait 10ms , motion should start, motion state will turn to **0**+timer=200; do{timer--;}while (timer>0); 
 + //wait 10ms , motion should start, motion state will turn to **0**
 do{ code=gvarget(6060); } while(code==0); do{ code=gvarget(6060); } while(code==0);
 </code> </code>
Line 83: Line 84:
       gvarset(7080,speed_z);//set speed       gvarset(7080,speed_z);//set speed
       g0moveA(absolute,4,lift_up*100);//absolute programming; Z axis;       g0moveA(absolute,4,lift_up*100);//absolute programming; Z axis;
-      timer=10; do{timer--;}while (timer>0);//wait till motion started+      timer=200; do{timer--;}while (timer>0);//wait till motion started
       do { code=gvarget(6060); } while(code==0);      //wait till motion is stopped       do { code=gvarget(6060); } while(code==0);      //wait till motion is stopped
     };     };
plc/motion_commands_from_plc.txt · Last modified: 2024/05/13 15:49 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki