A question about the HAL command "net"

More
17 Sep 2014 23:22 #51275 by JoeHildreth
Hello all,

I have been reading the HAL manual trying to really figure out what the HAL commands are in the sample gantry and gantry-hs files. I am building a new gantry router and have been trying to document it so that anyone new coming into the hobby might be able to wrap their brain around it. My machine will have 2 joints on the Y-Axis, so I started reading posts about slaving motors together and what not. The end result was that I was kinda confused and felt like there were inherent problems with running machines that have two joints on an axis, particularly with homing. So I decided to step back and do some reading and maybe revisit some of those threads before I start asking too many questions that you may have answered several times already.

I started with the two above config files for reference. And am going down line by line in the gantry.hal file. I understand the loadrt, setp and addf commands. The net command I think I understand but just need either confirmation or perhaps clarification.

The hal manual has the following sample line:
net home-x axis.0.home-sw-in <= parport.0.pin-11-in

I take this to mean the following:

net = The command that creates the connection between the home-x signal and pins axis.0.home-sw-in and parport.0.pin-11-in

home-x = The signal name that we are creating that will be used by HAL

axis.0.home-sw-in = This is the axis gui pin that we are connecting the signal to. The 0 represents the first machine axis "X". The sw means that it is a switch and the "in" means that it is an input.

<= = This is not used by net but is a visual flag that lets the reader know that the input for the axis.0.home-sw-in is recieved from parport.0.pin-11-in making this pin tecnically an output when viewed from axis.0.home-sw-in pin.

parport.0.pin-11-in = This is the first parallel port (0), using pin 11. Pin 11 on the port is an input that will receive its logic from a physically connected switch located on the X-Axis of the machine.


There are a couple of things I noticed about the HAL manual. It has most of the parameters for different modules you can load, but on kinematics, it only lists the ones you could load but does not discuss the parameters like "gantrykins.joint-0". Are these located elsewhere? If I am understanding correctly and "axis.0.home-sw-in" is a HAL pin for the AXIS GUI, where do I find the list of availabel HAL pins supported by the GUI. They do not seem to be listed in the HAL or Integrators manuals (but maybe I overlooked.)

I want to thank you all in advance for your help, goodness knows you folks have helped me a lot in the past. If I can wrap my squishy brain around this stuff, apply it to the machine i am building and document it with screen casts and web pages, maybe the end result will be helping other to figure it out. (At least that is the goal.)

Regards,

Joe

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

More
18 Sep 2014 20:28 #51307 by ArcEye

If I am understanding correctly and "axis.0.home-sw-in" is a HAL pin for the AXIS GUI,


Not correct I'm afraid.

axis is a physical axis of the machine, axis.0 is the X axis
www.linuxcnc.org/docs/devel/html/man/man9/motion.9.html

The naming of the main GUI as Axis, does create some communication and comprehension problems on occassions :laugh:

There are a few pins which relate to the Axis GUI, these start with axisui and only allow you to do things like clear notifications etc
Machine > HAL Configuration > pins > axisui

regards
The following user(s) said Thank You: JoeHildreth

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

More
19 Sep 2014 00:56 - 19 Sep 2014 01:12 #51313 by JoeHildreth
ArcEye,

Thanks for taking the time to answer my question. I am guessing that other than the pin, I have the rest of it correct?

I also noticed the parameters for gantrykins was in the man page after you sent the above link. Thanks for the pointer and clarification!

Joe
Last edit: 19 Sep 2014 01:12 by JoeHildreth. Reason: Added text.

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

More
19 Sep 2014 01:28 #51315 by ArcEye
Hi

Pretty much yes.

net {signal name} pin pin pin etc

There can only be one OUT pin per signal, but you can connect any number of IN pins.

Basically only one pin can determine the value of a signal, but many pins can access the value via the signal.

The conceptual morass of 'which pin is in and which pin is out', is probably best visualised by remembering that Linuxcnc is a program running inside the computer, so events from the machine to the computer come IN and commands from the computer to the machine come OUT

regards

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

Time to create page: 0.079 seconds
Powered by Kunena Forum