Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.

More
8 years 2 months ago #116032 by rodw
Andy, a very nice piece of code. You are better than me! I refuse to do anything in Visual Basic! :woohoo:

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #116034 by tecno
Result of last edit

File Attachment:

File Name: compile2.txt
File Size:933 B

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #116036 by rodw
Andy's left some typos so you can learn more about C coding :)
Change Line 47 to:
Code:
motor_speed_out = spindle_speed_in * gear_ratio(gear);

The error tells you exactly the problem
gearblocker.comp:47:23: error: ‘spindle_speed_’ undeclared (first use in this function)
spindle_speed_’ should be spindle_speed_in’

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago - 8 years 2 months ago #116038 by tecno
bengt@debian:~/linuxcnc$ halcompile --compile gearblocker.comp
make KBUILD_EXTRA_SYMBOLS=/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/Module.symvers -C /usr/src/linux-headers-3.4-9-rtai-686-pae SUBDIRS=`pwd` CC=gcc V=0 modules
make[1]: Entering directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
CC [M] /tmp/tmpnTwZlQ/gearblocker.o
gearblocker.comp: In function ‘_’:
gearblocker.comp:23:5: warning: unused variable ‘i’ [-Wunused-variable]
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/tmpnTwZlQ/gearblocker.mod.o
LD [M] /tmp/tmpnTwZlQ/gearblocker.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
bengt@debian:~/linuxcnc$

I got a .ko file now so I assume all is OK even with above warning?
Last edit: 8 years 2 months ago by tecno.

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #116040 by tecno
FUNCTION(_){
int i; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< delete this line ?

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #116043 by tecno
No warning after deleting that line.

Now to fiddle with HAL

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.486 seconds
Powered by Kunena Forum