I get the following error message when I try to "comp --install ./turret.comp":
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [EMAIL PROTECTED]:~/emc2$ comp --install ./turret.comp make -C /usr/src/linux-headers-2.6.15-magma SUBDIRS=`pwd` CC=gcc V=0 -o /Module.symvers modules make[1]: Entering directory `/usr/src/linux-headers-2.6.15-magma' CC [M] /tmp/tmpXsH6Jv/turret.o ./turret.comp:14: error: syntax error before ‘(’ token ./turret.comp:14: warning: type defaults to ‘int’ in declaration of ‘inst’ ./turret.comp:14: error: syntax error before ‘long’ ./turret.comp:20: error: syntax error before ‘->’ token ./turret.comp:26: error: syntax error before ‘->’ token ./turret.comp:33: error: syntax error before ‘->’ token ./turret.comp:34: error: syntax error before ‘->’ token ./turret.comp:41: error: syntax error before ‘->’ token ./turret.comp:42: error: syntax error before ‘->’ token ./turret.comp:49: error: syntax error before ‘->’ token make[2]: *** [/tmp/tmpXsH6Jv/turret.o] Error 1 make[1]: *** [_module_/tmp/tmpXsH6Jv] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.15-magma' make: *** [modules] Error 2 [EMAIL PROTECTED]:~/emc2$ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Below is turret.comp: There are no line wrapping in the actual file. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ component turret "This component controls the turret hardware for Kirk Wallace's Hardinge HNC turret. It moves the turret to the last T word value entered. (Invoked by M6)"; pin in bit tool_change "A .hal file should connect this to iocontrol.X.tool-change."; pin in bit match "A .hal file should connect this to s32equal.X.out which should be the result of a check for a match between the requested and current tool."; pin out bit tool_changed "A .hal file should connect this to iocontrol.X.tool-changed to indicate to EMC when the position change is complete."; pin out bit seek "Connect this pin via .hal file to the turret rotate solenoid signal."; pin out bit stop "Connect this pin via .hal file to the turret stop solenoid signal."; param rw s32 state "This parameter holds the value of the current state of the turret change process; idle, seeking, stopping, parking."; param rw s32 settle "This parameter holds the initial value and then the count down of servo periods to allow settling of the turret mechanism before invoking next state proceedure."; param r s32 stop_settle "This is the initial settle time in servo periods between activating the stop solenoid and when the turret comes to rest."; param r s32 park_settle "This is the initial settle time in servo periods between deactivating the turret rotate solenoid and when the turret descends to the park position."; function _ nofp; ;; MODULE_LICENSE("GPL"); FUNCTION(_) { if (tool_change) { if (!match) { switch (state) { case 1: seek=1; state=2; break; case 2: if (match) { stop=1 settle=stop_settle; state=3; } break; case 3: --settle; if (settle<=0) { seek=0; settle=park_settle; state=4; } break; case 4: --settle; if (settle<=0) { stop=0; state=1; tool_changed=1; } break; default: } } } state=1; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The syntax errors show characters that are not in the turret file so maybe I have the wrong header files? Any comments on what to look for to correct the errors and also to improve the programming style or anything else, would be appreciated. Kirk Wallace ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users