How to make an extremely simple HAL file.

More
09 Sep 2021 15:14 - 09 Sep 2021 16:15 #220059 by RékaM
I am trying to write a HAL file for the Vismach machine I have modeled. I don't want to use this to control an actual machine, just to move the model; I am trying to take the HAL file from max5triv and trim it down to just what I need. But I can't tell what's essential or what everything does, and the documentation doesn't have everything I'm looking for. For example, at one point max5triv.hal connects the pins from the max5gui file to joint.0, joint.1, joint.2, joint.4, and joint.5. I can't find anything on what the numbers mean, or why 3 would be skipped. I can't tell if setting limits and servo threads is necessary for the most bare bones simulation, or only if you are connecting to an actual machine. So my question is: What is the actual minimum I need for my GCode to be able to properly move my Vismach model? I'm not asking for someone to write code for me; just to list what is actually necessary for what I need and what I can skip trying to figure out. (And also to tell me what the heck those joint numbers mean. I've looked in all the likely doc pages at least once, often twice... if it's there, it's hidden somewhere very unintuitive, or I skipped over it somehow.) (Edit: Found it in the INI configuration doc... glad I thought to look there. One question answered, several to go.)

If you want to know what exactly the configuration of my machine is: My workpiece is on top of two goniometers that rotate around a point above the workpiece, with the W stage (which rotates around Y - I know that should be V, but U and V are too easily confused, so we call it W) on top of the U stage. The goniometers are on top of a Y stage, which is on top of an X stage, and then the tool moves in Z. I have one pin for each stage, so I want to connect them to the proper axes, but the documentation is mostly talking about how to connect to various parts of an actual machine, and not how to set up the Vismach simulation to move properly. The 3axistutorial gui file was very helpful in making my Vismach model, but the HAL file hasn't told me what I need to know.
Last edit: 09 Sep 2021 16:15 by RékaM. Reason: found answer to one of my questions (not all)

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

More
01 Oct 2021 13:01 #221950 by andypugh
The kinematics file determines which G-code axis moves which machine joint.

The example you have is probably an old XYZBC configuration. Before LinuxCNC 2.8 the joints were hard-coded such that XYZABCUVW mapped directly to joints 0 to 8.

Your machine is a good example of why this was not a great idea.

What degrees of freedom do you want to control from the G-code? You have the option of controlling the joints with a1:1 mapping of axis-letter to joint, or you could use kinematics such that the G-code is in XYZ space but the axes move in parallel such that the effect is moves in cartesian XYZ sace with multiple joints moving simultaneously to achieve that.

In fact you probably would program this machine in XYZAB G-code, with control of both tool-tip position and tool orientation.

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

More
01 Oct 2021 15:22 #221966 by RékaM
Thank you for the reply, but I actually got it working a while ago! All I had to do was load my gui file and then add a line like "net x-pos-fb joint.0.pos-fb => vismachtesting.xslide" for each of my axis pins, using 0-4 for XYZAB.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum