Need help on using Ladder

More
9 years 9 months ago #85535 by kt600v
Hello everyone, I have confogured a CNC using stepconf , everything works, but i would like to add a ladder program, I would be very grateful if someone tells me how to conect ladder inputs and outputs to phisical parallel port pins, many thanks in advance for your reply.

Please Log in to join the conversation.

More
9 years 9 months ago #85537 by Todd Zuercher
The connection of Classicladder is done in your hal file.

There are instructions for setting it up here.
linuxcnc.org/docs/html/ladder/classic-ladder.html
and
linuxcnc.org/docs/html/man/man9/classicladder.9.html

And there is a couple of example simulation configurations using Classicladder that come with Linuxcnc. You can look at those files for some examples.

A couple of quick examples of lines of hal code for connecting some parallel port pins to CL pins.
To send a signal from CL to the parallel port pin #1.
Code:
net cl-out <= classicladder.0.out-00 => parport.0.pin-01-out
And to send a signal from the parallel port pin #10 into CL.
Code:
net cl-in <= paraport.0.pin-10-in => classicladder.0.in-00
A hal novice might look at the above lines and think "Hey you can't connect 2 output pins together", but the parallel port names are a little confusing in that the hal pin named paraport.0.pin-01-out is a hal "input" pin that controls the output from the parallel port.

There are a few more lines of code that have to be added to your hal file to load and configure Classicladder. They are covered in the manual pages linked to above.

Please Log in to join the conversation.

More
9 years 9 months ago #85544 by kt600v
Replied by kt600v on topic Need help on using Ladder
I really apreciate your reply, many thanks I'm going to read the instructions.

Please Log in to join the conversation.

Time to create page: 0.099 seconds
Powered by Kunena Forum