AXISON Set the axis ON |
Syntax
Binary code
When AXISON is set after an AXISOFF command, the reference generator resumes its calculations for last programmed motion mode from the same point left before the AXISOFF. If the load/motor has moved during AXISOFF, its actual values for position and speed may differ quite a lot from the values of the target position and speed provided by the reference generator. In order update the reference generator:
If first AXISON is issued after power on before setting any motion mode, the drive applies zero voltages to the motor.
Example // Execute repetitive moves. After each one, set AXISOFF. // Motor may move freely. Restart after 20s. Position // feedback: 500 lines incremental encoder (2000 counts/rev) CACC = 0.3183;//acceleration rate = 1000[rad/s^2] CSPD = 33.3333;//slew speed = 1000[rpm] CPOS = 6000;//position command = 3[rot] CPA; //position command is absolute Loop: MODE PP; // position profile CPOS += 6000; set new position command UPD; //execute immediate AXISON; //Activate the control loops and PWM outputs !MC; // set event on motion complete WAIT!;//Wait until the event occurs i.e. the motor stops AXISOFF; //Deactivate the control loops and PWM outputs !RT 20000; //set a 20s delay (1s = 1000 slow loop samplings) WAIT!; //Wait until the event occurs (to pass the 20s) GOTO Loop; //Restart the motion |