Tool Changer
07 Apr 2011 13:23 #8675
by Robin
Replied by Robin on topic Re:Tool Changer
i did the essential,
it already was installed
so i still have no clue on fixing it
kind regards Robin
it already was installed
so i still have no clue on fixing it
kind regards Robin
Please Log in or Create an account to join the conversation.
07 Apr 2011 13:35 - 07 Apr 2011 13:36 #8677
by BigJohnT
Replied by BigJohnT on topic Re:Tool Changer
I think you need to check your spelling and the file name, I just copied the comp from page 1 to another computer in my home directory and named it as required toolchanger.comp and ran sudo comp --install toolchanger.comp with no issues. Then I added loadrt toolchanger and addf toolchanger.0 servo-thread to a config and verified that it is there.
John
John
Last edit: 07 Apr 2011 13:36 by BigJohnT.
Please Log in or Create an account to join the conversation.
29 Apr 2011 14:37 - 29 Apr 2011 15:03 #9508
by ArcEye
Replied by ArcEye on topic Re:Tool Changer
Hi John / Andy
The fact that this compiles OK on your systems is bugging the hell out of me, because if I try either under the default emc 2.4.6 system or from my run in place emc 2.6pre from git, I get the errors below.
Given the code is only 75 lines long, the error occurs on line 77 and it does not contain a get_data_size() function, I have to assume that this is one of the routines added by comp (error checking?)
Any ideas? I don't want to write user space components in python, but that is the only thing that seems to work.
In the mean while I will settle down to read through comp ( python file to generate a C file!) and try to work out where the added function etc are sourced from
regards
OUTPUT
make -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=`pwd` CC=gcc V=0 -o /Module.symvers modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-122-rtai'
CC [M] /tmp/tmpnxxUZY/toolchanger.o
toolchanger.comp: In function ‘_’:
toolchanger.comp:77: error: invalid storage class for function ‘get_data_size’
toolchanger.comp:77: warning: ISO C90 forbids mixed declarations and code
toolchanger.comp:77: error: expected declaration or statement at end of input
make[2]: *** [/tmp/tmpnxxUZY/toolchanger.o] Error 1
make[1]: *** [_module_/tmp/tmpnxxUZY] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-122-rtai'
make: *** [modules] Error 2
PS -
As a test I have just looked for the most non-trival looking .comp file in the source tree and compiled it using comp.
I chose bldc.comp (appears also written by Andy) and it compiled and linked OK and the module was copied across to the modules directory.
Given that I had compiled the 2.6pre system from source in the first place I knew there was nothing on my system preventing it, but really does make my inability to compile the toolchanger.comp file whilst others apparently can, very strange.
The fact that this compiles OK on your systems is bugging the hell out of me, because if I try either under the default emc 2.4.6 system or from my run in place emc 2.6pre from git, I get the errors below.
Given the code is only 75 lines long, the error occurs on line 77 and it does not contain a get_data_size() function, I have to assume that this is one of the routines added by comp (error checking?)
Any ideas? I don't want to write user space components in python, but that is the only thing that seems to work.
In the mean while I will settle down to read through comp ( python file to generate a C file!) and try to work out where the added function etc are sourced from
regards
OUTPUT
make -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=`pwd` CC=gcc V=0 -o /Module.symvers modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-122-rtai'
CC [M] /tmp/tmpnxxUZY/toolchanger.o
toolchanger.comp: In function ‘_’:
toolchanger.comp:77: error: invalid storage class for function ‘get_data_size’
toolchanger.comp:77: warning: ISO C90 forbids mixed declarations and code
toolchanger.comp:77: error: expected declaration or statement at end of input
make[2]: *** [/tmp/tmpnxxUZY/toolchanger.o] Error 1
make[1]: *** [_module_/tmp/tmpnxxUZY] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-122-rtai'
make: *** [modules] Error 2
PS -
As a test I have just looked for the most non-trival looking .comp file in the source tree and compiled it using comp.
I chose bldc.comp (appears also written by Andy) and it compiled and linked OK and the module was copied across to the modules directory.
Given that I had compiled the 2.6pre system from source in the first place I knew there was nothing on my system preventing it, but really does make my inability to compile the toolchanger.comp file whilst others apparently can, very strange.
Last edit: 29 Apr 2011 15:03 by ArcEye.
Please Log in or Create an account to join the conversation.
29 Apr 2011 15:05 #9509
by BigJohnT
Replied by BigJohnT on topic Re:Tool Changer
Do you somehow have a non printing character in your comp file from a word processor perhaps?
John
John
Please Log in or Create an account to join the conversation.
29 Apr 2011 15:16 #9510
by ArcEye
Replied by ArcEye on topic Re:Tool Changer
Thank you John, I'll be *****ed!
All I did was cut and paste from the first page into gedit, but there must have been something there, because I just repeated the process and got a file exactly the same length, but this time it compiles!!!!!!!!!
I will check it loads and I can see the pins etc in a while, but have no reason to suspect that it won't.
The answer is often simple AFTER you have found it!
All I did was cut and paste from the first page into gedit, but there must have been something there, because I just repeated the process and got a file exactly the same length, but this time it compiles!!!!!!!!!
I will check it loads and I can see the pins etc in a while, but have no reason to suspect that it won't.
The answer is often simple AFTER you have found it!
Please Log in or Create an account to join the conversation.
29 Apr 2011 15:26 #9511
by BigJohnT
Replied by BigJohnT on topic Re:Tool Changer
I'm glad you finally got that sorted out.
John
John
Please Log in or Create an account to join the conversation.
29 Apr 2011 15:44 #9514
by andypugh
Replied by andypugh on topic Re:Tool Changer
I would guess there is a closing brace missing at the end of the comp. Get_data_size is tagged on at the end by comp, it sounds like execution is running straight through.
Please Log in or Create an account to join the conversation.
02 May 2011 11:47 - 02 May 2011 16:01 #9534
by ArcEye
Replied by ArcEye on topic Re:Tool Changer
Hi again
Having got this working I was inspired to try to write my own component to suit my particular toolchanger. ( Boxford 240F)
It works well except for one thing, I cannot find find a way of connecting to stepgen.3.position-cmd
because it is already linked earlier in the .hal file (net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd).
The stepper rotating the ATC is notionally axis A which allows me to jog it and move it in gcode.
I can track the commanded and actual position through pins linkages to the component but can't find a way to set it
I also seem to recall that in M6 moves, all jogging and other axis movement at a higher level is suspended until M6 is complete, which presumably means the stepper can only be moved by directly accessing the stepgen.
Can you enlighten me as to how this is best achieved?
regards
PS
Think I have answered my own question
I unlinked stepgen.3.position-cmd and stepgen.3.position-fb from axis.3 and linked them to the relevant pins in my toolchanger component, which operated the ATC in simulation.
Looks like there can only be one source of position commands for an axis.
I could run a script which linked them back to axis.3 when manual control was required, or perhaps have 2 stepgens and switch between them, have to investigate further.
Having got this working I was inspired to try to write my own component to suit my particular toolchanger. ( Boxford 240F)
It works well except for one thing, I cannot find find a way of connecting to stepgen.3.position-cmd
because it is already linked earlier in the .hal file (net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd).
The stepper rotating the ATC is notionally axis A which allows me to jog it and move it in gcode.
I can track the commanded and actual position through pins linkages to the component but can't find a way to set it
I also seem to recall that in M6 moves, all jogging and other axis movement at a higher level is suspended until M6 is complete, which presumably means the stepper can only be moved by directly accessing the stepgen.
Can you enlighten me as to how this is best achieved?
regards
PS
Think I have answered my own question
I unlinked stepgen.3.position-cmd and stepgen.3.position-fb from axis.3 and linked them to the relevant pins in my toolchanger component, which operated the ATC in simulation.
Looks like there can only be one source of position commands for an axis.
I could run a script which linked them back to axis.3 when manual control was required, or perhaps have 2 stepgens and switch between them, have to investigate further.
Last edit: 02 May 2011 16:01 by ArcEye.
Please Log in or Create an account to join the conversation.
02 May 2011 11:52 - 02 May 2011 12:25 #9535
by Robin
Replied by Robin on topic Re:Tool Changer
I have the loadrt and addf
but now i got the set all the Inputs and outputs
someone know what is the best way to do it and can someone help me getting started with it
greetings Robin
but now i got the set all the Inputs and outputs
someone know what is the best way to do it and can someone help me getting started with it
greetings Robin
Last edit: 02 May 2011 12:25 by Robin.
Please Log in or Create an account to join the conversation.
02 May 2011 15:30 #9544
by BigJohnT
Replied by BigJohnT on topic Re:Tool Changer
Robin,
Is your configuration from the StepConf Wizard?
Also read this short chapter on HAL.
www.linuxcnc.org/docview/html/hal_basic_hal.html
John
Is your configuration from the StepConf Wizard?
Also read this short chapter on HAL.
www.linuxcnc.org/docview/html/hal_basic_hal.html
John
Please Log in or Create an account to join the conversation.
Time to create page: 0.094 seconds