#include "rcs.hh"
#include "posemath.h"
#include "canon.hh"
#include "emcglb.h"
#include "emcpos.h"
Include dependency graph for emc.hh:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 393 of file emc.hh. Referenced by BuildList(), emcTaskIssueCommand(), and emc_io_get_command().
|
|
Definition at line 315 of file emc.hh. 00315 { 00316 // spindle 00317 EMC_SET_AIO_INDEX_SPINDLE_ON = 5201 00318 }; |
|
Definition at line 321 of file emc.hh. 00321 { 00322 // axis 00323 EMC_SET_POLARITY_AXIS_ENABLE = 5301, 00324 EMC_SET_POLARITY_AXIS_MIN_LIMIT_SWITCH, 00325 EMC_SET_POLARITY_AXIS_MAX_LIMIT_SWITCH, 00326 EMC_SET_POLARITY_AXIS_HOME_SWITCH, 00327 EMC_SET_POLARITY_AXIS_HOMING, 00328 EMC_SET_POLARITY_AXIS_FAULT, 00329 // spindle 00330 EMC_SET_POLARITY_SPINDLE_FORWARD, 00331 EMC_SET_POLARITY_SPINDLE_REVERSE, 00332 EMC_SET_POLARITY_SPINDLE_DECREASE, 00333 EMC_SET_POLARITY_SPINDLE_INCREASE, 00334 EMC_SET_POLARITY_SPINDLE_BRAKE, 00335 EMC_SET_POLARITY_SPINDLE_ENABLE, 00336 // coolant 00337 EMC_SET_POLARITY_COOLANT_MIST, 00338 EMC_SET_POLARITY_COOLANT_FLOOD, 00339 // lube 00340 EMC_SET_POLARITY_LUBE_SENSE, 00341 // aux 00342 EMC_SET_POLARITY_ESTOP_SENSE, 00343 EMC_SET_POLARITY_ESTOP_WRITE 00344 }; |
|
Definition at line 93 of file emc.hh. 00093 : emc.hh,v 1.14 2001/10/04 15:11:59 wshackle Exp $"; 00094 00095 // --------------------- 00096 // EMC TYPE DECLARATIONS 00097 // --------------------- 00098 00099 // NML for base EMC 00100 00101 #define EMC_OPERATOR_ERROR_TYPE ((NMLTYPE) 11) 00102 #define EMC_OPERATOR_TEXT_TYPE ((NMLTYPE) 12) 00103 #define EMC_OPERATOR_DISPLAY_TYPE ((NMLTYPE) 13) 00104 00105 #define EMC_NULL_TYPE ((NMLTYPE) 21) 00106 00107 #define EMC_SET_DEBUG_TYPE ((NMLTYPE) 22) 00108 00109 // NML for EMC_AXIS 00110 00111 #define EMC_AXIS_SET_AXIS_TYPE ((NMLTYPE) 101) 00112 #define EMC_AXIS_SET_UNITS_TYPE ((NMLTYPE) 102) 00113 #define EMC_AXIS_SET_GAINS_TYPE ((NMLTYPE) 103) 00114 #define EMC_AXIS_SET_CYCLE_TIME_TYPE ((NMLTYPE) 104) 00115 #define EMC_AXIS_SET_INPUT_SCALE_TYPE ((NMLTYPE) 105) 00116 #define EMC_AXIS_SET_OUTPUT_SCALE_TYPE ((NMLTYPE) 106) 00117 #define EMC_AXIS_SET_MIN_POSITION_LIMIT_TYPE ((NMLTYPE) 107) 00118 #define EMC_AXIS_SET_MAX_POSITION_LIMIT_TYPE ((NMLTYPE) 108) 00119 #define EMC_AXIS_SET_MIN_OUTPUT_LIMIT_TYPE ((NMLTYPE) 109) 00120 #define EMC_AXIS_SET_MAX_OUTPUT_LIMIT_TYPE ((NMLTYPE) 110) 00121 #define EMC_AXIS_SET_FERROR_TYPE ((NMLTYPE) 111) 00122 #define EMC_AXIS_SET_HOMING_VEL_TYPE ((NMLTYPE) 112) 00123 #define EMC_AXIS_SET_HOME_TYPE ((NMLTYPE) 113) 00124 #define EMC_AXIS_SET_HOME_OFFSET_TYPE ((NMLTYPE) 114) 00125 #define EMC_AXIS_SET_MIN_FERROR_TYPE ((NMLTYPE) 115) 00126 #define EMC_AXIS_SET_MAX_VELOCITY_TYPE ((NMLTYPE) 116) 00127 00128 #define EMC_AXIS_INIT_TYPE ((NMLTYPE) 118) 00129 #define EMC_AXIS_HALT_TYPE ((NMLTYPE) 119) 00130 #define EMC_AXIS_ABORT_TYPE ((NMLTYPE) 120) 00131 #define EMC_AXIS_ENABLE_TYPE ((NMLTYPE) 121) 00132 #define EMC_AXIS_DISABLE_TYPE ((NMLTYPE) 122) 00133 #define EMC_AXIS_HOME_TYPE ((NMLTYPE) 123) 00134 #define EMC_AXIS_JOG_TYPE ((NMLTYPE) 124) 00135 #define EMC_AXIS_INCR_JOG_TYPE ((NMLTYPE) 125) 00136 #define EMC_AXIS_ABS_JOG_TYPE ((NMLTYPE) 126) 00137 #define EMC_AXIS_ACTIVATE_TYPE ((NMLTYPE) 127) 00138 #define EMC_AXIS_DEACTIVATE_TYPE ((NMLTYPE) 128) 00139 #define EMC_AXIS_OVERRIDE_LIMITS_TYPE ((NMLTYPE) 129) 00140 #define EMC_AXIS_SET_OUTPUT_TYPE ((NMLTYPE) 130) 00141 #define EMC_AXIS_LOAD_COMP_TYPE ((NMLTYPE) 131) 00142 #define EMC_AXIS_ALTER_TYPE ((NMLTYPE) 132) 00143 00144 #define EMC_AXIS_STAT_TYPE ((NMLTYPE) 199) 00145 00146 // NML for EMC_TRAJ 00147 00148 // defs for termination conditions 00149 00150 #define EMC_TRAJ_TERM_COND_STOP 1 00151 #define EMC_TRAJ_TERM_COND_BLEND 2 00152 00153 #define EMC_TRAJ_SET_AXES_TYPE ((NMLTYPE) 201) 00154 #define EMC_TRAJ_SET_UNITS_TYPE ((NMLTYPE) 202) 00155 #define EMC_TRAJ_SET_CYCLE_TIME_TYPE ((NMLTYPE) 203) 00156 #define EMC_TRAJ_SET_MODE_TYPE ((NMLTYPE) 204) 00157 #define EMC_TRAJ_SET_VELOCITY_TYPE ((NMLTYPE) 205) 00158 #define EMC_TRAJ_SET_ACCELERATION_TYPE ((NMLTYPE) 206) 00159 #define EMC_TRAJ_SET_MAX_VELOCITY_TYPE ((NMLTYPE) 207) 00160 #define EMC_TRAJ_SET_MAX_ACCELERATION_TYPE ((NMLTYPE) 208) 00161 #define EMC_TRAJ_SET_SCALE_TYPE ((NMLTYPE) 209) 00162 #define EMC_TRAJ_SET_MOTION_ID_TYPE ((NMLTYPE) 210) 00163 00164 #define EMC_TRAJ_INIT_TYPE ((NMLTYPE) 211) 00165 #define EMC_TRAJ_HALT_TYPE ((NMLTYPE) 212) 00166 #define EMC_TRAJ_ENABLE_TYPE ((NMLTYPE) 213) 00167 #define EMC_TRAJ_DISABLE_TYPE ((NMLTYPE) 214) 00168 #define EMC_TRAJ_ABORT_TYPE ((NMLTYPE) 215) 00169 #define EMC_TRAJ_PAUSE_TYPE ((NMLTYPE) 216) 00170 #define EMC_TRAJ_STEP_TYPE ((NMLTYPE) 217) 00171 #define EMC_TRAJ_RESUME_TYPE ((NMLTYPE) 218) 00172 #define EMC_TRAJ_DELAY_TYPE ((NMLTYPE) 219) 00173 #define EMC_TRAJ_LINEAR_MOVE_TYPE ((NMLTYPE) 220) 00174 #define EMC_TRAJ_CIRCULAR_MOVE_TYPE ((NMLTYPE) 221) 00175 #define EMC_TRAJ_SET_TERM_COND_TYPE ((NMLTYPE) 222) 00176 #define EMC_TRAJ_SET_OFFSET_TYPE ((NMLTYPE) 223) 00177 #define EMC_TRAJ_SET_ORIGIN_TYPE ((NMLTYPE) 224) 00178 #define EMC_TRAJ_SET_HOME_TYPE ((NMLTYPE) 225) 00179 #define EMC_TRAJ_SET_PROBE_INDEX_TYPE ((NMLTYPE) 226) 00180 #define EMC_TRAJ_SET_PROBE_POLARITY_TYPE ((NMLTYPE) 227) 00181 #define EMC_TRAJ_CLEAR_PROBE_TRIPPED_FLAG_TYPE ((NMLTYPE) 228) 00182 #define EMC_TRAJ_PROBE_TYPE ((NMLTYPE) 229) 00183 #define EMC_TRAJ_SET_TELEOP_ENABLE_TYPE ((NMLTYPE) 230) 00184 #define EMC_TRAJ_SET_TELEOP_VECTOR_TYPE ((NMLTYPE) 231) 00185 00186 #define EMC_TRAJ_STAT_TYPE ((NMLTYPE) 299) 00187 00188 // EMC_MOTION aggregate class type declaration 00189 00190 #define EMC_MOTION_INIT_TYPE ((NMLTYPE) 301) 00191 #define EMC_MOTION_HALT_TYPE ((NMLTYPE) 302) 00192 #define EMC_MOTION_ABORT_TYPE ((NMLTYPE) 303) 00193 #define EMC_MOTION_SET_AOUT_TYPE ((NMLTYPE) 304) 00194 #define EMC_MOTION_SET_DOUT_TYPE ((NMLTYPE) 305) 00195 00196 #define EMC_MOTION_STAT_TYPE ((NMLTYPE) 399) 00197 00198 // NML for EMC_TASK 00199 00200 #define EMC_TASK_FILENAME_LEN 256 // how long a file name can be 00201 #define EMC_TASK_COMMAND_LEN 256 // how long a file line can be 00202 00203 #define EMC_TASK_INIT_TYPE ((NMLTYPE) 501) 00204 #define EMC_TASK_HALT_TYPE ((NMLTYPE) 502) 00205 #define EMC_TASK_ABORT_TYPE ((NMLTYPE) 503) 00206 #define EMC_TASK_SET_MODE_TYPE ((NMLTYPE) 504) 00207 #define EMC_TASK_SET_STATE_TYPE ((NMLTYPE) 505) 00208 #define EMC_TASK_PLAN_OPEN_TYPE ((NMLTYPE) 506) 00209 #define EMC_TASK_PLAN_RUN_TYPE ((NMLTYPE) 507) 00210 #define EMC_TASK_PLAN_READ_TYPE ((NMLTYPE) 508) 00211 #define EMC_TASK_PLAN_EXECUTE_TYPE ((NMLTYPE) 509) 00212 #define EMC_TASK_PLAN_PAUSE_TYPE ((NMLTYPE) 510) 00213 #define EMC_TASK_PLAN_STEP_TYPE ((NMLTYPE) 511) 00214 #define EMC_TASK_PLAN_RESUME_TYPE ((NMLTYPE) 512) 00215 #define EMC_TASK_PLAN_END_TYPE ((NMLTYPE) 513) 00216 #define EMC_TASK_PLAN_CLOSE_TYPE ((NMLTYPE) 514) 00217 #define EMC_TASK_PLAN_INIT_TYPE ((NMLTYPE) 515) 00218 #define EMC_TASK_PLAN_SYNCH_TYPE ((NMLTYPE) 516) 00219 00220 #define EMC_TASK_STAT_TYPE ((NMLTYPE) 599) 00221 00222 // EMC_TOOL type declarations 00223 00224 #define EMC_TOOL_INIT_TYPE ((NMLTYPE) 1101) 00225 #define EMC_TOOL_HALT_TYPE ((NMLTYPE) 1102) 00226 #define EMC_TOOL_ABORT_TYPE ((NMLTYPE) 1103) 00227 #define EMC_TOOL_PREPARE_TYPE ((NMLTYPE) 1104) 00228 #define EMC_TOOL_LOAD_TYPE ((NMLTYPE) 1105) 00229 #define EMC_TOOL_UNLOAD_TYPE ((NMLTYPE) 1106) 00230 #define EMC_TOOL_LOAD_TOOL_TABLE_TYPE ((NMLTYPE) 1107) 00231 #define EMC_TOOL_SET_OFFSET_TYPE ((NMLTYPE) 1108) 00232 00233 #define EMC_TOOL_STAT_TYPE ((NMLTYPE) 1199) 00234 00235 // EMC_AUX type declarations 00236 00237 #define EMC_AUX_INIT_TYPE ((NMLTYPE) 1201) 00238 #define EMC_AUX_HALT_TYPE ((NMLTYPE) 1202) 00239 #define EMC_AUX_ABORT_TYPE ((NMLTYPE) 1203) 00240 #define EMC_AUX_DIO_WRITE_TYPE ((NMLTYPE) 1204) 00241 #define EMC_AUX_AIO_WRITE_TYPE ((NMLTYPE) 1205) 00242 #define EMC_AUX_ESTOP_ON_TYPE ((NMLTYPE) 1206) 00243 #define EMC_AUX_ESTOP_OFF_TYPE ((NMLTYPE) 1207) 00244 00245 #define EMC_AUX_STAT_TYPE ((NMLTYPE) 1299) 00246 00247 // EMC_SPINDLE type declarations 00248 00249 #define EMC_SPINDLE_INIT_TYPE ((NMLTYPE) 1301) 00250 #define EMC_SPINDLE_HALT_TYPE ((NMLTYPE) 1302) 00251 #define EMC_SPINDLE_ABORT_TYPE ((NMLTYPE) 1303) 00252 #define EMC_SPINDLE_ON_TYPE ((NMLTYPE) 1304) 00253 #define EMC_SPINDLE_OFF_TYPE ((NMLTYPE) 1305) 00254 #define EMC_SPINDLE_FORWARD_TYPE ((NMLTYPE) 1306) 00255 #define EMC_SPINDLE_REVERSE_TYPE ((NMLTYPE) 1307) 00256 #define EMC_SPINDLE_STOP_TYPE ((NMLTYPE) 1308) 00257 #define EMC_SPINDLE_INCREASE_TYPE ((NMLTYPE) 1309) 00258 #define EMC_SPINDLE_DECREASE_TYPE ((NMLTYPE) 1310) 00259 #define EMC_SPINDLE_CONSTANT_TYPE ((NMLTYPE) 1311) 00260 #define EMC_SPINDLE_BRAKE_RELEASE_TYPE ((NMLTYPE) 1312) 00261 #define EMC_SPINDLE_BRAKE_ENGAGE_TYPE ((NMLTYPE) 1313) 00262 #define EMC_SPINDLE_ENABLE_TYPE ((NMLTYPE) 1314) 00263 #define EMC_SPINDLE_DISABLE_TYPE ((NMLTYPE) 1315) 00264 00265 #define EMC_SPINDLE_STAT_TYPE ((NMLTYPE) 1399) 00266 00267 // EMC_COOLANT type declarations 00268 00269 #define EMC_COOLANT_INIT_TYPE ((NMLTYPE) 1401) 00270 #define EMC_COOLANT_HALT_TYPE ((NMLTYPE) 1402) 00271 #define EMC_COOLANT_ABORT_TYPE ((NMLTYPE) 1403) 00272 #define EMC_COOLANT_MIST_ON_TYPE ((NMLTYPE) 1404) 00273 #define EMC_COOLANT_MIST_OFF_TYPE ((NMLTYPE) 1405) 00274 #define EMC_COOLANT_FLOOD_ON_TYPE ((NMLTYPE) 1406) 00275 #define EMC_COOLANT_FLOOD_OFF_TYPE ((NMLTYPE) 1407) 00276 00277 #define EMC_COOLANT_STAT_TYPE ((NMLTYPE) 1499) 00278 00279 // EMC_LUBE type declarations 00280 00281 #define EMC_LUBE_INIT_TYPE ((NMLTYPE) 1501) 00282 #define EMC_LUBE_HALT_TYPE ((NMLTYPE) 1502) 00283 #define EMC_LUBE_ABORT_TYPE ((NMLTYPE) 1503) 00284 #define EMC_LUBE_ON_TYPE ((NMLTYPE) 1504) 00285 #define EMC_LUBE_OFF_TYPE ((NMLTYPE) 1505) 00286 00287 #define EMC_LUBE_STAT_TYPE ((NMLTYPE) 1599) 00288 00289 // EMC IO point configuration declarations 00290 00291 #define EMC_SET_DIO_INDEX_TYPE ((NMLTYPE) 5001) 00292 #define EMC_SET_AIO_INDEX_TYPE ((NMLTYPE) 5002) 00293 #define EMC_SET_POLARITY_TYPE ((NMLTYPE) 5003) 00294 00295 // digital IO point indices 00296 enum { 00297 // spindle 00298 EMC_SET_DIO_INDEX_SPINDLE_FORWARD = 5101, 00299 EMC_SET_DIO_INDEX_SPINDLE_REVERSE, 00300 EMC_SET_DIO_INDEX_SPINDLE_DECREASE, 00301 EMC_SET_DIO_INDEX_SPINDLE_INCREASE, 00302 EMC_SET_DIO_INDEX_SPINDLE_BRAKE, 00303 EMC_SET_DIO_INDEX_SPINDLE_ENABLE, 00304 // coolant 00305 EMC_SET_DIO_INDEX_COOLANT_MIST, 00306 EMC_SET_DIO_INDEX_COOLANT_FLOOD, 00307 // lube 00308 EMC_SET_DIO_INDEX_LUBE_SENSE, 00309 // aux 00310 EMC_SET_DIO_INDEX_ESTOP_SENSE, 00311 EMC_SET_DIO_INDEX_ESTOP_WRITE 00312 }; |
|
|
|
|
|
|
|
|
|
Definition at line 1922 of file bridgeporttaskintf.cc. Referenced by emcTaskSetState().
01923 { 01924 EMC_AUX_ESTOP_OFF estopOffMsg; 01925 01926 return sendCommand(&estopOffMsg); 01927 } |
|
Definition at line 1915 of file bridgeporttaskintf.cc. Referenced by emcTaskSetState().
01916 { 01917 EMC_AUX_ESTOP_ON estopOnMsg; 01918 01919 return forceCommand(&estopOnMsg); 01920 } |
|
Definition at line 206 of file iniaux.cc. 00207 { 00208 ESTOP_SENSE_INDEX = index; 00209 00210 return 0; 00211 } |
|
Definition at line 220 of file iniaux.cc. 00221 { 00222 ESTOP_SENSE_POLARITY = polarity; 00223 00224 return 0; 00225 } |
|
Definition at line 213 of file iniaux.cc. 00214 { 00215 ESTOP_WRITE_INDEX = index; 00216 00217 return 0; 00218 } |
|
Definition at line 227 of file iniaux.cc. 00228 { 00229 ESTOP_WRITE_POLARITY = polarity; 00230 00231 return 0; 00232 } |
|
|
|
|
|
|
|
Definition at line 678 of file bridgeporttaskintf.cc. 00679 { 00680 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00681 { 00682 return 0; 00683 } 00684 00685 emcmotCommand.command = EMCMOT_ABORT; 00686 emcmotCommand.axis = axis; 00687 00688 return usrmotWriteEmcmotCommand(&emcmotCommand); 00689 } |
|
Definition at line 846 of file bridgeporttaskintf.cc. 00847 { 00848 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00849 { 00850 return 0; 00851 } 00852 00853 if (vel > AXIS_MAX_VELOCITY[axis]) 00854 { 00855 vel = AXIS_MAX_VELOCITY[axis]; 00856 } 00857 else if (vel < -AXIS_MAX_VELOCITY[axis]) 00858 { 00859 vel = -AXIS_MAX_VELOCITY[axis]; 00860 } 00861 00862 emcmotCommand.command = EMCMOT_JOG_ABS; 00863 emcmotCommand.axis = axis; 00864 emcmotCommand.vel = vel; 00865 emcmotCommand.offset = pos; 00866 00867 return usrmotWriteEmcmotCommand(&emcmotCommand); 00868 } |
|
Definition at line 691 of file bridgeporttaskintf.cc. 00692 { 00693 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00694 { 00695 return 0; 00696 } 00697 00698 emcmotCommand.command = EMCMOT_ACTIVATE_AXIS; 00699 emcmotCommand.axis = axis; 00700 00701 return usrmotWriteEmcmotCommand(&emcmotCommand); 00702 } |
|
Definition at line 875 of file bridgeporttaskintf.cc. 00876 { 00877 return usrmotAlter(axis, alter); 00878 } |
|
Definition at line 704 of file bridgeporttaskintf.cc. 00705 { 00706 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00707 { 00708 return 0; 00709 } 00710 00711 emcmotCommand.command = EMCMOT_DEACTIVATE_AXIS; 00712 emcmotCommand.axis = axis; 00713 00714 return usrmotWriteEmcmotCommand(&emcmotCommand); 00715 } |
|
Definition at line 759 of file bridgeporttaskintf.cc. 00760 { 00761 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00762 { 00763 return 0; 00764 } 00765 00766 emcmotCommand.command = EMCMOT_DISABLE_AMPLIFIER; 00767 emcmotCommand.axis = axis; 00768 00769 return usrmotWriteEmcmotCommand(&emcmotCommand); 00770 } |
|
Definition at line 746 of file bridgeporttaskintf.cc. 00747 { 00748 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00749 { 00750 return 0; 00751 } 00752 00753 emcmotCommand.command = EMCMOT_ENABLE_AMPLIFIER; 00754 emcmotCommand.axis = axis; 00755 00756 return usrmotWriteEmcmotCommand(&emcmotCommand); 00757 } |
|
Definition at line 656 of file bridgeporttaskintf.cc. 00657 { 00658 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00659 { 00660 return 0; 00661 } 00662 00663 // FIXME-- refs global emcStatus; should make EMC_AXIS_STAT an arg here 00664 if(NULL != emcStatus && emcmotion_initialized && emcmotAxisInited) 00665 { 00666 dumpAxis(axis, EMC_INIFILE, &emcStatus->motion.axis[axis]); 00667 } 00668 00669 if (! emcmotTrajInited) // traj clears its inited flag on exit 00670 { 00671 usrmotExit(); // ours is final exit 00672 } 00673 emcmotAxisInited = 0; 00674 00675 return 0; 00676 } |
|
Definition at line 772 of file bridgeporttaskintf.cc. 00773 { 00774 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00775 { 00776 return 0; 00777 } 00778 00779 emcmotCommand.command = EMCMOT_HOME; 00780 emcmotCommand.axis = axis; 00781 00782 return usrmotWriteEmcmotCommand(&emcmotCommand); 00783 } |
|
Definition at line 822 of file bridgeporttaskintf.cc. 00823 { 00824 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00825 { 00826 return 0; 00827 } 00828 00829 if (vel > AXIS_MAX_VELOCITY[axis]) 00830 { 00831 vel = AXIS_MAX_VELOCITY[axis]; 00832 } 00833 else if (vel < -AXIS_MAX_VELOCITY[axis]) 00834 { 00835 vel = -AXIS_MAX_VELOCITY[axis]; 00836 } 00837 00838 emcmotCommand.command = EMCMOT_JOG_INCR; 00839 emcmotCommand.axis = axis; 00840 emcmotCommand.vel = vel; 00841 emcmotCommand.offset = incr; 00842 00843 return usrmotWriteEmcmotCommand(&emcmotCommand); 00844 } |
|
Definition at line 626 of file bridgeporttaskintf.cc. 00627 { 00628 int retval = 0; 00629 00630 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00631 { 00632 return 0; 00633 } 00634 00635 // init emcmot interface 00636 if (! emcmotAxisInited && 00637 ! emcmotTrajInited) 00638 { 00639 usrmotIniLoad(EMC_INIFILE); 00640 00641 if (0 != usrmotInit()) 00642 { 00643 return -1; 00644 } 00645 } 00646 emcmotAxisInited = 1; 00647 00648 if (0 != iniAxis(axis, EMC_INIFILE)) 00649 { 00650 retval = -1; 00651 } 00652 00653 return retval; 00654 } |
|
Definition at line 799 of file bridgeporttaskintf.cc. 00800 { 00801 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00802 { 00803 return 0; 00804 } 00805 00806 if (vel > AXIS_MAX_VELOCITY[axis]) 00807 { 00808 vel = AXIS_MAX_VELOCITY[axis]; 00809 } 00810 else if (vel < -AXIS_MAX_VELOCITY[axis]) 00811 { 00812 vel = -AXIS_MAX_VELOCITY[axis]; 00813 } 00814 00815 emcmotCommand.command = EMCMOT_JOG_CONT; 00816 emcmotCommand.axis = axis; 00817 emcmotCommand.vel = vel; 00818 00819 return usrmotWriteEmcmotCommand(&emcmotCommand); 00820 } |
|
Definition at line 870 of file bridgeporttaskintf.cc. 00871 { 00872 return usrmotLoadComp(axis, file); 00873 } |
|
Definition at line 717 of file bridgeporttaskintf.cc. 00718 { 00719 // can have axis < 0, for resuming normal limit checking 00720 if (axis >= EMCMOT_MAX_AXIS) 00721 { 00722 return 0; 00723 } 00724 00725 emcmotCommand.command = EMCMOT_OVERRIDE_LIMITS; 00726 emcmotCommand.axis = axis; 00727 00728 return usrmotWriteEmcmotCommand(&emcmotCommand); 00729 00730 } |
|
Referenced by loadAxis().
|
|
Definition at line 247 of file bridgeporttaskintf.cc. 00248 { 00249 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00250 { 00251 return 0; 00252 } 00253 00254 if (cycleTime <= 0.0) 00255 { 00256 return -1; 00257 } 00258 00259 emcmotCommand.command = EMCMOT_SET_SERVO_CYCLE_TIME; 00260 emcmotCommand.cycleTime = cycleTime; 00261 00262 return usrmotWriteEmcmotCommand(&emcmotCommand); 00263 } |
|
Definition at line 532 of file bridgeporttaskintf.cc. 00533 { 00534 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00535 { 00536 return 0; 00537 } 00538 00539 emcmotCommand.command = EMCMOT_SET_POLARITY; 00540 emcmotCommand.axis = axis; 00541 emcmotCommand.level = level; 00542 emcmotCommand.axisFlag = EMCMOT_AXIS_ENABLE_BIT; 00543 00544 return usrmotWriteEmcmotCommand(&emcmotCommand); 00545 } |
|
Definition at line 611 of file bridgeporttaskintf.cc. 00612 { 00613 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00614 { 00615 return 0; 00616 } 00617 00618 emcmotCommand.command = EMCMOT_SET_POLARITY; 00619 emcmotCommand.axis = axis; 00620 emcmotCommand.level = level; 00621 emcmotCommand.axisFlag = EMCMOT_AXIS_FAULT_BIT; 00622 00623 return usrmotWriteEmcmotCommand(&emcmotCommand); 00624 } |
|
Definition at line 423 of file bridgeporttaskintf.cc. 00424 { 00425 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00426 { 00427 return 0; 00428 } 00429 00430 emcmotCommand.command = EMCMOT_SET_MAX_FERROR; 00431 emcmotCommand.axis = axis; 00432 emcmotCommand.maxFerror = ferror; 00433 00434 #ifdef ISNAN_TRAP 00435 if (isnan(emcmotCommand.maxFerror)) 00436 { 00437 printf("isnan error in emcAxisSetFerror\n"); 00438 return -1; 00439 } 00440 #endif 00441 00442 return usrmotWriteEmcmotCommand(&emcmotCommand); 00443 } |
|
Definition at line 203 of file bridgeporttaskintf.cc. 00207 { 00208 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00209 { 00210 return 0; 00211 } 00212 00213 emcmotCommand.command = EMCMOT_SET_PID; 00214 emcmotCommand.axis = axis; 00215 00216 emcmotCommand.pid.p = p; 00217 emcmotCommand.pid.i = i; 00218 emcmotCommand.pid.d = d; 00219 emcmotCommand.pid.ff0 = ff0; 00220 emcmotCommand.pid.ff1 = ff1; 00221 emcmotCommand.pid.ff2 = ff2; 00222 emcmotCommand.pid.backlash = backlash; 00223 emcmotCommand.pid.bias = bias; 00224 emcmotCommand.pid.maxError = maxError; 00225 emcmotCommand.pid.deadband = deadband; 00226 00227 #ifdef ISNAN_TRAP 00228 if (isnan(emcmotCommand.pid.p) || 00229 isnan(emcmotCommand.pid.i) || 00230 isnan(emcmotCommand.pid.d) || 00231 isnan(emcmotCommand.pid.ff0) || 00232 isnan(emcmotCommand.pid.ff1) || 00233 isnan(emcmotCommand.pid.ff2) || 00234 isnan(emcmotCommand.pid.backlash) || 00235 isnan(emcmotCommand.pid.bias) || 00236 isnan(emcmotCommand.pid.maxError) || 00237 isnan(emcmotCommand.pid.deadband)) 00238 { 00239 printf("isnan error in emcAxisSetGains\n"); 00240 return -1; 00241 } 00242 #endif 00243 00244 return usrmotWriteEmcmotCommand(&emcmotCommand); 00245 } |
|
Definition at line 785 of file bridgeporttaskintf.cc. 00786 { 00787 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00788 { 00789 return 0; 00790 } 00791 00792 emcmotCommand.command = EMCMOT_SET_JOINT_HOME; 00793 emcmotCommand.axis = axis; 00794 emcmotCommand.offset = home; 00795 00796 return usrmotWriteEmcmotCommand(&emcmotCommand); 00797 } |
|
Definition at line 510 of file bridgeporttaskintf.cc. 00511 { 00512 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00513 { 00514 return 0; 00515 } 00516 00517 emcmotCommand.command = EMCMOT_SET_HOME_OFFSET; 00518 emcmotCommand.axis = axis; 00519 emcmotCommand.offset = offset; 00520 00521 #ifdef ISNAN_TRAP 00522 if (isnan(emcmotCommand.offset)) 00523 { 00524 printf("isnan error in emcAxisSetHomeOffset\n"); 00525 return -1; 00526 } 00527 #endif 00528 00529 return usrmotWriteEmcmotCommand(&emcmotCommand); 00530 } |
|
Definition at line 581 of file bridgeporttaskintf.cc. 00582 { 00583 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00584 { 00585 return 0; 00586 } 00587 00588 emcmotCommand.command = EMCMOT_SET_POLARITY; 00589 emcmotCommand.axis = axis; 00590 emcmotCommand.level = level; 00591 emcmotCommand.axisFlag = EMCMOT_AXIS_HOME_SWITCH_BIT; 00592 00593 return usrmotWriteEmcmotCommand(&emcmotCommand); 00594 } |
|
Definition at line 596 of file bridgeporttaskintf.cc. 00597 { 00598 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00599 { 00600 return 0; 00601 } 00602 00603 emcmotCommand.command = EMCMOT_SET_POLARITY; 00604 emcmotCommand.axis = axis; 00605 emcmotCommand.level = level; 00606 emcmotCommand.axisFlag = EMCMOT_AXIS_HOMING_BIT; 00607 00608 return usrmotWriteEmcmotCommand(&emcmotCommand); 00609 } |
|
Definition at line 467 of file bridgeporttaskintf.cc. 00468 { 00469 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00470 { 00471 return 0; 00472 } 00473 00474 emcmotCommand.command = EMCMOT_SET_HOMING_VEL; 00475 emcmotCommand.axis = axis; 00476 emcmotCommand.vel = homingVel; 00477 00478 #ifdef ISNAN_TRAP 00479 if (isnan(emcmotCommand.vel)) 00480 { 00481 printf("isnan error in emcAxisSetHomingVel\n"); 00482 return -1; 00483 } 00484 #endif 00485 00486 return usrmotWriteEmcmotCommand(&emcmotCommand); 00487 } |
|
Definition at line 265 of file bridgeporttaskintf.cc. 00266 { 00267 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00268 { 00269 return 0; 00270 } 00271 00272 emcmotCommand.command = EMCMOT_SET_INPUT_SCALE; 00273 emcmotCommand.axis = axis; 00274 emcmotCommand.scale = scale; 00275 emcmotCommand.offset = offset; 00276 00277 #ifdef ISNAN_TRAP 00278 if (isnan(emcmotCommand.scale) || 00279 isnan(emcmotCommand.offset)) 00280 { 00281 printf("isnan eror in emcAxisSetInputScale\n"); 00282 return -1; 00283 } 00284 #endif 00285 00286 return usrmotWriteEmcmotCommand(&emcmotCommand); 00287 } |
|
|
|
Definition at line 562 of file bridgeporttaskintf.cc. 00563 { 00564 if (axis < 0) 00565 { 00566 axis = 0; 00567 } 00568 else if (axis >= EMCMOT_MAX_AXIS) 00569 { 00570 axis = EMCMOT_MAX_AXIS - 1; 00571 } 00572 00573 emcmotCommand.command = EMCMOT_SET_POLARITY; 00574 emcmotCommand.axis = axis; 00575 emcmotCommand.level = level; 00576 emcmotCommand.axisFlag = EMCMOT_AXIS_MAX_HARD_LIMIT_BIT; 00577 00578 return usrmotWriteEmcmotCommand(&emcmotCommand); 00579 } |
|
Definition at line 398 of file bridgeporttaskintf.cc. 00399 { 00400 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00401 { 00402 return 0; 00403 } 00404 00405 emcmotCommand.command = EMCMOT_SET_OUTPUT_LIMITS; 00406 emcmotCommand.axis = axis; 00407 emcmotCommand.minLimit = saveMinOutput[axis]; 00408 emcmotCommand.maxLimit = limit; 00409 saveMaxOutput[axis] = limit; 00410 00411 #ifdef ISNAN_TRAP 00412 if (isnan(emcmotCommand.maxLimit) || 00413 isnan(emcmotCommand.minLimit)) 00414 { 00415 printf("isnan error in emcAxisSetMaxOutputLimit\n"); 00416 return -1; 00417 } 00418 #endif 00419 00420 return usrmotWriteEmcmotCommand(&emcmotCommand); 00421 } |
|
Definition at line 343 of file bridgeporttaskintf.cc. 00344 { 00345 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00346 { 00347 return 0; 00348 } 00349 00350 emcmotCommand.command = EMCMOT_SET_POSITION_LIMITS; 00351 emcmotCommand.axis = axis; 00352 emcmotCommand.minLimit = saveMinLimit[axis]; 00353 emcmotCommand.maxLimit = limit; 00354 saveMaxLimit[axis] = limit; 00355 00356 #ifdef ISNAN_TRAP 00357 if (isnan(emcmotCommand.maxLimit) || 00358 isnan(emcmotCommand.minLimit)) 00359 { 00360 printf("isnan error in emcAxisSetMaxPosition\n"); 00361 return -1; 00362 } 00363 #endif 00364 00365 return usrmotWriteEmcmotCommand(&emcmotCommand); 00366 } |
|
Definition at line 489 of file bridgeporttaskintf.cc. 00490 { 00491 if (axis < 0 || axis >= EMC_AXIS_MAX) 00492 { 00493 return 0; 00494 } 00495 00496 if (vel < 0.0) 00497 { 00498 vel = 0.0; 00499 } 00500 00501 AXIS_MAX_VELOCITY[axis] = vel; 00502 00503 emcmotCommand.command = EMCMOT_SET_AXIS_VEL_LIMIT; 00504 emcmotCommand.axis = axis; 00505 emcmotCommand.vel = vel; 00506 00507 return usrmotWriteEmcmotCommand(&emcmotCommand); 00508 } |
|
Definition at line 445 of file bridgeporttaskintf.cc. 00446 { 00447 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00448 { 00449 return 0; 00450 } 00451 00452 emcmotCommand.command = EMCMOT_SET_MIN_FERROR; 00453 emcmotCommand.axis = axis; 00454 emcmotCommand.minFerror = ferror; 00455 00456 #ifdef ISNAN_TRAP 00457 if (isnan(emcmotCommand.minFerror)) 00458 { 00459 printf("isnan error in emcAxisSetMinFerror\n"); 00460 return -1; 00461 } 00462 #endif 00463 00464 return usrmotWriteEmcmotCommand(&emcmotCommand); 00465 } |
|
Definition at line 547 of file bridgeporttaskintf.cc. 00548 { 00549 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00550 { 00551 return 0; 00552 } 00553 00554 emcmotCommand.command = EMCMOT_SET_POLARITY; 00555 emcmotCommand.axis = axis; 00556 emcmotCommand.level = level; 00557 emcmotCommand.axisFlag = EMCMOT_AXIS_MIN_HARD_LIMIT_BIT; 00558 00559 return usrmotWriteEmcmotCommand(&emcmotCommand); 00560 } |
|
Definition at line 373 of file bridgeporttaskintf.cc. 00374 { 00375 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00376 { 00377 return 0; 00378 } 00379 00380 emcmotCommand.command = EMCMOT_SET_OUTPUT_LIMITS; 00381 emcmotCommand.axis = axis; 00382 emcmotCommand.maxLimit = saveMaxOutput[axis]; 00383 emcmotCommand.minLimit = limit; 00384 saveMinOutput[axis] = limit; 00385 00386 #ifdef ISNAN_TRAP 00387 if (isnan(emcmotCommand.maxLimit) || 00388 isnan(emcmotCommand.minLimit)) 00389 { 00390 printf("isnan error in emcAxisSetMinOutputLimit\n"); 00391 return -1; 00392 } 00393 #endif 00394 00395 return usrmotWriteEmcmotCommand(&emcmotCommand); 00396 } |
|
Definition at line 318 of file bridgeporttaskintf.cc. 00319 { 00320 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00321 { 00322 return 0; 00323 } 00324 00325 emcmotCommand.command = EMCMOT_SET_POSITION_LIMITS; 00326 emcmotCommand.axis = axis; 00327 emcmotCommand.maxLimit = saveMaxLimit[axis]; 00328 emcmotCommand.minLimit = limit; 00329 saveMinLimit[axis] = limit; 00330 00331 #ifdef ISNAN_TRAP 00332 if (isnan(emcmotCommand.maxLimit) || 00333 isnan(emcmotCommand.minLimit)) 00334 { 00335 printf("isnan error in emcAxisSetMinPosition\n"); 00336 return -1; 00337 } 00338 #endif 00339 00340 return usrmotWriteEmcmotCommand(&emcmotCommand); 00341 } |
|
Definition at line 732 of file bridgeporttaskintf.cc. 00733 { 00734 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00735 { 00736 return 0; 00737 } 00738 00739 emcmotCommand.command = EMCMOT_DAC_OUT; 00740 emcmotCommand.axis = axis; 00741 emcmotCommand.dacOut = output; 00742 00743 return usrmotWriteEmcmotCommand(&emcmotCommand); 00744 } |
|
Definition at line 289 of file bridgeporttaskintf.cc. 00290 { 00291 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00292 { 00293 return 0; 00294 } 00295 00296 emcmotCommand.command = EMCMOT_SET_OUTPUT_SCALE; 00297 emcmotCommand.axis = axis; 00298 emcmotCommand.scale = scale; 00299 emcmotCommand.offset = offset; 00300 00301 #ifdef ISNAN_TRAP 00302 if (isnan(emcmotCommand.scale) || 00303 isnan(emcmotCommand.offset)) 00304 { 00305 printf("isnan eror in emcAxisSetOutputScale\n"); 00306 return -1; 00307 } 00308 #endif 00309 00310 return usrmotWriteEmcmotCommand(&emcmotCommand); 00311 } |
|
Definition at line 191 of file bridgeporttaskintf.cc. 00192 { 00193 if (axis < 0 || axis >= EMCMOT_MAX_AXIS) 00194 { 00195 return 0; 00196 } 00197 00198 localEmcAxisUnits[axis] = units; 00199 00200 return 0; 00201 } |
|
Definition at line 892 of file bridgeporttaskintf.cc. 00893 { 00894 int axis; 00895 00896 // check for valid range 00897 if (numAxes <= 0 || numAxes > EMCMOT_MAX_AXIS) { 00898 return -1; 00899 } 00900 00901 for (axis = 0; axis < numAxes; axis++) { 00902 stat[axis].axisType = localEmcAxisAxisType[axis]; 00903 stat[axis].units = localEmcAxisUnits[axis]; 00904 00905 stat[axis].inputScale = emcmotStatus.inputScale[axis]; 00906 stat[axis].inputOffset = emcmotStatus.inputOffset[axis]; 00907 stat[axis].outputScale = emcmotStatus.outputScale[axis]; 00908 stat[axis].outputOffset = emcmotStatus.outputOffset[axis]; 00909 00910 if (new_config) { 00911 stat[axis].p = emcmotConfig.pid[axis].p; 00912 stat[axis].i = emcmotConfig.pid[axis].i; 00913 stat[axis].d = emcmotConfig.pid[axis].d; 00914 stat[axis].ff0 = emcmotConfig.pid[axis].ff0; 00915 stat[axis].ff1 = emcmotConfig.pid[axis].ff1; 00916 stat[axis].ff2 = emcmotConfig.pid[axis].ff2; 00917 stat[axis].backlash = emcmotConfig.pid[axis].backlash; 00918 stat[axis].bias = emcmotConfig.pid[axis].bias; 00919 stat[axis].maxError = emcmotConfig.pid[axis].maxError; 00920 stat[axis].deadband = emcmotConfig.pid[axis].deadband; 00921 stat[axis].cycleTime = emcmotConfig.servoCycleTime; 00922 stat[axis].minPositionLimit = emcmotConfig.minLimit[axis]; 00923 stat[axis].maxPositionLimit = emcmotConfig.maxLimit[axis]; 00924 stat[axis].minOutputLimit = emcmotConfig.minOutput[axis]; 00925 stat[axis].maxOutputLimit = emcmotConfig.maxOutput[axis]; 00926 stat[axis].minFerror = emcmotConfig.minFerror[axis]; 00927 stat[axis].maxFerror = emcmotConfig.maxFerror[axis]; 00928 stat[axis].homeOffset = emcmotConfig.homeOffset[axis]; 00929 stat[axis].enablePolarity = (emcmotConfig.axisPolarity[axis] & 00930 EMCMOT_AXIS_ENABLE_BIT) ? 1 : 0; 00931 stat[axis].minLimitSwitchPolarity = (emcmotConfig.axisPolarity[axis] & 00932 EMCMOT_AXIS_MIN_HARD_LIMIT_BIT) ? 1 : 0; 00933 stat[axis].maxLimitSwitchPolarity = (emcmotConfig.axisPolarity[axis] & 00934 EMCMOT_AXIS_MAX_HARD_LIMIT_BIT) ? 1 : 0; 00935 stat[axis].homeSwitchPolarity = (emcmotConfig.axisPolarity[axis] & 00936 EMCMOT_AXIS_HOME_SWITCH_BIT) ? 1 : 0; 00937 stat[axis].homingPolarity = (emcmotConfig.axisPolarity[axis] & 00938 EMCMOT_AXIS_HOMING_BIT) ? 1 : 0; 00939 stat[axis].faultPolarity = (emcmotConfig.axisPolarity[axis] & 00940 EMCMOT_AXIS_FAULT_BIT) ? 1 : 0; 00941 } 00942 00943 stat[axis].setpoint = emcmotStatus.axisPos[axis]; 00944 00945 if (get_emcmot_debug_info) { 00946 stat[axis].ferrorCurrent = emcmotDebug.ferrorCurrent[axis]; 00947 stat[axis].ferrorHighMark = emcmotDebug.ferrorHighMark[axis]; 00948 } 00949 00950 stat[axis].output = emcmotStatus.output[axis]; 00951 stat[axis].input = emcmotStatus.input[axis]; 00952 stat[axis].homing = (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_HOMING_BIT ? 1 : 0); 00953 stat[axis].homed = (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_HOMED_BIT ? 1 : 0); 00954 stat[axis].fault = (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_FAULT_BIT ? 1 : 0); 00955 stat[axis].enabled = (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_ENABLE_BIT ? 1 : 0); 00956 00957 stat[axis].minSoftLimit = (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_MIN_SOFT_LIMIT_BIT ? 1 : 0); 00958 stat[axis].maxSoftLimit = (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_MAX_SOFT_LIMIT_BIT ? 1 : 0); 00959 stat[axis].minHardLimit = (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_MIN_HARD_LIMIT_BIT ? 1 : 0); 00960 stat[axis].maxHardLimit = (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_MAX_HARD_LIMIT_BIT ? 1 : 0); 00961 stat[axis].overrideLimits = (emcmotStatus.overrideLimits); // one for all 00962 00963 stat[axis].scale = emcmotStatus.axVscale[axis]; 00964 usrmotQueryAlter(axis, &stat[axis].alter); 00965 00966 if (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_ERROR_BIT) { 00967 if (stat[axis].status != RCS_ERROR) { 00968 rcs_print_error("Error on axis %d.\n",axis); 00969 stat[axis].status = RCS_ERROR; 00970 } 00971 } 00972 else if (emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_INPOS_BIT) { 00973 stat[axis].status = RCS_DONE; 00974 } 00975 else { 00976 stat[axis].status = RCS_EXEC; 00977 } 00978 } 00979 00980 return 0; 00981 } |
|
|
|
Definition at line 2049 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand(), and main().
02050 { 02051 EMC_COOLANT_FLOOD_OFF floodOffMsg; 02052 02053 sendCommand(&floodOffMsg); 02054 02055 return 0; 02056 } |
|
Definition at line 2040 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
02041 { 02042 EMC_COOLANT_FLOOD_ON floodOnMsg; 02043 02044 sendCommand(&floodOnMsg); 02045 02046 return 0; 02047 } |
|
|
|
|
|
Definition at line 2031 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand(), and main().
02032 { 02033 EMC_COOLANT_MIST_OFF mistOffMsg; 02034 02035 sendCommand(&mistOffMsg); 02036 02037 return 0; 02038 } |
|
Definition at line 2022 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
02023 { 02024 EMC_COOLANT_MIST_ON mistOnMsg; 02025 02026 sendCommand(&mistOnMsg); 02027 02028 return 0; 02029 } |
|
Definition at line 211 of file inicool.cc. 00212 { 00213 FLOOD_COOLANT_INDEX = index; 00214 00215 return 0; 00216 } |
|
Definition at line 225 of file inicool.cc. 00226 { 00227 FLOOD_COOLANT_POLARITY = polarity; 00228 00229 return 0; 00230 } |
|
Definition at line 204 of file inicool.cc. 00205 { 00206 MIST_COOLANT_INDEX = index; 00207 00208 return 0; 00209 } |
|
Definition at line 218 of file inicool.cc. 00219 { 00220 MIST_COOLANT_POLARITY = polarity; 00221 00222 return 0; 00223 } |
|
|
|
Definition at line 27 of file emc.cc. 00028 { 00029 switch(type) 00030 { 00031 case EMC_ABORT_TYPE: 00032 ((EMC_ABORT *) buffer)->update(cms); 00033 break; 00034 case EMC_AUX_ABORT_TYPE: 00035 ((EMC_AUX_ABORT *) buffer)->update(cms); 00036 break; 00037 case EMC_AUX_AIO_WRITE_TYPE: 00038 ((EMC_AUX_AIO_WRITE *) buffer)->update(cms); 00039 break; 00040 case EMC_AUX_DIO_WRITE_TYPE: 00041 ((EMC_AUX_DIO_WRITE *) buffer)->update(cms); 00042 break; 00043 case EMC_AUX_ESTOP_OFF_TYPE: 00044 ((EMC_AUX_ESTOP_OFF *) buffer)->update(cms); 00045 break; 00046 case EMC_AUX_ESTOP_ON_TYPE: 00047 ((EMC_AUX_ESTOP_ON *) buffer)->update(cms); 00048 break; 00049 case EMC_AUX_HALT_TYPE: 00050 ((EMC_AUX_HALT *) buffer)->update(cms); 00051 break; 00052 case EMC_AUX_INIT_TYPE: 00053 ((EMC_AUX_INIT *) buffer)->update(cms); 00054 break; 00055 case EMC_AUX_STAT_TYPE: 00056 ((EMC_AUX_STAT *) buffer)->update(cms); 00057 break; 00058 case EMC_AXIS_ABORT_TYPE: 00059 ((EMC_AXIS_ABORT *) buffer)->update(cms); 00060 break; 00061 case EMC_AXIS_ABS_JOG_TYPE: 00062 ((EMC_AXIS_ABS_JOG *) buffer)->update(cms); 00063 break; 00064 case EMC_AXIS_ACTIVATE_TYPE: 00065 ((EMC_AXIS_ACTIVATE *) buffer)->update(cms); 00066 break; 00067 case EMC_AXIS_ALTER_TYPE: 00068 ((EMC_AXIS_ALTER *) buffer)->update(cms); 00069 break; 00070 case EMC_AXIS_DEACTIVATE_TYPE: 00071 ((EMC_AXIS_DEACTIVATE *) buffer)->update(cms); 00072 break; 00073 case EMC_AXIS_DISABLE_TYPE: 00074 ((EMC_AXIS_DISABLE *) buffer)->update(cms); 00075 break; 00076 case EMC_AXIS_ENABLE_TYPE: 00077 ((EMC_AXIS_ENABLE *) buffer)->update(cms); 00078 break; 00079 case EMC_AXIS_HALT_TYPE: 00080 ((EMC_AXIS_HALT *) buffer)->update(cms); 00081 break; 00082 case EMC_AXIS_HOME_TYPE: 00083 ((EMC_AXIS_HOME *) buffer)->update(cms); 00084 break; 00085 case EMC_AXIS_INCR_JOG_TYPE: 00086 ((EMC_AXIS_INCR_JOG *) buffer)->update(cms); 00087 break; 00088 case EMC_AXIS_INIT_TYPE: 00089 ((EMC_AXIS_INIT *) buffer)->update(cms); 00090 break; 00091 case EMC_AXIS_JOG_TYPE: 00092 ((EMC_AXIS_JOG *) buffer)->update(cms); 00093 break; 00094 case EMC_AXIS_LOAD_COMP_TYPE: 00095 ((EMC_AXIS_LOAD_COMP *) buffer)->update(cms); 00096 break; 00097 case EMC_AXIS_OVERRIDE_LIMITS_TYPE: 00098 ((EMC_AXIS_OVERRIDE_LIMITS *) buffer)->update(cms); 00099 break; 00100 case EMC_AXIS_SET_AXIS_TYPE: 00101 ((EMC_AXIS_SET_AXIS *) buffer)->update(cms); 00102 break; 00103 case EMC_AXIS_SET_CYCLE_TIME_TYPE: 00104 ((EMC_AXIS_SET_CYCLE_TIME *) buffer)->update(cms); 00105 break; 00106 case EMC_AXIS_SET_FERROR_TYPE: 00107 ((EMC_AXIS_SET_FERROR *) buffer)->update(cms); 00108 break; 00109 case EMC_AXIS_SET_GAINS_TYPE: 00110 ((EMC_AXIS_SET_GAINS *) buffer)->update(cms); 00111 break; 00112 case EMC_AXIS_SET_HOME_TYPE: 00113 ((EMC_AXIS_SET_HOME *) buffer)->update(cms); 00114 break; 00115 case EMC_AXIS_SET_HOME_OFFSET_TYPE: 00116 ((EMC_AXIS_SET_HOME_OFFSET *) buffer)->update(cms); 00117 break; 00118 case EMC_AXIS_SET_HOMING_VEL_TYPE: 00119 ((EMC_AXIS_SET_HOMING_VEL *) buffer)->update(cms); 00120 break; 00121 case EMC_AXIS_SET_INPUT_SCALE_TYPE: 00122 ((EMC_AXIS_SET_INPUT_SCALE *) buffer)->update(cms); 00123 break; 00124 case EMC_AXIS_SET_MAX_OUTPUT_LIMIT_TYPE: 00125 ((EMC_AXIS_SET_MAX_OUTPUT_LIMIT *) buffer)->update(cms); 00126 break; 00127 case EMC_AXIS_SET_MAX_POSITION_LIMIT_TYPE: 00128 ((EMC_AXIS_SET_MAX_POSITION_LIMIT *) buffer)->update(cms); 00129 break; 00130 case EMC_AXIS_SET_MAX_VELOCITY_TYPE: 00131 ((EMC_AXIS_SET_MAX_VELOCITY *) buffer)->update(cms); 00132 break; 00133 case EMC_AXIS_SET_MIN_FERROR_TYPE: 00134 ((EMC_AXIS_SET_MIN_FERROR *) buffer)->update(cms); 00135 break; 00136 case EMC_AXIS_SET_MIN_OUTPUT_LIMIT_TYPE: 00137 ((EMC_AXIS_SET_MIN_OUTPUT_LIMIT *) buffer)->update(cms); 00138 break; 00139 case EMC_AXIS_SET_MIN_POSITION_LIMIT_TYPE: 00140 ((EMC_AXIS_SET_MIN_POSITION_LIMIT *) buffer)->update(cms); 00141 break; 00142 case EMC_AXIS_SET_OUTPUT_TYPE: 00143 ((EMC_AXIS_SET_OUTPUT *) buffer)->update(cms); 00144 break; 00145 case EMC_AXIS_SET_OUTPUT_SCALE_TYPE: 00146 ((EMC_AXIS_SET_OUTPUT_SCALE *) buffer)->update(cms); 00147 break; 00148 case EMC_AXIS_SET_UNITS_TYPE: 00149 ((EMC_AXIS_SET_UNITS *) buffer)->update(cms); 00150 break; 00151 case EMC_AXIS_STAT_TYPE: 00152 ((EMC_AXIS_STAT *) buffer)->update(cms); 00153 break; 00154 case EMC_COOLANT_ABORT_TYPE: 00155 ((EMC_COOLANT_ABORT *) buffer)->update(cms); 00156 break; 00157 case EMC_COOLANT_FLOOD_OFF_TYPE: 00158 ((EMC_COOLANT_FLOOD_OFF *) buffer)->update(cms); 00159 break; 00160 case EMC_COOLANT_FLOOD_ON_TYPE: 00161 ((EMC_COOLANT_FLOOD_ON *) buffer)->update(cms); 00162 break; 00163 case EMC_COOLANT_HALT_TYPE: 00164 ((EMC_COOLANT_HALT *) buffer)->update(cms); 00165 break; 00166 case EMC_COOLANT_INIT_TYPE: 00167 ((EMC_COOLANT_INIT *) buffer)->update(cms); 00168 break; 00169 case EMC_COOLANT_MIST_OFF_TYPE: 00170 ((EMC_COOLANT_MIST_OFF *) buffer)->update(cms); 00171 break; 00172 case EMC_COOLANT_MIST_ON_TYPE: 00173 ((EMC_COOLANT_MIST_ON *) buffer)->update(cms); 00174 break; 00175 case EMC_COOLANT_STAT_TYPE: 00176 ((EMC_COOLANT_STAT *) buffer)->update(cms); 00177 break; 00178 case EMC_HALT_TYPE: 00179 ((EMC_HALT *) buffer)->update(cms); 00180 break; 00181 case EMC_INIT_TYPE: 00182 ((EMC_INIT *) buffer)->update(cms); 00183 break; 00184 case EMC_IO_ABORT_TYPE: 00185 ((EMC_IO_ABORT *) buffer)->update(cms); 00186 break; 00187 case EMC_IO_HALT_TYPE: 00188 ((EMC_IO_HALT *) buffer)->update(cms); 00189 break; 00190 case EMC_IO_INIT_TYPE: 00191 ((EMC_IO_INIT *) buffer)->update(cms); 00192 break; 00193 case EMC_IO_SET_CYCLE_TIME_TYPE: 00194 ((EMC_IO_SET_CYCLE_TIME *) buffer)->update(cms); 00195 break; 00196 case EMC_IO_STAT_TYPE: 00197 ((EMC_IO_STAT *) buffer)->update(cms); 00198 break; 00199 case EMC_LOG_CLOSE_TYPE: 00200 ((EMC_LOG_CLOSE *) buffer)->update(cms); 00201 break; 00202 case EMC_LOG_OPEN_TYPE: 00203 ((EMC_LOG_OPEN *) buffer)->update(cms); 00204 break; 00205 case EMC_LOG_START_TYPE: 00206 ((EMC_LOG_START *) buffer)->update(cms); 00207 break; 00208 case EMC_LOG_STOP_TYPE: 00209 ((EMC_LOG_STOP *) buffer)->update(cms); 00210 break; 00211 case EMC_LUBE_ABORT_TYPE: 00212 ((EMC_LUBE_ABORT *) buffer)->update(cms); 00213 break; 00214 case EMC_LUBE_HALT_TYPE: 00215 ((EMC_LUBE_HALT *) buffer)->update(cms); 00216 break; 00217 case EMC_LUBE_INIT_TYPE: 00218 ((EMC_LUBE_INIT *) buffer)->update(cms); 00219 break; 00220 case EMC_LUBE_OFF_TYPE: 00221 ((EMC_LUBE_OFF *) buffer)->update(cms); 00222 break; 00223 case EMC_LUBE_ON_TYPE: 00224 ((EMC_LUBE_ON *) buffer)->update(cms); 00225 break; 00226 case EMC_LUBE_STAT_TYPE: 00227 ((EMC_LUBE_STAT *) buffer)->update(cms); 00228 break; 00229 case EMC_MOTION_ABORT_TYPE: 00230 ((EMC_MOTION_ABORT *) buffer)->update(cms); 00231 break; 00232 case EMC_MOTION_HALT_TYPE: 00233 ((EMC_MOTION_HALT *) buffer)->update(cms); 00234 break; 00235 case EMC_MOTION_INIT_TYPE: 00236 ((EMC_MOTION_INIT *) buffer)->update(cms); 00237 break; 00238 case EMC_MOTION_SET_AOUT_TYPE: 00239 ((EMC_MOTION_SET_AOUT *) buffer)->update(cms); 00240 break; 00241 case EMC_MOTION_SET_DOUT_TYPE: 00242 ((EMC_MOTION_SET_DOUT *) buffer)->update(cms); 00243 break; 00244 case EMC_MOTION_STAT_TYPE: 00245 ((EMC_MOTION_STAT *) buffer)->update(cms); 00246 break; 00247 case EMC_NULL_TYPE: 00248 ((EMC_NULL *) buffer)->update(cms); 00249 break; 00250 case EMC_OPERATOR_DISPLAY_TYPE: 00251 ((EMC_OPERATOR_DISPLAY *) buffer)->update(cms); 00252 break; 00253 case EMC_OPERATOR_ERROR_TYPE: 00254 ((EMC_OPERATOR_ERROR *) buffer)->update(cms); 00255 break; 00256 case EMC_OPERATOR_TEXT_TYPE: 00257 ((EMC_OPERATOR_TEXT *) buffer)->update(cms); 00258 break; 00259 case EMC_SET_AIO_INDEX_TYPE: 00260 ((EMC_SET_AIO_INDEX *) buffer)->update(cms); 00261 break; 00262 case EMC_SET_DEBUG_TYPE: 00263 ((EMC_SET_DEBUG *) buffer)->update(cms); 00264 break; 00265 case EMC_SET_DIO_INDEX_TYPE: 00266 ((EMC_SET_DIO_INDEX *) buffer)->update(cms); 00267 break; 00268 case EMC_SET_POLARITY_TYPE: 00269 ((EMC_SET_POLARITY *) buffer)->update(cms); 00270 break; 00271 case EMC_SPINDLE_ABORT_TYPE: 00272 ((EMC_SPINDLE_ABORT *) buffer)->update(cms); 00273 break; 00274 case EMC_SPINDLE_BRAKE_ENGAGE_TYPE: 00275 ((EMC_SPINDLE_BRAKE_ENGAGE *) buffer)->update(cms); 00276 break; 00277 case EMC_SPINDLE_BRAKE_RELEASE_TYPE: 00278 ((EMC_SPINDLE_BRAKE_RELEASE *) buffer)->update(cms); 00279 break; 00280 case EMC_SPINDLE_CONSTANT_TYPE: 00281 ((EMC_SPINDLE_CONSTANT *) buffer)->update(cms); 00282 break; 00283 case EMC_SPINDLE_DECREASE_TYPE: 00284 ((EMC_SPINDLE_DECREASE *) buffer)->update(cms); 00285 break; 00286 case EMC_SPINDLE_DISABLE_TYPE: 00287 ((EMC_SPINDLE_DISABLE *) buffer)->update(cms); 00288 break; 00289 case EMC_SPINDLE_ENABLE_TYPE: 00290 ((EMC_SPINDLE_ENABLE *) buffer)->update(cms); 00291 break; 00292 case EMC_SPINDLE_FORWARD_TYPE: 00293 ((EMC_SPINDLE_FORWARD *) buffer)->update(cms); 00294 break; 00295 case EMC_SPINDLE_HALT_TYPE: 00296 ((EMC_SPINDLE_HALT *) buffer)->update(cms); 00297 break; 00298 case EMC_SPINDLE_INCREASE_TYPE: 00299 ((EMC_SPINDLE_INCREASE *) buffer)->update(cms); 00300 break; 00301 case EMC_SPINDLE_INIT_TYPE: 00302 ((EMC_SPINDLE_INIT *) buffer)->update(cms); 00303 break; 00304 case EMC_SPINDLE_OFF_TYPE: 00305 ((EMC_SPINDLE_OFF *) buffer)->update(cms); 00306 break; 00307 case EMC_SPINDLE_ON_TYPE: 00308 ((EMC_SPINDLE_ON *) buffer)->update(cms); 00309 break; 00310 case EMC_SPINDLE_REVERSE_TYPE: 00311 ((EMC_SPINDLE_REVERSE *) buffer)->update(cms); 00312 break; 00313 case EMC_SPINDLE_STAT_TYPE: 00314 ((EMC_SPINDLE_STAT *) buffer)->update(cms); 00315 break; 00316 case EMC_SPINDLE_STOP_TYPE: 00317 ((EMC_SPINDLE_STOP *) buffer)->update(cms); 00318 break; 00319 case EMC_STAT_TYPE: 00320 ((EMC_STAT *) buffer)->update(cms); 00321 break; 00322 case EMC_TASK_ABORT_TYPE: 00323 ((EMC_TASK_ABORT *) buffer)->update(cms); 00324 break; 00325 case EMC_TASK_HALT_TYPE: 00326 ((EMC_TASK_HALT *) buffer)->update(cms); 00327 break; 00328 case EMC_TASK_INIT_TYPE: 00329 ((EMC_TASK_INIT *) buffer)->update(cms); 00330 break; 00331 case EMC_TASK_PLAN_CLOSE_TYPE: 00332 ((EMC_TASK_PLAN_CLOSE *) buffer)->update(cms); 00333 break; 00334 case EMC_TASK_PLAN_END_TYPE: 00335 ((EMC_TASK_PLAN_END *) buffer)->update(cms); 00336 break; 00337 case EMC_TASK_PLAN_EXECUTE_TYPE: 00338 ((EMC_TASK_PLAN_EXECUTE *) buffer)->update(cms); 00339 break; 00340 case EMC_TASK_PLAN_INIT_TYPE: 00341 ((EMC_TASK_PLAN_INIT *) buffer)->update(cms); 00342 break; 00343 case EMC_TASK_PLAN_OPEN_TYPE: 00344 ((EMC_TASK_PLAN_OPEN *) buffer)->update(cms); 00345 break; 00346 case EMC_TASK_PLAN_PAUSE_TYPE: 00347 ((EMC_TASK_PLAN_PAUSE *) buffer)->update(cms); 00348 break; 00349 case EMC_TASK_PLAN_READ_TYPE: 00350 ((EMC_TASK_PLAN_READ *) buffer)->update(cms); 00351 break; 00352 case EMC_TASK_PLAN_RESUME_TYPE: 00353 ((EMC_TASK_PLAN_RESUME *) buffer)->update(cms); 00354 break; 00355 case EMC_TASK_PLAN_RUN_TYPE: 00356 ((EMC_TASK_PLAN_RUN *) buffer)->update(cms); 00357 break; 00358 case EMC_TASK_PLAN_STEP_TYPE: 00359 ((EMC_TASK_PLAN_STEP *) buffer)->update(cms); 00360 break; 00361 case EMC_TASK_PLAN_SYNCH_TYPE: 00362 ((EMC_TASK_PLAN_SYNCH *) buffer)->update(cms); 00363 break; 00364 case EMC_TASK_SET_MODE_TYPE: 00365 ((EMC_TASK_SET_MODE *) buffer)->update(cms); 00366 break; 00367 case EMC_TASK_SET_STATE_TYPE: 00368 ((EMC_TASK_SET_STATE *) buffer)->update(cms); 00369 break; 00370 case EMC_TASK_STAT_TYPE: 00371 ((EMC_TASK_STAT *) buffer)->update(cms); 00372 break; 00373 case EMC_TOOL_ABORT_TYPE: 00374 ((EMC_TOOL_ABORT *) buffer)->update(cms); 00375 break; 00376 case EMC_TOOL_HALT_TYPE: 00377 ((EMC_TOOL_HALT *) buffer)->update(cms); 00378 break; 00379 case EMC_TOOL_INIT_TYPE: 00380 ((EMC_TOOL_INIT *) buffer)->update(cms); 00381 break; 00382 case EMC_TOOL_LOAD_TYPE: 00383 ((EMC_TOOL_LOAD *) buffer)->update(cms); 00384 break; 00385 case EMC_TOOL_LOAD_TOOL_TABLE_TYPE: 00386 ((EMC_TOOL_LOAD_TOOL_TABLE *) buffer)->update(cms); 00387 break; 00388 case EMC_TOOL_PREPARE_TYPE: 00389 ((EMC_TOOL_PREPARE *) buffer)->update(cms); 00390 break; 00391 case EMC_TOOL_SET_OFFSET_TYPE: 00392 ((EMC_TOOL_SET_OFFSET *) buffer)->update(cms); 00393 break; 00394 case EMC_TOOL_STAT_TYPE: 00395 ((EMC_TOOL_STAT *) buffer)->update(cms); 00396 break; 00397 case EMC_TOOL_UNLOAD_TYPE: 00398 ((EMC_TOOL_UNLOAD *) buffer)->update(cms); 00399 break; 00400 case EMC_TRAJ_ABORT_TYPE: 00401 ((EMC_TRAJ_ABORT *) buffer)->update(cms); 00402 break; 00403 case EMC_TRAJ_CIRCULAR_MOVE_TYPE: 00404 ((EMC_TRAJ_CIRCULAR_MOVE *) buffer)->update(cms); 00405 break; 00406 case EMC_TRAJ_CLEAR_PROBE_TRIPPED_FLAG_TYPE: 00407 ((EMC_TRAJ_CLEAR_PROBE_TRIPPED_FLAG *) buffer)->update(cms); 00408 break; 00409 case EMC_TRAJ_DELAY_TYPE: 00410 ((EMC_TRAJ_DELAY *) buffer)->update(cms); 00411 break; 00412 case EMC_TRAJ_DISABLE_TYPE: 00413 ((EMC_TRAJ_DISABLE *) buffer)->update(cms); 00414 break; 00415 case EMC_TRAJ_ENABLE_TYPE: 00416 ((EMC_TRAJ_ENABLE *) buffer)->update(cms); 00417 break; 00418 case EMC_TRAJ_HALT_TYPE: 00419 ((EMC_TRAJ_HALT *) buffer)->update(cms); 00420 break; 00421 case EMC_TRAJ_INIT_TYPE: 00422 ((EMC_TRAJ_INIT *) buffer)->update(cms); 00423 break; 00424 case EMC_TRAJ_LINEAR_MOVE_TYPE: 00425 ((EMC_TRAJ_LINEAR_MOVE *) buffer)->update(cms); 00426 break; 00427 case EMC_TRAJ_PAUSE_TYPE: 00428 ((EMC_TRAJ_PAUSE *) buffer)->update(cms); 00429 break; 00430 case EMC_TRAJ_PROBE_TYPE: 00431 ((EMC_TRAJ_PROBE *) buffer)->update(cms); 00432 break; 00433 case EMC_TRAJ_RESUME_TYPE: 00434 ((EMC_TRAJ_RESUME *) buffer)->update(cms); 00435 break; 00436 case EMC_TRAJ_SET_ACCELERATION_TYPE: 00437 ((EMC_TRAJ_SET_ACCELERATION *) buffer)->update(cms); 00438 break; 00439 case EMC_TRAJ_SET_AXES_TYPE: 00440 ((EMC_TRAJ_SET_AXES *) buffer)->update(cms); 00441 break; 00442 case EMC_TRAJ_SET_CYCLE_TIME_TYPE: 00443 ((EMC_TRAJ_SET_CYCLE_TIME *) buffer)->update(cms); 00444 break; 00445 case EMC_TRAJ_SET_HOME_TYPE: 00446 ((EMC_TRAJ_SET_HOME *) buffer)->update(cms); 00447 break; 00448 case EMC_TRAJ_SET_MAX_ACCELERATION_TYPE: 00449 ((EMC_TRAJ_SET_MAX_ACCELERATION *) buffer)->update(cms); 00450 break; 00451 case EMC_TRAJ_SET_MAX_VELOCITY_TYPE: 00452 ((EMC_TRAJ_SET_MAX_VELOCITY *) buffer)->update(cms); 00453 break; 00454 case EMC_TRAJ_SET_MODE_TYPE: 00455 ((EMC_TRAJ_SET_MODE *) buffer)->update(cms); 00456 break; 00457 case EMC_TRAJ_SET_MOTION_ID_TYPE: 00458 ((EMC_TRAJ_SET_MOTION_ID *) buffer)->update(cms); 00459 break; 00460 case EMC_TRAJ_SET_OFFSET_TYPE: 00461 ((EMC_TRAJ_SET_OFFSET *) buffer)->update(cms); 00462 break; 00463 case EMC_TRAJ_SET_ORIGIN_TYPE: 00464 ((EMC_TRAJ_SET_ORIGIN *) buffer)->update(cms); 00465 break; 00466 case EMC_TRAJ_SET_PROBE_INDEX_TYPE: 00467 ((EMC_TRAJ_SET_PROBE_INDEX *) buffer)->update(cms); 00468 break; 00469 case EMC_TRAJ_SET_PROBE_POLARITY_TYPE: 00470 ((EMC_TRAJ_SET_PROBE_POLARITY *) buffer)->update(cms); 00471 break; 00472 case EMC_TRAJ_SET_SCALE_TYPE: 00473 ((EMC_TRAJ_SET_SCALE *) buffer)->update(cms); 00474 break; 00475 case EMC_TRAJ_SET_TELEOP_ENABLE_TYPE: 00476 ((EMC_TRAJ_SET_TELEOP_ENABLE *) buffer)->update(cms); 00477 break; 00478 case EMC_TRAJ_SET_TELEOP_VECTOR_TYPE: 00479 ((EMC_TRAJ_SET_TELEOP_VECTOR *) buffer)->update(cms); 00480 break; 00481 case EMC_TRAJ_SET_TERM_COND_TYPE: 00482 ((EMC_TRAJ_SET_TERM_COND *) buffer)->update(cms); 00483 break; 00484 case EMC_TRAJ_SET_UNITS_TYPE: 00485 ((EMC_TRAJ_SET_UNITS *) buffer)->update(cms); 00486 break; 00487 case EMC_TRAJ_SET_VELOCITY_TYPE: 00488 ((EMC_TRAJ_SET_VELOCITY *) buffer)->update(cms); 00489 break; 00490 case EMC_TRAJ_STAT_TYPE: 00491 ((EMC_TRAJ_STAT *) buffer)->update(cms); 00492 break; 00493 case EMC_TRAJ_STEP_TYPE: 00494 ((EMC_TRAJ_STEP *) buffer)->update(cms); 00495 break; 00496 00497 default: 00498 return(0); 00499 } 00500 return 1; 00501 } |
|
|
|
|
|
Definition at line 1896 of file bridgeporttaskintf.cc. Referenced by emcTaskAbort().
01897 { 01898 EMC_TOOL_ABORT ioAbortMsg; 01899 01900 // send abort command to emcio 01901 forceCommand(&ioAbortMsg); 01902 01903 return 0; 01904 } |
|
Definition at line 1868 of file bridgeporttaskintf.cc. Referenced by emctask_shutdown().
01869 { 01870 EMC_TOOL_HALT ioHaltMsg; 01871 01872 // send halt command to emcio 01873 if (emcIoCommandBuffer != 0) 01874 { 01875 forceCommand(&ioHaltMsg); 01876 } 01877 01878 // clear out the buffers 01879 01880 if (emcIoStatusBuffer != 0) 01881 { 01882 delete emcIoStatusBuffer; 01883 emcIoStatusBuffer = 0; 01884 emcIoStatus = 0; 01885 } 01886 01887 if (emcIoCommandBuffer != 0) 01888 { 01889 delete emcIoCommandBuffer; 01890 emcIoCommandBuffer = 0; 01891 } 01892 01893 return 0; 01894 } |
|
Definition at line 1853 of file bridgeporttaskintf.cc. Referenced by emctask_startup().
01854 { 01855 EMC_TOOL_INIT ioInitMsg; 01856 int retval; 01857 01858 // get NML buffer to emcio 01859 if (0 != (retval = emcioNmlGet())) 01860 { 01861 return -1; 01862 } 01863 01864 // send init command to emcio 01865 return forceCommand(&ioInitMsg); 01866 } |
|
|
|
Definition at line 1906 of file bridgeporttaskintf.cc. 01907 { 01908 EMC_SET_DEBUG ioDebugMsg; 01909 01910 ioDebugMsg.debug = debug; 01911 01912 return sendCommand(&ioDebugMsg); 01913 } |
|
Definition at line 2267 of file bridgeporttaskintf.cc. 02268 { 02269 if (0 == emcIoStatusBuffer || 02270 ! emcIoStatusBuffer->valid()) 02271 { 02272 return -1; 02273 } 02274 02275 switch (emcIoStatusBuffer->peek()) 02276 { 02277 case -1: 02278 // error on CMS channel 02279 return -1; 02280 break; 02281 02282 case 0: // nothing new 02283 case EMC_IO_STAT_TYPE: // something new 02284 // drop out to copy 02285 break; 02286 02287 default: 02288 // something else is in there 02289 return -1; 02290 break; 02291 } 02292 02293 // copy status 02294 *stat = *emcIoStatus; 02295 02296 /* 02297 We need to check that the RCS_DONE isn't left over from the previous 02298 command, by comparing the command number we sent with the command 02299 number that emcio echoes. If they're different, then the command hasn't 02300 been acknowledged yet and the state should be forced to be RCS_EXEC. 02301 */ 02302 if (stat->echo_serial_number != emcIoCommandSerialNumber) 02303 { 02304 stat->status = RCS_EXEC; 02305 } 02306 02307 return 0; 02308 } |
|
Definition at line 2238 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
02239 { 02240 int r1; 02241 int r2; 02242 02243 // first check for active log, return nicely if not 02244 if (emcStatus->logFile[0] == 0 || 02245 emcStatus->logSize == 0) 02246 { 02247 return 0; 02248 } 02249 02250 emcmotCommand.command = EMCMOT_CLOSE_LOG; 02251 02252 r1 = usrmotWriteEmcmotCommand(&emcmotCommand); 02253 r2 = usrmotDumpLog(emcStatus->logFile, EMCLOG_INCLUDE_HEADER); 02254 02255 emcStatus->logFile[0] = 0; 02256 emcStatus->logType = 0; 02257 emcStatus->logSize = 0; 02258 emcStatus->logSkip = 0; 02259 emcStatus->logOpen = 0; 02260 emcStatus->logStarted = 0; 02261 02262 return (r1 || r2 ? -1 : 0); 02263 } |
|
Definition at line 2157 of file bridgeporttaskintf.cc. 02158 { 02159 int r1; 02160 02161 emcmotCommand.command = EMCMOT_OPEN_LOG; 02162 emcmotCommand.logSize = size; 02163 emcmotCommand.logSkip = skip; 02164 emcmotCommand.axis = which; 02165 02166 // Note that EMC NML and emcmot will be different, in general-- 02167 // need to map types 02168 switch (type) 02169 { 02170 case EMC_LOG_TYPE_AXIS_POS: 02171 emcmotCommand.logType = EMCMOT_LOG_TYPE_AXIS_POS; 02172 break; 02173 02174 case EMC_LOG_TYPE_AXES_INPOS: 02175 emcmotCommand.logType = EMCMOT_LOG_TYPE_ALL_INPOS; 02176 break; 02177 02178 case EMC_LOG_TYPE_AXES_OUTPOS: 02179 emcmotCommand.logType = EMCMOT_LOG_TYPE_ALL_OUTPOS; 02180 break; 02181 02182 case EMC_LOG_TYPE_AXIS_VEL: 02183 emcmotCommand.logType = EMCMOT_LOG_TYPE_AXIS_VEL; 02184 break; 02185 02186 case EMC_LOG_TYPE_AXES_FERROR: 02187 emcmotCommand.logType = EMCMOT_LOG_TYPE_ALL_FERROR; 02188 break; 02189 02190 case EMC_LOG_TYPE_TRAJ_POS: 02191 emcmotCommand.logType = EMCMOT_LOG_TYPE_TRAJ_POS; 02192 break; 02193 02194 case EMC_LOG_TYPE_TRAJ_VEL: 02195 emcmotCommand.logType = EMCMOT_LOG_TYPE_TRAJ_VEL; 02196 break; 02197 02198 case EMC_LOG_TYPE_TRAJ_ACC: 02199 emcmotCommand.logType = EMCMOT_LOG_TYPE_TRAJ_ACC; 02200 break; 02201 02202 case EMC_LOG_TYPE_POS_VOLTAGE: 02203 emcmotCommand.logType = EMCMOT_LOG_TYPE_POS_VOLTAGE; 02204 break; 02205 02206 default: 02207 return -1; 02208 } 02209 emcmotCommand.logTriggerType = triggerType; 02210 emcmotCommand.logTriggerVariable = triggerVar; 02211 emcmotCommand.logTriggerThreshold = triggerThreshold; 02212 02213 r1 = usrmotWriteEmcmotCommand(&emcmotCommand); 02214 02215 if (r1 == 0) 02216 { 02217 strncpy(emcStatus->logFile, file, EMC_LOG_FILENAME_LEN - 1); 02218 emcStatus->logFile[EMC_LOG_FILENAME_LEN - 1] = 0; 02219 } 02220 // type, size, skip, open, and started will be gotten out of 02221 // subsystem status, e.g., emcTrajUpdate() 02222 02223 return r1; 02224 } |
|
Definition at line 2226 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
02227 { 02228 emcmotCommand.command = EMCMOT_START_LOG; 02229 return(usrmotWriteEmcmotCommand(&emcmotCommand)); 02230 } |
|
Definition at line 2232 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
02233 { 02234 emcmotCommand.command = EMCMOT_STOP_LOG; 02235 return(usrmotWriteEmcmotCommand(&emcmotCommand)); 02236 } |
|
Definition at line 2078 of file bridgeporttaskintf.cc. 02079 { 02080 EMC_LUBE_ABORT lubeAbortMsg; 02081 02082 sendCommand(&lubeAbortMsg); 02083 02084 return 0; 02085 } |
|
Definition at line 2069 of file bridgeporttaskintf.cc. 02070 { 02071 EMC_LUBE_HALT lubeHaltMsg; 02072 02073 sendCommand(&lubeHaltMsg); 02074 02075 return 0; 02076 } |
|
Definition at line 2060 of file bridgeporttaskintf.cc. 02061 { 02062 EMC_LUBE_INIT lubeInitMsg; 02063 02064 sendCommand(&lubeInitMsg); 02065 02066 return 0; 02067 } |
|
Definition at line 2096 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand(), emcTaskSetState(), and main().
02097 { 02098 EMC_LUBE_OFF lubeOffMsg; 02099 02100 sendCommand(&lubeOffMsg); 02101 02102 return 0; 02103 } |
|
Definition at line 2087 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand(), and emcTaskSetState().
02088 { 02089 EMC_LUBE_ON lubeOnMsg; 02090 02091 sendCommand(&lubeOnMsg); 02092 02093 return 0; 02094 } |
|
Definition at line 201 of file inilube.cc. 00202 { 00203 LUBE_SENSE_INDEX = index; 00204 00205 return 0; 00206 } |
|
Definition at line 208 of file inilube.cc. 00209 { 00210 LUBE_SENSE_POLARITY = polarity; 00211 00212 return 0; 00213 } |
|
Definition at line 215 of file inilube.cc. 00216 { 00217 LUBE_WRITE_INDEX = index; 00218 00219 return 0; 00220 } |
|
Definition at line 222 of file inilube.cc. 00223 { 00224 LUBE_WRITE_POLARITY = polarity; 00225 00226 return 0; 00227 } |
|
|
|
Definition at line 1535 of file bridgeporttaskintf.cc. Referenced by emcTaskAbort().
01536 { 01537 int r1; 01538 int r2; 01539 int t; 01540 01541 r1 = -1; 01542 for (t = 0; t < EMCMOT_MAX_AXIS; t++) 01543 { 01544 if (0 == emcAxisAbort(t)) 01545 { 01546 r1 = 0; // at least one is okay 01547 } 01548 } 01549 01550 r2 = emcTrajAbort(); 01551 01552 // reset optimization flag which suppresses duplicate speed requests 01553 lastVel = -1.0; 01554 01555 return (r1 == 0 && 01556 r2 == 0) ? 0 : -1; 01557 } |
|
Definition at line 1513 of file bridgeporttaskintf.cc. Referenced by emctask_shutdown().
01514 { 01515 int r1; 01516 int r2; 01517 int t; 01518 01519 r1 = -1; 01520 for (t = 0; t < EMCMOT_MAX_AXIS; t++) 01521 { 01522 if (0 == emcAxisHalt(t)) 01523 { 01524 r1 = 0; // at least one is okay 01525 } 01526 } 01527 01528 r2 = emcTrajHalt(); 01529 01530 emcmotion_initialized=0; 01531 return (r1 == 0 && 01532 r2 == 0) ? 0 : -1; 01533 } |
|
Definition at line 1487 of file bridgeporttaskintf.cc. Referenced by emctask_startup().
01488 { 01489 int r1; 01490 int r2; 01491 int axis; 01492 01493 r1 = -1; 01494 for (axis = 0; axis < EMCMOT_MAX_AXIS; axis++) 01495 { 01496 if (0 == emcAxisInit(axis)) 01497 { 01498 r1 = 0; // at least one is okay 01499 } 01500 } 01501 01502 r2 = emcTrajInit(); 01503 01504 if(r1 == 0 && r2 == 0) 01505 { 01506 emcmotion_initialized=1; 01507 } 01508 01509 return (r1 == 0 && 01510 r2 == 0) ? 0 : -1; 01511 } |
|
Definition at line 1566 of file bridgeporttaskintf.cc. 01567 { 01568 emcmotCommand.command = EMCMOT_SET_AOUT; 01569 /* FIXME-- if this works, set up some dedicated cmd fields instead of 01570 borrowing these */ 01571 emcmotCommand.out = index; 01572 emcmotCommand.minLimit = start; 01573 emcmotCommand.maxLimit = end; 01574 01575 return usrmotWriteEmcmotCommand(&emcmotCommand); 01576 } |
|
Definition at line 1559 of file bridgeporttaskintf.cc. 01560 { 01561 emcmotCommand.command = EMCMOT_ABORT; 01562 01563 return usrmotWriteEmcmotCommand(&emcmotCommand); 01564 } |
|
Definition at line 1578 of file bridgeporttaskintf.cc. 01579 { 01580 emcmotCommand.command = EMCMOT_SET_DOUT; 01581 emcmotCommand.out = index; 01582 emcmotCommand.start = start; 01583 emcmotCommand.end = end; 01584 01585 return usrmotWriteEmcmotCommand(&emcmotCommand); 01586 } |
|
Definition at line 1588 of file bridgeporttaskintf.cc. 01589 { 01590 int r1; 01591 int r2; 01592 int axis; 01593 int error; 01594 int exec; 01595 01596 // read the emcmot status 01597 if (0 != usrmotReadEmcmotStatus(&emcmotStatus)) { 01598 return -1; 01599 } 01600 01601 new_config = 0; 01602 if (emcmotStatus.config_num != emcmotConfig.config_num) { 01603 if (0 != usrmotReadEmcmotConfig(&emcmotConfig)) { 01604 return -1; 01605 } 01606 new_config = 1; 01607 } 01608 01609 if (get_emcmot_debug_info) { 01610 if (0 != usrmotReadEmcmotDebug(&emcmotDebug)) { 01611 return -1; 01612 } 01613 } 01614 01615 // read the emcmot error 01616 if (0 != usrmotReadEmcmotError(errorString)) { 01617 // no error, so ignore 01618 } 01619 else { 01620 // an error to report 01621 emcOperatorError(0, errorString); 01622 } 01623 01624 // save the heartbeat and command number locally, 01625 // for use with emcMotionUpdate 01626 localMotionHeartbeat = emcmotStatus.heartbeat; 01627 localMotionCommandType = emcmotStatus.commandEcho; // FIXME-- not NML one! 01628 localMotionEchoSerialNumber = emcmotStatus.commandNumEcho; 01629 01630 r1 = emcAxisUpdate(&stat->axis[0], EMCMOT_MAX_AXIS); 01631 r2 = emcTrajUpdate(&stat->traj); 01632 stat->heartbeat = localMotionHeartbeat; 01633 stat->command_type = localMotionCommandType; 01634 stat->echo_serial_number = localMotionEchoSerialNumber; 01635 stat->debug = emcmotConfig.debug; 01636 01637 // set the status flag 01638 error = 0; 01639 exec = 0; 01640 01641 for (axis = 0; axis < stat->traj.axes; axis++) { 01642 if (stat->axis[axis].status == RCS_ERROR) { 01643 error = 1; 01644 break; 01645 } 01646 if (stat->axis[axis].status == RCS_EXEC) { 01647 exec = 1; 01648 break; 01649 } 01650 } 01651 01652 if (stat->traj.status == RCS_ERROR) { 01653 error = 1; 01654 } 01655 else if (stat->traj.status == RCS_EXEC) { 01656 exec = 1; 01657 } 01658 01659 if (error) { 01660 stat->status = RCS_ERROR; 01661 } 01662 else if (exec) { 01663 stat->status = RCS_EXEC; 01664 } 01665 else { 01666 stat->status = RCS_DONE; 01667 } 01668 01669 return (r1 == 0 && 01670 r2 == 0) ? 0 : -1; 01671 } |
|
Definition at line 360 of file emctaskmain.cc. 00361 { 00362 EMC_OPERATOR_DISPLAY display_msg; 00363 va_list ap; 00364 00365 // check channel for validity 00366 if (emcErrorBuffer == NULL) 00367 return -1; 00368 if (! emcErrorBuffer->valid()) 00369 return -1; 00370 00371 // write args to NML message (ignore int display code) 00372 va_start(ap, fmt); 00373 vsprintf(display_msg.display, fmt, ap); 00374 va_end(ap); 00375 00376 // force a NULL at the end for safety 00377 display_msg.display[EMC_OPERATOR_DISPLAY_LEN-1] = 0; 00378 00379 // write it 00380 return emcErrorBuffer->write(display_msg); 00381 } |
|
Definition at line 296 of file emctaskmain.cc. 00297 { 00298 EMC_OPERATOR_ERROR error_msg; 00299 va_list ap; 00300 00301 // check channel for validity 00302 if (emcErrorBuffer == NULL) 00303 return -1; 00304 if (! emcErrorBuffer->valid()) 00305 return -1; 00306 00307 00308 if(NULL == fmt) 00309 { 00310 return -1; 00311 } 00312 if(0 == *fmt) 00313 { 00314 return -1; 00315 } 00316 00317 // prepend error code, leave off 0 ad-hoc code 00318 error_msg.error[0] = 0; 00319 if (0 != id) 00320 { 00321 sprintf(error_msg.error, "[%d] ", id); 00322 } 00323 00324 // append error string 00325 va_start(ap, fmt); 00326 vsprintf(&error_msg.error[strlen(error_msg.error)], fmt, ap); 00327 va_end(ap); 00328 00329 // force a NULL at the end for safety 00330 error_msg.error[EMC_OPERATOR_ERROR_LEN-1] = 0; 00331 00332 // write it 00333 rcs_print("%s\n",error_msg.error); 00334 return emcErrorBuffer->write(error_msg); 00335 } |
|
Definition at line 337 of file emctaskmain.cc. 00338 { 00339 EMC_OPERATOR_TEXT text_msg; 00340 va_list ap; 00341 00342 // check channel for validity 00343 if (emcErrorBuffer == NULL) 00344 return -1; 00345 if (! emcErrorBuffer->valid()) 00346 return -1; 00347 00348 // write args to NML message (ignore int text code) 00349 va_start(ap, fmt); 00350 vsprintf(text_msg.text, fmt, ap); 00351 va_end(ap); 00352 00353 // force a NULL at the end for safety 00354 text_msg.text[EMC_OPERATOR_TEXT_LEN-1] = 0; 00355 00356 // write it 00357 return emcErrorBuffer->write(text_msg); 00358 } |
|
Definition at line 1929 of file bridgeporttaskintf.cc. 01930 { 01931 return emcSpindleOff(); 01932 } |
|
Definition at line 1962 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
01963 { 01964 EMC_SPINDLE_BRAKE_ENGAGE spindleBrakeEngageMsg; 01965 01966 sendCommand(&spindleBrakeEngageMsg); 01967 01968 return 0; 01969 } |
|
Definition at line 1953 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
01954 { 01955 EMC_SPINDLE_BRAKE_RELEASE spindleBrakeReleaseMsg; 01956 01957 sendCommand(&spindleBrakeReleaseMsg); 01958 01959 return 0; 01960 } |
|
Definition at line 1989 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
01990 { 01991 EMC_SPINDLE_CONSTANT spindleConstantMsg; 01992 01993 sendCommand(&spindleConstantMsg); 01994 01995 return 0; 01996 } |
|
Definition at line 1980 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
01981 { 01982 EMC_SPINDLE_DECREASE spindleDecreaseMsg; 01983 01984 sendCommand(&spindleDecreaseMsg); 01985 01986 return 0; 01987 } |
|
Definition at line 2041 of file minimilltaskintf.cc. Referenced by emcSpindleOff().
02042 { 02043 int r1; 02044 02045 emcmotCommand.command = EMCMOT_DISABLE_AMPLIFIER; 02046 emcmotCommand.axis = SPINDLE_ENABLE_INDEX; 02047 02048 r1 = usrmotWriteEmcmotCommand(&emcmotCommand); 02049 02050 if (0 == r1) 02051 { 02052 simSpindleEnabled = 0; 02053 return 0; 02054 } 02055 02056 return -1; 02057 } |
|
Definition at line 2021 of file minimilltaskintf.cc. Referenced by emcSpindleOn().
02022 { 02023 int r1; 02024 02025 emcmotCommand.command = EMCMOT_ENABLE_AMPLIFIER; 02026 emcmotCommand.axis = SPINDLE_ENABLE_INDEX; 02027 emcmotCommand.dacOut = 0.0; 02028 02029 r1 = usrmotWriteEmcmotCommand(&emcmotCommand); 02030 02031 if (0 == r1) 02032 { 02033 simSpindleEnabled = 1; 02034 return 0; 02035 } 02036 02037 return -1; 02038 } |
|
|
|
|
|
Definition at line 1971 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
01972 { 01973 EMC_SPINDLE_INCREASE spindleIncreaseMsg; 01974 01975 sendCommand(&spindleIncreaseMsg); 01976 01977 return 0; 01978 } |
|
|
|
Definition at line 1944 of file bridgeporttaskintf.cc. Referenced by emcSpindleAbort(), emcTaskIssueCommand(), and main().
01945 { 01946 EMC_SPINDLE_OFF spindleOffMsg; 01947 01948 sendCommand(&spindleOffMsg); 01949 01950 return 0; 01951 } |
|
Definition at line 1934 of file bridgeporttaskintf.cc. 01935 { 01936 EMC_SPINDLE_ON spindleOnMsg; 01937 01938 spindleOnMsg.speed = speed; 01939 sendCommand(&spindleOnMsg); 01940 01941 return 0; 01942 } |
|
|
|
Definition at line 582 of file inispin.cc. 00583 { 00584 SPINDLE_BRAKE_INDEX = index; 00585 00586 return 0; 00587 } |
|
Definition at line 631 of file inispin.cc. 00632 { 00633 SPINDLE_BRAKE_POLARITY = polarity; 00634 00635 return 0; 00636 } |
|
Definition at line 568 of file inispin.cc. 00569 { 00570 SPINDLE_DECREASE_INDEX = index; 00571 00572 return 0; 00573 } |
|
Definition at line 617 of file inispin.cc. 00618 { 00619 SPINDLE_DECREASE_POLARITY = polarity; 00620 00621 return 0; 00622 } |
|
Definition at line 589 of file inispin.cc. 00590 { 00591 SPINDLE_ENABLE_INDEX = index; 00592 00593 return 0; 00594 } |
|
Definition at line 638 of file inispin.cc. 00639 { 00640 SPINDLE_ENABLE_POLARITY = polarity; 00641 00642 return 0; 00643 } |
|
Definition at line 554 of file inispin.cc. 00555 { 00556 SPINDLE_FORWARD_INDEX = index; 00557 00558 return 0; 00559 } |
|
Definition at line 603 of file inispin.cc. 00604 { 00605 SPINDLE_FORWARD_POLARITY = polarity; 00606 00607 return 0; 00608 } |
|
Definition at line 575 of file inispin.cc. 00576 { 00577 SPINDLE_INCREASE_INDEX = index; 00578 00579 return 0; 00580 } |
|
Definition at line 624 of file inispin.cc. 00625 { 00626 SPINDLE_INCREASE_POLARITY = polarity; 00627 00628 return 0; 00629 } |
|
Definition at line 645 of file inispin.cc. 00646 { 00647 SPINDLE_OFF_WAIT = wait; 00648 00649 return 0; 00650 } |
|
Definition at line 596 of file inispin.cc. 00597 { 00598 SPINDLE_ON_INDEX = index; 00599 00600 return 0; 00601 } |
|
Definition at line 652 of file inispin.cc. 00653 { 00654 SPINDLE_ON_WAIT = wait; 00655 00656 return 0; 00657 } |
|
Definition at line 561 of file inispin.cc. 00562 { 00563 SPINDLE_REVERSE_INDEX = index; 00564 00565 return 0; 00566 } |
|
Definition at line 610 of file inispin.cc. 00611 { 00612 SPINDLE_REVERSE_POLARITY = polarity; 00613 00614 return 0; 00615 } |
|
|
|
|
|
Definition at line 74 of file emctask.cc. Referenced by emcTaskExecute(), emcTaskIssueCommand(), and main().
00075 { 00076 emcMotionAbort(); 00077 emcIoAbort(); 00078 00079 return 0; 00080 } |
|
Definition at line 69 of file emctask.cc. Referenced by emctask_shutdown().
00070 { 00071 return 0; 00072 } |
|
Referenced by emcTaskIssueCommand(), and emctask_startup().
|
|
Definition at line 313 of file emctask.cc. Referenced by emcTaskPlan().
00314 { 00315 waitFlag = 0; 00316 00317 return 0; 00318 } |
|
Definition at line 395 of file emctask.cc. Referenced by emcTaskExecute(), emcTaskIssueCommand(), emcTaskPlan(), and main().
00396 { 00397 int retval = rs274ngc_close(); 00398 #ifdef NEW_INTERPRETER 00399 if(retval > RS274NGC_MIN_ERROR) 00400 { 00401 print_rs274ngc_error(retval); 00402 } 00403 #endif 00404 00405 taskplanopen=0; 00406 return retval; 00407 } |
|
Definition at line 414 of file emctask.cc. 00415 { 00416 strcpy(cmd, rs274ngc_command()); 00417 return 0; 00418 } |
|
Definition at line 376 of file emctask.cc. 00377 { 00378 if(command != 0) 00379 { 00380 if(*command != 0) 00381 { 00382 rs274ngc_synch(); 00383 } 00384 } 00385 int retval = rs274ngc_execute(command); 00386 #ifdef NEW_INTERPRETER 00387 if(retval > RS274NGC_MIN_ERROR) 00388 { 00389 print_rs274ngc_error(retval); 00390 } 00391 #endif 00392 return retval; 00393 } |
|
Definition at line 325 of file emctask.cc. Referenced by emctask_shutdown().
00326 { 00327 return rs274ngc_exit(); 00328 } |
|
Definition at line 270 of file emctask.cc. Referenced by emcTaskIssueCommand(), and emctask_startup().
00271 { 00272 rs274ngc_ini_load(EMC_INIFILE); 00273 waitFlag = 0; 00274 00275 int retval = rs274ngc_init(); 00276 #ifdef NEW_INTERPRETER 00277 if(retval > RS274NGC_MIN_ERROR) 00278 { 00279 print_rs274ngc_error(retval); 00280 } 00281 else 00282 { 00283 if( 0 != RS274NGC_STARTUP_CODE[0]) 00284 { 00285 retval = rs274ngc_execute(RS274NGC_STARTUP_CODE); 00286 if(retval > RS274NGC_MIN_ERROR) 00287 { 00288 print_rs274ngc_error(retval); 00289 } 00290 } 00291 } 00292 #else 00293 if( 0 != RS274NGC_STARTUP_CODE[0]) 00294 { 00295 rs274ngc_execute(RS274NGC_STARTUP_CODE); 00296 } 00297 #endif 00298 return retval; 00299 } |
|
Definition at line 308 of file emctask.cc. Referenced by emcTaskPlan().
00309 { 00310 return waitFlag; 00311 } |
|
Definition at line 409 of file emctask.cc. Referenced by emcTaskPlan().
00410 { 00411 return rs274ngc_line(); 00412 } |
|
Definition at line 330 of file emctask.cc. 00331 { 00332 if(emcStatus != 0) 00333 { 00334 emcStatus->task.motionLine = 0; 00335 emcStatus->task.currentLine = 0; 00336 emcStatus->task.readLine = 0; 00337 } 00338 00339 int retval = rs274ngc_open(file); 00340 #ifdef NEW_INTERPRETER 00341 if(retval > RS274NGC_MIN_ERROR) 00342 { 00343 print_rs274ngc_error(retval); 00344 return retval; 00345 } 00346 #endif 00347 taskplanopen=1; 00348 return retval; 00349 } |
|
|
|
Definition at line 352 of file emctask.cc. Referenced by emcTaskPlan().
00353 { 00354 int retval = rs274ngc_read(); 00355 #ifdef NEW_INTERPRETER 00356 if(retval == NCE_FILE_NOT_OPEN) 00357 { 00358 if(emcStatus->task.file[0] != 0) 00359 { 00360 retval = rs274ngc_open(emcStatus->task.file); 00361 if(retval > RS274NGC_MIN_ERROR) 00362 { 00363 print_rs274ngc_error(retval); 00364 } 00365 retval = rs274ngc_read(); 00366 } 00367 } 00368 if(retval > RS274NGC_MIN_ERROR) 00369 { 00370 print_rs274ngc_error(retval); 00371 } 00372 #endif 00373 return retval; 00374 } |
|
|
|
|
|
Definition at line 301 of file emctask.cc. Referenced by emcTaskIssueCommand(), and emcTaskPlan().
00302 { 00303 waitFlag = 1; 00304 00305 return 0; 00306 } |
|
Definition at line 320 of file emctask.cc. Referenced by emcTaskIssueCommand(), and emcTaskSetMode().
00321 { 00322 return rs274ngc_synch(); 00323 } |
|
Definition at line 82 of file emctask.cc. 00083 { 00084 int retval = 0; 00085 00086 switch (mode) { 00087 case EMC_TASK_MODE_MANUAL: 00088 // go to manual mode 00089 emcTrajSetMode(EMC_TRAJ_MODE_FREE); 00090 mdiOrAuto = EMC_TASK_MODE_AUTO; // we'll default back to here 00091 break; 00092 00093 case EMC_TASK_MODE_MDI: 00094 // go to mdi mode 00095 emcTrajSetMode(EMC_TRAJ_MODE_COORD); 00096 emcTaskPlanSynch(); 00097 mdiOrAuto = EMC_TASK_MODE_MDI; 00098 break; 00099 00100 case EMC_TASK_MODE_AUTO: 00101 // go to auto mode 00102 emcTrajSetMode(EMC_TRAJ_MODE_COORD); 00103 emcTaskPlanSynch(); 00104 mdiOrAuto = EMC_TASK_MODE_AUTO; 00105 break; 00106 00107 default: 00108 retval = -1; 00109 break; 00110 } 00111 00112 return retval; 00113 } |
|
Definition at line 115 of file emctask.cc. 00116 { 00117 int t; 00118 int retval = 0; 00119 00120 switch (state) { 00121 case EMC_TASK_STATE_OFF: 00122 // turn the machine servos off-- go into ESTOP_RESET state 00123 for (t = 0; t < emcStatus->motion.traj.axes; t++) { 00124 emcAxisDisable(t); 00125 } 00126 emcTrajDisable(); 00127 emcLubeOff(); 00128 break; 00129 00130 case EMC_TASK_STATE_ON: 00131 // turn the machine servos on 00132 emcTrajEnable(); 00133 for (t = 0; t < emcStatus->motion.traj.axes; t++) { 00134 emcAxisEnable(t); 00135 } 00136 emcLubeOn(); 00137 break; 00138 00139 case EMC_TASK_STATE_ESTOP_RESET: 00140 // reset the estop 00141 if(emcStatus->io.aux.estopIn) 00142 { 00143 rcs_print("Can't come out of estop while the estop button is in."); 00144 } 00145 emcAuxEstopOff(); 00146 emcLubeOff(); 00147 break; 00148 00149 case EMC_TASK_STATE_ESTOP: 00150 // go into estop-- do both IO estop and machine servos off 00151 emcAuxEstopOn(); 00152 for (t = 0; t < emcStatus->motion.traj.axes; t++) { 00153 emcAxisDisable(t); 00154 } 00155 emcTrajDisable(); 00156 emcLubeOff(); 00157 break; 00158 00159 default: 00160 retval = -1; 00161 break; 00162 } 00163 00164 return retval; 00165 } |
|
Definition at line 420 of file emctask.cc. 00421 { 00422 stat->mode = determineMode(); 00423 stat->state = determineState(); 00424 00425 // execState set in main 00426 // interpState set in main 00427 if(emcStatus->motion.traj.id > 0) 00428 { 00429 stat->motionLine = emcStatus->motion.traj.id; 00430 } 00431 // currentLine set in main 00432 // readLine set in main 00433 00434 strcpy(stat->file, rs274ngc_file()); 00435 // command set in main 00436 00437 // update active G and M codes 00438 rs274ngc_active_g_codes(&stat->activeGCodes[0]); 00439 rs274ngc_active_m_codes(&stat->activeMCodes[0]); 00440 rs274ngc_active_settings(&stat->activeSettings[0]); 00441 00442 stat->heartbeat++; 00443 00444 return 0; 00445 } |
|
|
|
|
|
|
|
Definition at line 2115 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
02116 { 02117 EMC_TOOL_LOAD toolLoadMsg; 02118 02119 sendCommand(&toolLoadMsg); 02120 02121 return 0; 02122 } |
|
Definition at line 2133 of file bridgeporttaskintf.cc. 02134 { 02135 EMC_TOOL_LOAD_TOOL_TABLE toolLoadToolTableMsg; 02136 02137 strcpy(toolLoadToolTableMsg.file, file); 02138 02139 sendCommand(&toolLoadToolTableMsg); 02140 02141 return 0; 02142 } |
|
Definition at line 2105 of file bridgeporttaskintf.cc. 02106 { 02107 EMC_TOOL_PREPARE toolPrepareMsg; 02108 02109 toolPrepareMsg.tool = tool; 02110 sendCommand(&toolPrepareMsg); 02111 02112 return 0; 02113 } |
|
Definition at line 2144 of file bridgeporttaskintf.cc. 02145 { 02146 EMC_TOOL_SET_OFFSET toolSetOffsetMsg; 02147 02148 toolSetOffsetMsg.tool = tool; 02149 toolSetOffsetMsg.length = length; 02150 toolSetOffsetMsg.diameter = diameter; 02151 02152 sendCommand(&toolSetOffsetMsg); 02153 02154 return 0; 02155 } |
|
Definition at line 89 of file initool.cc. 00090 { 00091 strcpy(TOOL_TABLE_FILE, filename); 00092 00093 return 0; 00094 } |
|
Definition at line 2124 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
02125 { 02126 EMC_TOOL_UNLOAD toolUnloadMsg; 02127 02128 sendCommand(&toolUnloadMsg); 02129 02130 return 0; 02131 } |
|
|
|
Definition at line 1242 of file bridgeporttaskintf.cc. Referenced by emcMotionAbort(), and emcTaskIssueCommand().
01243 { 01244 emcmotCommand.command = EMCMOT_ABORT; 01245 01246 return usrmotWriteEmcmotCommand(&emcmotCommand); 01247 } |
|
Definition at line 1306 of file bridgeporttaskintf.cc. 01308 { 01309 emcmotCommand.command = EMCMOT_SET_CIRCLE; 01310 01311 emcmotCommand.pos = end; 01312 01313 emcmotCommand.center.x = center.x; 01314 emcmotCommand.center.y = center.y; 01315 emcmotCommand.center.z = center.z; 01316 01317 emcmotCommand.normal.x = normal.x; 01318 emcmotCommand.normal.y = normal.y; 01319 emcmotCommand.normal.z = normal.z; 01320 01321 emcmotCommand.turn = turn; 01322 emcmotCommand.id = localEmcTrajMotionId; 01323 01324 #ifdef ISNAN_TRAP 01325 if (isnan(emcmotCommand.pos.tran.x) || 01326 isnan(emcmotCommand.pos.tran.y) || 01327 isnan(emcmotCommand.pos.tran.z) || 01328 isnan(emcmotCommand.pos.a) || 01329 isnan(emcmotCommand.pos.b) || 01330 isnan(emcmotCommand.pos.c) || 01331 isnan(emcmotCommand.center.x) || 01332 isnan(emcmotCommand.center.y) || 01333 isnan(emcmotCommand.center.z) || 01334 isnan(emcmotCommand.normal.x) || 01335 isnan(emcmotCommand.normal.y) || 01336 isnan(emcmotCommand.normal.z)) 01337 { 01338 printf("isnan error in emcTrajCircularMove\n"); 01339 return 0; // ignore it for now, just don't send it 01340 } 01341 #endif 01342 01343 return usrmotWriteEmcmotCommand(&emcmotCommand); 01344 } |
|
Definition at line 1362 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
01363 { 01364 emcmotCommand.command = EMCMOT_CLEAR_PROBE_FLAGS; 01365 01366 return usrmotWriteEmcmotCommand(&emcmotCommand); 01367 } |
|
Definition at line 1270 of file bridgeporttaskintf.cc. 01271 { 01272 // nothing need be done here-- it's done in task controller 01273 01274 return 0; 01275 } |
|
Definition at line 1235 of file bridgeporttaskintf.cc. Referenced by emcTaskSetState(), and main().
01236 { 01237 emcmotCommand.command = EMCMOT_DISABLE; 01238 01239 return usrmotWriteEmcmotCommand(&emcmotCommand); 01240 } |
|
Definition at line 1228 of file bridgeporttaskintf.cc. Referenced by emcTaskSetState().
01229 { 01230 emcmotCommand.command = EMCMOT_ENABLE; 01231 01232 return usrmotWriteEmcmotCommand(&emcmotCommand); 01233 } |
|
Definition at line 1217 of file bridgeporttaskintf.cc. Referenced by emcMotionHalt().
01218 { 01219 if (! emcmotAxisInited) // axis clears its inited flag on exit 01220 { 01221 usrmotExit(); // ours is final exit 01222 } 01223 emcmotTrajInited = 0; 01224 01225 return 0; 01226 } |
|
Definition at line 1191 of file bridgeporttaskintf.cc. Referenced by emcMotionInit().
01192 { 01193 int retval = 0; 01194 01195 // init emcmot interface 01196 if (! emcmotAxisInited && 01197 ! emcmotTrajInited) 01198 { 01199 usrmotIniLoad(EMC_INIFILE); 01200 01201 if (0 != usrmotInit()) 01202 { 01203 return -1; 01204 } 01205 } 01206 emcmotTrajInited = 1; 01207 01208 // initialize parameters from ini file 01209 if (0 != iniTraj(EMC_INIFILE)) 01210 { 01211 retval = -1; 01212 } 01213 01214 return retval; 01215 } |
|
Definition at line 1285 of file bridgeporttaskintf.cc. 01286 { 01287 emcmotCommand.command = EMCMOT_SET_LINE; 01288 01289 emcmotCommand.pos = end; 01290 01291 emcmotCommand.id = localEmcTrajMotionId; 01292 01293 #ifdef ISNAN_TRAP 01294 if (isnan(emcmotCommand.pos.tran.x) || 01295 isnan(emcmotCommand.pos.tran.y) || 01296 isnan(emcmotCommand.pos.tran.z)) 01297 { 01298 printf("isnan error in emcTrajLinearMove\n"); 01299 return 0; // ignore it for now, just don't send it 01300 } 01301 #endif 01302 01303 return usrmotWriteEmcmotCommand(&emcmotCommand); 01304 } |
|
Definition at line 1249 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand().
01250 { 01251 emcmotCommand.command = EMCMOT_PAUSE; 01252 01253 return usrmotWriteEmcmotCommand(&emcmotCommand); 01254 } |
|
Definition at line 1369 of file bridgeporttaskintf.cc. 01370 { 01371 emcmotCommand.command = EMCMOT_PROBE; 01372 emcmotCommand.pos.tran.x = pos.tran.x; 01373 emcmotCommand.pos.tran.y = pos.tran.y; 01374 emcmotCommand.pos.tran.z = pos.tran.z; 01375 emcmotCommand.id = localEmcTrajMotionId; 01376 return usrmotWriteEmcmotCommand(&emcmotCommand); 01377 } |
|
Definition at line 1263 of file bridgeporttaskintf.cc. Referenced by emcTaskIssueCommand(), and emcTaskPlan().
01264 { 01265 emcmotCommand.command = EMCMOT_RESUME; 01266 01267 return usrmotWriteEmcmotCommand(&emcmotCommand); 01268 } |
|
Definition at line 1095 of file bridgeporttaskintf.cc. 01096 { 01097 if (acc < 0.0) 01098 { 01099 acc = 0.0; 01100 } 01101 else if (acc > localEmcMaxAcceleration) 01102 { 01103 acc = localEmcMaxAcceleration; 01104 } 01105 01106 emcmotCommand.command = EMCMOT_SET_ACC; 01107 emcmotCommand.acc = acc; 01108 01109 return usrmotWriteEmcmotCommand(&emcmotCommand); 01110 } |
|
Definition at line 991 of file bridgeporttaskintf.cc. 00992 { 00993 if (axes <= 0 || axes > EMCMOT_MAX_AXIS) 00994 { 00995 return -1; 00996 } 00997 00998 localEmcTrajAxes = axes; 00999 01000 return 0; 01001 } |
|
Definition at line 1017 of file bridgeporttaskintf.cc. 01018 { 01019 if (cycleTime <= 0.0) 01020 { 01021 return -1; 01022 } 01023 01024 emcmotCommand.command = EMCMOT_SET_TRAJ_CYCLE_TIME; 01025 emcmotCommand.cycleTime = cycleTime; 01026 01027 return usrmotWriteEmcmotCommand(&emcmotCommand); 01028 } |
|
Definition at line 1143 of file bridgeporttaskintf.cc. 01144 { 01145 emcmotCommand.command = EMCMOT_SET_WORLD_HOME; 01146 01147 emcmotCommand.pos = home; 01148 01149 01150 #ifdef ISNAN_TRAP 01151 if (isnan(emcmotCommand.pos.tran.x) || 01152 isnan(emcmotCommand.pos.tran.y) || 01153 isnan(emcmotCommand.pos.tran.z)) 01154 { 01155 printf("isnan error in emcTrajSetHome\n"); 01156 return 0; // ignore it for now, just don't send it 01157 } 01158 #endif 01159 01160 return usrmotWriteEmcmotCommand(&emcmotCommand); 01161 } |
|
Definition at line 1131 of file bridgeporttaskintf.cc. 01132 { 01133 if (acc < 0.0) 01134 { 01135 acc = 0.0; 01136 } 01137 01138 localEmcMaxAcceleration = acc; 01139 01140 return 0; 01141 } |
|
Definition at line 1116 of file bridgeporttaskintf.cc. 01117 { 01118 if (vel < 0.0) 01119 { 01120 vel = 0.0; 01121 } 01122 01123 TRAJ_MAX_VELOCITY = vel; 01124 01125 emcmotCommand.command = EMCMOT_SET_VEL_LIMIT; 01126 emcmotCommand.vel = vel; 01127 01128 return usrmotWriteEmcmotCommand(&emcmotCommand); 01129 } |
|
Definition at line 1030 of file bridgeporttaskintf.cc. 01031 { 01032 switch (mode) 01033 { 01034 case EMC_TRAJ_MODE_FREE: 01035 emcmotCommand.command = EMCMOT_FREE; 01036 return usrmotWriteEmcmotCommand(&emcmotCommand); 01037 01038 case EMC_TRAJ_MODE_COORD: 01039 emcmotCommand.command = EMCMOT_COORD; 01040 return usrmotWriteEmcmotCommand(&emcmotCommand); 01041 01042 case EMC_TRAJ_MODE_TELEOP: 01043 emcmotCommand.command = EMCMOT_TELEOP; 01044 return usrmotWriteEmcmotCommand(&emcmotCommand); 01045 01046 default: 01047 return -1; 01048 } 01049 } |
|
Definition at line 1176 of file bridgeporttaskintf.cc. 01177 { 01178 01179 if(EMC_DEBUG_MOTION_TIME & EMC_DEBUG) 01180 { 01181 if(id != localEmcTrajMotionId) 01182 { 01183 rcs_print("Outgoing motion id is %d.\n",id); 01184 } 01185 } 01186 localEmcTrajMotionId = id; 01187 01188 return 0; 01189 } |
|
|
|
|
|
Definition at line 1346 of file bridgeporttaskintf.cc. 01347 { 01348 emcmotCommand.command = EMCMOT_SET_PROBE_INDEX; 01349 emcmotCommand.probeIndex = index; 01350 01351 return usrmotWriteEmcmotCommand(&emcmotCommand); 01352 } |
|
Definition at line 1354 of file bridgeporttaskintf.cc. 01355 { 01356 emcmotCommand.command = EMCMOT_SET_PROBE_POLARITY; 01357 emcmotCommand.level = polarity; 01358 01359 return usrmotWriteEmcmotCommand(&emcmotCommand); 01360 } |
|
Definition at line 1163 of file bridgeporttaskintf.cc. 01164 { 01165 if (scale < 0.0) 01166 { 01167 scale = 0.0; 01168 } 01169 01170 emcmotCommand.command = EMCMOT_SCALE; 01171 emcmotCommand.scale = scale; 01172 01173 return usrmotWriteEmcmotCommand(&emcmotCommand); 01174 } |
|
Definition at line 1053 of file bridgeporttaskintf.cc. 01054 { 01055 emcmotCommand.command = EMCMOT_SET_TELEOP_VECTOR; 01056 emcmotCommand.pos = vel; 01057 return usrmotWriteEmcmotCommand(&emcmotCommand); 01058 } |
|
Definition at line 1277 of file bridgeporttaskintf.cc. 01278 { 01279 emcmotCommand.command = EMCMOT_SET_TERM_COND; 01280 emcmotCommand.termCond = (cond == EMC_TRAJ_TERM_COND_STOP ? EMCMOT_TERM_COND_STOP : EMCMOT_TERM_COND_BLEND); 01281 01282 return usrmotWriteEmcmotCommand(&emcmotCommand); 01283 } |
|
Definition at line 1003 of file bridgeporttaskintf.cc. 01004 { 01005 if (linearUnits <= 0.0 || 01006 angularUnits <= 0.0) 01007 { 01008 return -1; 01009 } 01010 01011 localEmcTrajLinearUnits = linearUnits; 01012 localEmcTrajAngularUnits = angularUnits; 01013 01014 return 0; 01015 } |
|
Definition at line 1060 of file bridgeporttaskintf.cc. 01061 { 01062 int retval; 01063 01064 if (vel < 0.0) 01065 { 01066 vel = 0.0; 01067 } 01068 else if (vel > TRAJ_MAX_VELOCITY) 01069 { 01070 vel = TRAJ_MAX_VELOCITY; 01071 } 01072 01073 #if 0 01074 // FIXME-- this fixes rapid rate reset problem 01075 if (vel == lastVel) 01076 { 01077 // suppress it 01078 return 0; 01079 } 01080 #endif 01081 01082 emcmotCommand.command = EMCMOT_SET_VEL; 01083 emcmotCommand.vel = vel; 01084 01085 retval = usrmotWriteEmcmotCommand(&emcmotCommand); 01086 01087 if (0 == retval) 01088 { 01089 lastVel = vel; 01090 } 01091 01092 return retval; 01093 } |
|
Definition at line 1256 of file bridgeporttaskintf.cc. Referenced by emcTaskPlan().
01257 { 01258 emcmotCommand.command = EMCMOT_STEP; 01259 01260 return usrmotWriteEmcmotCommand(&emcmotCommand); 01261 } |
|
Definition at line 1384 of file bridgeporttaskintf.cc. 01385 { 01386 int axis; 01387 01388 stat->axes = localEmcTrajAxes; 01389 stat->linearUnits = localEmcTrajLinearUnits; 01390 stat->angularUnits = localEmcTrajAngularUnits; 01391 01392 stat->mode = 01393 emcmotStatus.motionFlag & EMCMOT_MOTION_TELEOP_BIT ? EMC_TRAJ_MODE_TELEOP : 01394 ( emcmotStatus.motionFlag & EMCMOT_MOTION_COORD_BIT ? EMC_TRAJ_MODE_COORD : 01395 EMC_TRAJ_MODE_FREE ) ; 01396 01397 // enabled iff motion enabled and all axes enabled 01398 stat->enabled = 0; // start at disabled 01399 if (emcmotStatus.motionFlag & EMCMOT_MOTION_ENABLE_BIT) { 01400 for (axis = 0; axis < localEmcTrajAxes; axis++) { 01401 if (! emcmotStatus.axisFlag[axis] & EMCMOT_AXIS_ENABLE_BIT) { 01402 break; 01403 } 01404 01405 // got here, then all are enabled 01406 stat->enabled = 1; 01407 } 01408 } 01409 01410 stat->inpos = emcmotStatus.motionFlag & EMCMOT_MOTION_INPOS_BIT ? 1 : 0; 01411 stat->queue = emcmotStatus.depth; 01412 stat->activeQueue = emcmotStatus.activeDepth; 01413 stat->queueFull = emcmotStatus.queueFull; 01414 stat->id = emcmotStatus.id; 01415 if (EMC_DEBUG_MOTION_TIME & EMC_DEBUG) { 01416 if (stat->id != last_id) { 01417 if (last_id != last_id_printed) { 01418 rcs_print("Motion id %d took %f seconds.\n",last_id, etime()-last_id_time); 01419 last_id_printed = last_id; 01420 } 01421 last_id = stat->id; 01422 last_id_time = etime(); 01423 } 01424 } 01425 01426 stat->paused = emcmotStatus.paused; 01427 stat->scale = emcmotStatus.qVscale; 01428 01429 stat->position = emcmotStatus.pos; 01430 01431 stat->actualPosition = emcmotStatus.actualPos; 01432 01433 stat->velocity = emcmotStatus.vel; 01434 stat->acceleration = emcmotStatus.acc; 01435 stat->maxAcceleration = localEmcMaxAcceleration; 01436 01437 if (emcmotStatus.motionFlag & EMCMOT_MOTION_ERROR_BIT) { 01438 stat->status = RCS_ERROR; 01439 } 01440 else if (stat->inpos && 01441 (stat->queue == 0)) { 01442 stat->status = RCS_DONE; 01443 } 01444 else { 01445 stat->status = RCS_EXEC; 01446 } 01447 01448 if (EMC_DEBUG_MOTION_TIME & EMC_DEBUG) { 01449 if(stat->status == RCS_DONE && last_status != RCS_DONE && stat->id != last_id_printed) { 01450 rcs_print("Motion id %d took %f seconds.\n",last_id, etime()-last_id_time); 01451 last_id_printed = last_id = stat->id; 01452 last_id_time = etime(); 01453 } 01454 } 01455 01456 // update logging 01457 if (emcmotStatus.logOpen) { 01458 // we're logging motion 01459 emcStatus->logType = emcmotStatus.logType; 01460 emcStatus->logSize = emcmotStatus.logSize; 01461 emcStatus->logSkip = emcmotStatus.logSkip; 01462 emcStatus->logOpen = emcmotStatus.logOpen; 01463 emcStatus->logStarted = emcmotStatus.logStarted; 01464 emcStatus->logPoints = emcmotStatus.logPoints; 01465 } 01466 // else if it's not open, don't update emcStatus-- someone else may 01467 // be logging 01468 01469 stat->probedPosition.tran.x = emcmotStatus.probedPos.tran.x; 01470 stat->probedPosition.tran.y = emcmotStatus.probedPos.tran.y; 01471 stat->probedPosition.tran.z = emcmotStatus.probedPos.tran.z; 01472 stat->probeval = emcmotStatus.probeval; 01473 stat->probe_tripped = emcmotStatus.probeTripped; 01474 01475 if (new_config) { 01476 stat->cycleTime = emcmotConfig.trajCycleTime; 01477 stat->probe_index = emcmotConfig.probeIndex; 01478 stat->probe_polarity = emcmotConfig.probePolarity; 01479 stat->kinematics_type = emcmotConfig.kinematics_type; 01480 stat->maxVelocity = emcmotConfig.limitVel; 01481 } 01482 01483 return 0; 01484 } |
|
|
|
Definition at line 505 of file emc.cc. Referenced by emcTaskPlan().
00506 { 00507 switch(type) 00508 { 00509 case EMC_ABORT_TYPE: 00510 return "EMC_ABORT"; 00511 case EMC_AUX_ABORT_TYPE: 00512 return "EMC_AUX_ABORT"; 00513 case EMC_AUX_AIO_WRITE_TYPE: 00514 return "EMC_AUX_AIO_WRITE"; 00515 case EMC_AUX_DIO_WRITE_TYPE: 00516 return "EMC_AUX_DIO_WRITE"; 00517 case EMC_AUX_ESTOP_OFF_TYPE: 00518 return "EMC_AUX_ESTOP_OFF"; 00519 case EMC_AUX_ESTOP_ON_TYPE: 00520 return "EMC_AUX_ESTOP_ON"; 00521 case EMC_AUX_HALT_TYPE: 00522 return "EMC_AUX_HALT"; 00523 case EMC_AUX_INIT_TYPE: 00524 return "EMC_AUX_INIT"; 00525 case EMC_AUX_STAT_TYPE: 00526 return "EMC_AUX_STAT"; 00527 case EMC_AXIS_ABORT_TYPE: 00528 return "EMC_AXIS_ABORT"; 00529 case EMC_AXIS_ABS_JOG_TYPE: 00530 return "EMC_AXIS_ABS_JOG"; 00531 case EMC_AXIS_ACTIVATE_TYPE: 00532 return "EMC_AXIS_ACTIVATE"; 00533 case EMC_AXIS_ALTER_TYPE: 00534 return "EMC_AXIS_ALTER"; 00535 case EMC_AXIS_DEACTIVATE_TYPE: 00536 return "EMC_AXIS_DEACTIVATE"; 00537 case EMC_AXIS_DISABLE_TYPE: 00538 return "EMC_AXIS_DISABLE"; 00539 case EMC_AXIS_ENABLE_TYPE: 00540 return "EMC_AXIS_ENABLE"; 00541 case EMC_AXIS_HALT_TYPE: 00542 return "EMC_AXIS_HALT"; 00543 case EMC_AXIS_HOME_TYPE: 00544 return "EMC_AXIS_HOME"; 00545 case EMC_AXIS_INCR_JOG_TYPE: 00546 return "EMC_AXIS_INCR_JOG"; 00547 case EMC_AXIS_INIT_TYPE: 00548 return "EMC_AXIS_INIT"; 00549 case EMC_AXIS_JOG_TYPE: 00550 return "EMC_AXIS_JOG"; 00551 case EMC_AXIS_LOAD_COMP_TYPE: 00552 return "EMC_AXIS_LOAD_COMP"; 00553 case EMC_AXIS_OVERRIDE_LIMITS_TYPE: 00554 return "EMC_AXIS_OVERRIDE_LIMITS"; 00555 case EMC_AXIS_SET_AXIS_TYPE: 00556 return "EMC_AXIS_SET_AXIS"; 00557 case EMC_AXIS_SET_CYCLE_TIME_TYPE: 00558 return "EMC_AXIS_SET_CYCLE_TIME"; 00559 case EMC_AXIS_SET_FERROR_TYPE: 00560 return "EMC_AXIS_SET_FERROR"; 00561 case EMC_AXIS_SET_GAINS_TYPE: 00562 return "EMC_AXIS_SET_GAINS"; 00563 case EMC_AXIS_SET_HOME_TYPE: 00564 return "EMC_AXIS_SET_HOME"; 00565 case EMC_AXIS_SET_HOME_OFFSET_TYPE: 00566 return "EMC_AXIS_SET_HOME_OFFSET"; 00567 case EMC_AXIS_SET_HOMING_VEL_TYPE: 00568 return "EMC_AXIS_SET_HOMING_VEL"; 00569 case EMC_AXIS_SET_INPUT_SCALE_TYPE: 00570 return "EMC_AXIS_SET_INPUT_SCALE"; 00571 case EMC_AXIS_SET_MAX_OUTPUT_LIMIT_TYPE: 00572 return "EMC_AXIS_SET_MAX_OUTPUT_LIMIT"; 00573 case EMC_AXIS_SET_MAX_POSITION_LIMIT_TYPE: 00574 return "EMC_AXIS_SET_MAX_POSITION_LIMIT"; 00575 case EMC_AXIS_SET_MAX_VELOCITY_TYPE: 00576 return "EMC_AXIS_SET_MAX_VELOCITY"; 00577 case EMC_AXIS_SET_MIN_FERROR_TYPE: 00578 return "EMC_AXIS_SET_MIN_FERROR"; 00579 case EMC_AXIS_SET_MIN_OUTPUT_LIMIT_TYPE: 00580 return "EMC_AXIS_SET_MIN_OUTPUT_LIMIT"; 00581 case EMC_AXIS_SET_MIN_POSITION_LIMIT_TYPE: 00582 return "EMC_AXIS_SET_MIN_POSITION_LIMIT"; 00583 case EMC_AXIS_SET_OUTPUT_TYPE: 00584 return "EMC_AXIS_SET_OUTPUT"; 00585 case EMC_AXIS_SET_OUTPUT_SCALE_TYPE: 00586 return "EMC_AXIS_SET_OUTPUT_SCALE"; 00587 case EMC_AXIS_SET_UNITS_TYPE: 00588 return "EMC_AXIS_SET_UNITS"; 00589 case EMC_AXIS_STAT_TYPE: 00590 return "EMC_AXIS_STAT"; 00591 case EMC_COOLANT_ABORT_TYPE: 00592 return "EMC_COOLANT_ABORT"; 00593 case EMC_COOLANT_FLOOD_OFF_TYPE: 00594 return "EMC_COOLANT_FLOOD_OFF"; 00595 case EMC_COOLANT_FLOOD_ON_TYPE: 00596 return "EMC_COOLANT_FLOOD_ON"; 00597 case EMC_COOLANT_HALT_TYPE: 00598 return "EMC_COOLANT_HALT"; 00599 case EMC_COOLANT_INIT_TYPE: 00600 return "EMC_COOLANT_INIT"; 00601 case EMC_COOLANT_MIST_OFF_TYPE: 00602 return "EMC_COOLANT_MIST_OFF"; 00603 case EMC_COOLANT_MIST_ON_TYPE: 00604 return "EMC_COOLANT_MIST_ON"; 00605 case EMC_COOLANT_STAT_TYPE: 00606 return "EMC_COOLANT_STAT"; 00607 case EMC_HALT_TYPE: 00608 return "EMC_HALT"; 00609 case EMC_INIT_TYPE: 00610 return "EMC_INIT"; 00611 case EMC_IO_ABORT_TYPE: 00612 return "EMC_IO_ABORT"; 00613 case EMC_IO_HALT_TYPE: 00614 return "EMC_IO_HALT"; 00615 case EMC_IO_INIT_TYPE: 00616 return "EMC_IO_INIT"; 00617 case EMC_IO_SET_CYCLE_TIME_TYPE: 00618 return "EMC_IO_SET_CYCLE_TIME"; 00619 case EMC_IO_STAT_TYPE: 00620 return "EMC_IO_STAT"; 00621 case EMC_LOG_CLOSE_TYPE: 00622 return "EMC_LOG_CLOSE"; 00623 case EMC_LOG_OPEN_TYPE: 00624 return "EMC_LOG_OPEN"; 00625 case EMC_LOG_START_TYPE: 00626 return "EMC_LOG_START"; 00627 case EMC_LOG_STOP_TYPE: 00628 return "EMC_LOG_STOP"; 00629 case EMC_LUBE_ABORT_TYPE: 00630 return "EMC_LUBE_ABORT"; 00631 case EMC_LUBE_HALT_TYPE: 00632 return "EMC_LUBE_HALT"; 00633 case EMC_LUBE_INIT_TYPE: 00634 return "EMC_LUBE_INIT"; 00635 case EMC_LUBE_OFF_TYPE: 00636 return "EMC_LUBE_OFF"; 00637 case EMC_LUBE_ON_TYPE: 00638 return "EMC_LUBE_ON"; 00639 case EMC_LUBE_STAT_TYPE: 00640 return "EMC_LUBE_STAT"; 00641 case EMC_MOTION_ABORT_TYPE: 00642 return "EMC_MOTION_ABORT"; 00643 case EMC_MOTION_HALT_TYPE: 00644 return "EMC_MOTION_HALT"; 00645 case EMC_MOTION_INIT_TYPE: 00646 return "EMC_MOTION_INIT"; 00647 case EMC_MOTION_SET_AOUT_TYPE: 00648 return "EMC_MOTION_SET_AOUT"; 00649 case EMC_MOTION_SET_DOUT_TYPE: 00650 return "EMC_MOTION_SET_DOUT"; 00651 case EMC_MOTION_STAT_TYPE: 00652 return "EMC_MOTION_STAT"; 00653 case EMC_NULL_TYPE: 00654 return "EMC_NULL"; 00655 case EMC_OPERATOR_DISPLAY_TYPE: 00656 return "EMC_OPERATOR_DISPLAY"; 00657 case EMC_OPERATOR_ERROR_TYPE: 00658 return "EMC_OPERATOR_ERROR"; 00659 case EMC_OPERATOR_TEXT_TYPE: 00660 return "EMC_OPERATOR_TEXT"; 00661 case EMC_SET_AIO_INDEX_TYPE: 00662 return "EMC_SET_AIO_INDEX"; 00663 case EMC_SET_DEBUG_TYPE: 00664 return "EMC_SET_DEBUG"; 00665 case EMC_SET_DIO_INDEX_TYPE: 00666 return "EMC_SET_DIO_INDEX"; 00667 case EMC_SET_POLARITY_TYPE: 00668 return "EMC_SET_POLARITY"; 00669 case EMC_SPINDLE_ABORT_TYPE: 00670 return "EMC_SPINDLE_ABORT"; 00671 case EMC_SPINDLE_BRAKE_ENGAGE_TYPE: 00672 return "EMC_SPINDLE_BRAKE_ENGAGE"; 00673 case EMC_SPINDLE_BRAKE_RELEASE_TYPE: 00674 return "EMC_SPINDLE_BRAKE_RELEASE"; 00675 case EMC_SPINDLE_CONSTANT_TYPE: 00676 return "EMC_SPINDLE_CONSTANT"; 00677 case EMC_SPINDLE_DECREASE_TYPE: 00678 return "EMC_SPINDLE_DECREASE"; 00679 case EMC_SPINDLE_DISABLE_TYPE: 00680 return "EMC_SPINDLE_DISABLE"; 00681 case EMC_SPINDLE_ENABLE_TYPE: 00682 return "EMC_SPINDLE_ENABLE"; 00683 case EMC_SPINDLE_FORWARD_TYPE: 00684 return "EMC_SPINDLE_FORWARD"; 00685 case EMC_SPINDLE_HALT_TYPE: 00686 return "EMC_SPINDLE_HALT"; 00687 case EMC_SPINDLE_INCREASE_TYPE: 00688 return "EMC_SPINDLE_INCREASE"; 00689 case EMC_SPINDLE_INIT_TYPE: 00690 return "EMC_SPINDLE_INIT"; 00691 case EMC_SPINDLE_OFF_TYPE: 00692 return "EMC_SPINDLE_OFF"; 00693 case EMC_SPINDLE_ON_TYPE: 00694 return "EMC_SPINDLE_ON"; 00695 case EMC_SPINDLE_REVERSE_TYPE: 00696 return "EMC_SPINDLE_REVERSE"; 00697 case EMC_SPINDLE_STAT_TYPE: 00698 return "EMC_SPINDLE_STAT"; 00699 case EMC_SPINDLE_STOP_TYPE: 00700 return "EMC_SPINDLE_STOP"; 00701 case EMC_STAT_TYPE: 00702 return "EMC_STAT"; 00703 case EMC_TASK_ABORT_TYPE: 00704 return "EMC_TASK_ABORT"; 00705 case EMC_TASK_HALT_TYPE: 00706 return "EMC_TASK_HALT"; 00707 case EMC_TASK_INIT_TYPE: 00708 return "EMC_TASK_INIT"; 00709 case EMC_TASK_PLAN_CLOSE_TYPE: 00710 return "EMC_TASK_PLAN_CLOSE"; 00711 case EMC_TASK_PLAN_END_TYPE: 00712 return "EMC_TASK_PLAN_END"; 00713 case EMC_TASK_PLAN_EXECUTE_TYPE: 00714 return "EMC_TASK_PLAN_EXECUTE"; 00715 case EMC_TASK_PLAN_INIT_TYPE: 00716 return "EMC_TASK_PLAN_INIT"; 00717 case EMC_TASK_PLAN_OPEN_TYPE: 00718 return "EMC_TASK_PLAN_OPEN"; 00719 case EMC_TASK_PLAN_PAUSE_TYPE: 00720 return "EMC_TASK_PLAN_PAUSE"; 00721 case EMC_TASK_PLAN_READ_TYPE: 00722 return "EMC_TASK_PLAN_READ"; 00723 case EMC_TASK_PLAN_RESUME_TYPE: 00724 return "EMC_TASK_PLAN_RESUME"; 00725 case EMC_TASK_PLAN_RUN_TYPE: 00726 return "EMC_TASK_PLAN_RUN"; 00727 case EMC_TASK_PLAN_STEP_TYPE: 00728 return "EMC_TASK_PLAN_STEP"; 00729 case EMC_TASK_PLAN_SYNCH_TYPE: 00730 return "EMC_TASK_PLAN_SYNCH"; 00731 case EMC_TASK_SET_MODE_TYPE: 00732 return "EMC_TASK_SET_MODE"; 00733 case EMC_TASK_SET_STATE_TYPE: 00734 return "EMC_TASK_SET_STATE"; 00735 case EMC_TASK_STAT_TYPE: 00736 return "EMC_TASK_STAT"; 00737 case EMC_TOOL_ABORT_TYPE: 00738 return "EMC_TOOL_ABORT"; 00739 case EMC_TOOL_HALT_TYPE: 00740 return "EMC_TOOL_HALT"; 00741 case EMC_TOOL_INIT_TYPE: 00742 return "EMC_TOOL_INIT"; 00743 case EMC_TOOL_LOAD_TYPE: 00744 return "EMC_TOOL_LOAD"; 00745 case EMC_TOOL_LOAD_TOOL_TABLE_TYPE: 00746 return "EMC_TOOL_LOAD_TOOL_TABLE"; 00747 case EMC_TOOL_PREPARE_TYPE: 00748 return "EMC_TOOL_PREPARE"; 00749 case EMC_TOOL_SET_OFFSET_TYPE: 00750 return "EMC_TOOL_SET_OFFSET"; 00751 case EMC_TOOL_STAT_TYPE: 00752 return "EMC_TOOL_STAT"; 00753 case EMC_TOOL_UNLOAD_TYPE: 00754 return "EMC_TOOL_UNLOAD"; 00755 case EMC_TRAJ_ABORT_TYPE: 00756 return "EMC_TRAJ_ABORT"; 00757 case EMC_TRAJ_CIRCULAR_MOVE_TYPE: 00758 return "EMC_TRAJ_CIRCULAR_MOVE"; 00759 case EMC_TRAJ_CLEAR_PROBE_TRIPPED_FLAG_TYPE: 00760 return "EMC_TRAJ_CLEAR_PROBE_TRIPPED_FLAG"; 00761 case EMC_TRAJ_DELAY_TYPE: 00762 return "EMC_TRAJ_DELAY"; 00763 case EMC_TRAJ_DISABLE_TYPE: 00764 return "EMC_TRAJ_DISABLE"; 00765 case EMC_TRAJ_ENABLE_TYPE: 00766 return "EMC_TRAJ_ENABLE"; 00767 case EMC_TRAJ_HALT_TYPE: 00768 return "EMC_TRAJ_HALT"; 00769 case EMC_TRAJ_INIT_TYPE: 00770 return "EMC_TRAJ_INIT"; 00771 case EMC_TRAJ_LINEAR_MOVE_TYPE: 00772 return "EMC_TRAJ_LINEAR_MOVE"; 00773 case EMC_TRAJ_PAUSE_TYPE: 00774 return "EMC_TRAJ_PAUSE"; 00775 case EMC_TRAJ_PROBE_TYPE: 00776 return "EMC_TRAJ_PROBE"; 00777 case EMC_TRAJ_RESUME_TYPE: 00778 return "EMC_TRAJ_RESUME"; 00779 case EMC_TRAJ_SET_ACCELERATION_TYPE: 00780 return "EMC_TRAJ_SET_ACCELERATION"; 00781 case EMC_TRAJ_SET_AXES_TYPE: 00782 return "EMC_TRAJ_SET_AXES"; 00783 case EMC_TRAJ_SET_CYCLE_TIME_TYPE: 00784 return "EMC_TRAJ_SET_CYCLE_TIME"; 00785 case EMC_TRAJ_SET_HOME_TYPE: 00786 return "EMC_TRAJ_SET_HOME"; 00787 case EMC_TRAJ_SET_MAX_ACCELERATION_TYPE: 00788 return "EMC_TRAJ_SET_MAX_ACCELERATION"; 00789 case EMC_TRAJ_SET_MAX_VELOCITY_TYPE: 00790 return "EMC_TRAJ_SET_MAX_VELOCITY"; 00791 case EMC_TRAJ_SET_MODE_TYPE: 00792 return "EMC_TRAJ_SET_MODE"; 00793 case EMC_TRAJ_SET_MOTION_ID_TYPE: 00794 return "EMC_TRAJ_SET_MOTION_ID"; 00795 case EMC_TRAJ_SET_OFFSET_TYPE: 00796 return "EMC_TRAJ_SET_OFFSET"; 00797 case EMC_TRAJ_SET_ORIGIN_TYPE: 00798 return "EMC_TRAJ_SET_ORIGIN"; 00799 case EMC_TRAJ_SET_PROBE_INDEX_TYPE: 00800 return "EMC_TRAJ_SET_PROBE_INDEX"; 00801 case EMC_TRAJ_SET_PROBE_POLARITY_TYPE: 00802 return "EMC_TRAJ_SET_PROBE_POLARITY"; 00803 case EMC_TRAJ_SET_SCALE_TYPE: 00804 return "EMC_TRAJ_SET_SCALE"; 00805 case EMC_TRAJ_SET_TELEOP_ENABLE_TYPE: 00806 return "EMC_TRAJ_SET_TELEOP_ENABLE"; 00807 case EMC_TRAJ_SET_TELEOP_VECTOR_TYPE: 00808 return "EMC_TRAJ_SET_TELEOP_VECTOR"; 00809 case EMC_TRAJ_SET_TERM_COND_TYPE: 00810 return "EMC_TRAJ_SET_TERM_COND"; 00811 case EMC_TRAJ_SET_UNITS_TYPE: 00812 return "EMC_TRAJ_SET_UNITS"; 00813 case EMC_TRAJ_SET_VELOCITY_TYPE: 00814 return "EMC_TRAJ_SET_VELOCITY"; 00815 case EMC_TRAJ_STAT_TYPE: 00816 return "EMC_TRAJ_STAT"; 00817 case EMC_TRAJ_STEP_TYPE: 00818 return "EMC_TRAJ_STEP"; 00819 default: 00820 return"UNKNOWN"; 00821 break; 00822 } 00823 return(NULL); 00824 } |
|
|
|
|
|
|
|
|
|
|