Need help on using Ladder

More
09 Jan 2017 17:59 #85535 by kt600v
kt600v created the topic: Need help on using Ladder
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.
More
09 Jan 2017 18:58 - 09 Jan 2017 18:59 #85537 by Todd Zuercher
Todd Zuercher replied the topic: Need help on using Ladder
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.
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.
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.
Last Edit: 09 Jan 2017 18:59 by Todd Zuercher.
The following user(s) said Thank You: kt600v
More
09 Jan 2017 19:37 #85544 by kt600v
kt600v replied the topic: Need help on using Ladder
I really apreciate your reply, many thanks I'm going to read the instructions.
Time to create page: 0.165 seconds
Powered by Kunena Forum