Need help on using Ladder

09 Jan 2017 17:59 #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.
09 Jan 2017 18:58 - 09 Jan 2017 18:59 #85537 by Todd Zuercher
The connection of Classicladder is done in your hal file.

There are instructions for setting it up here.

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 =>
And to send a signal from the parallel port pin #10 into CL.
net cl-in <= =>
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 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
09 Jan 2017 19:37 #85544 by kt600v
I really apreciate your reply, many thanks I'm going to read the instructions.
Time to create page: 0.129 seconds
Powered by Kunena Forum