Function: ISO G-Motion function block Author: SBP (QuickWood Automation) Date: 28-01-2004 NOTE: Requeres target version 2.01 or heigher //Commands for g_motion FB #define GCMD_ADD_TO_FIFO 1 #define GCMD_CLEAR_FIFO 2 #define GCMD_SET_OVERRIDE 3 #define GCMD_SET_ACC 4 #define GCMD_SET_DEC 5 //set decceleration #define GCMD_SET_PAUSE 6 //pause related to G4 #define GCMD_GET_NEXT_SEG 7 //calculate next segment #define GCMD_GET_FIFO_LINE 8 //returns returns current fifo line no #define GCMD_SYNC_X 9 //set internal position for X #define GCMD_SYNC_Y 10 //set internal position for Y #define GCMD_SYNC_Z 11 //set internal position for Z #define GCMD_SYNC_A 12 //set internal position for A #define GCMD_SYNC_B 13 //set internal position for B #define GCMD_SYNC_C 14 //set internal position for C #define GCMD_START 15 //start motion #define GCMD_STOP 16 //stop motion #define GCMD_ABORT 17 //abort current motion #define GCMD_SET_FEED 18 #define GCMD_READ_FIFO 19 //reads spicified line in fifo #define GCMD_FIFO_REMAIN 20 //returns the remaining line space in fifo #define GCMD_SET_SEG_TIME 21 //Status for g_motion FB #define GSTAT_NO_ERR 0 #define GSTAT_UNABLE_TO_SET_PARAM 1 #define GSTAT_UNABLE_TO_START 2 #define GSTAT_UNABLE_TO_STOP 3 #define GSTAT_UNABLE_TO_ABORT 4 #define GSTAT_UNABLE_TO_SYNC 5 #define GSTAT_FIFO_FULL 6 #define GSTAT_NO_MORE_SEG 7 //Motion states #define GSTATE_IDLE 0 #define GSTATE_RUN 1 #define GSTATE_STOP 2 #define GSTATE_ABORT 3