component compile problem

More
8 years 6 months ago - 8 years 6 months ago #109206 by Skidloaders1
Hi all

Have now compiled ddt.comp on other linuxcnc machine and it worked just fine. :-)

Also reinstalled linuxcnc-dev , but with no change to the result.

Is it possible to compile on other unit and transfer the files to the machine I need them in ??
reinstall linuxcnc ?????
currently running linuxcnc 2.7.12 .

regards
Wilfried
Last edit: 8 years 6 months ago by Skidloaders1.

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

More
8 years 6 months ago - 8 years 6 months ago #109307 by JR1050
Replied by JR1050 on topic component compile problem
i think you have several syntax errors

FUNCTION _;
{
If (toolchange == true )
turn-turret = true;
}


C is case sensitive " If" is not the same as" if"
you will need to declare what your variables/ hal pins are
names should be in sequential parenthesis
you have to name the component
Spend some time in the hal manual and look up the toolchange comp for the first guy that retrofitted an HNC, it is very simple and makes sense. His first name was Kurt.
Most important, you have to know what you really want your component to do, you might try "hello world" with the gcc. Halcompile is for hal components.

so , more like this


component tool change;

pin in bit tool_change;
pin out bit turn_turret ;

function( _);
;;
;;
{
if((tool_change)==1){
turn_turret =1;
}
}

Im a big fan of components for plc functions, but it is a large learning curve.Ladder might be easier.
Last edit: 8 years 6 months ago by JR1050.

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

More
8 years 6 months ago #109338 by Skidloaders1
Thank you JR1050 for your kind help.

I realise that learning to write components is not going to be a overnight success.

I tried your code , once again with no different result.
Not looking forward to reinstall linuxcnc - ( or the full Debian .)
But looks like I have no choice.

best Wilfried

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

More
8 years 6 months ago #109339 by Skidloaders1
hope to write component for my Weiler lathe

see

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

More
8 years 6 months ago #109361 by JR1050
Replied by JR1050 on topic component compile problem
When you get halcompile working, I'd be more then happy to help you with your component. I've done several lathe turrets and a couple tool changers. Single direction lathe turrets are easy There is an older book called " C Through design " , it is a very good easy to follow text. Check it out.
The following user(s) said Thank You: Skidloaders1

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

More
8 years 6 months ago #109399 by andypugh
Replied by andypugh on topic component compile problem
You don't need a custom component for the Wieler lathe.
I know this because I have helped make a Weiler lathe work using only the built-in "carousel" HAL component.

linuxcnc.org/docs/devel/html/man/man9/carousel.9.html

(You do need the newer version from the development branch, that has added parity pins specifically added for the Weiler)
The following user(s) said Thank You: Skidloaders1

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

Time to create page: 0.078 seconds
Powered by Kunena Forum