Does anyone have a VistaCNC hal file they'd be willing to share?

More
05 Jan 2023 14:01 #261003 by jvanick
I'm banging my head against the wall here due to A) not knowing hal very well, B) the migration from an old 2.6 config to a 2.9 config.
Add to this complexity is that I have a config where Joint1 and Joint2 are a tandem "Y" axis.

the files provided from Vista look to be the old style of jogging the joints vs the axises.

Does anyone have a working vc-p2s hal config they'd be willing to share?

If not, any guidance would be hugely helpful -- I've attached the hal file that vista suggests, but my gut says it's wrong since it's referring to joints and not the axis's themselves. 

Thank you!
Attachments:

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

More
05 Jan 2023 23:28 #261049 by JohnnyCNC
Here is my vc-p4s.hal that may be of help as a reference.  I doubt there is much difference between them.

John
Attachments:

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

More
05 Jan 2023 23:42 #261050 by spumco
OP

Regardless of the vista's OEM settings, the choice of joints vs axis is up to you.  If you want to be able to jog with the pendant before homing you'll need to link the MPG to joints and axis.

But beware of pre-homed joint jogging if you've got a dual-motor gantry... 

-R

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

More
06 Jan 2023 00:07 #261052 by jvanick
ok, so I modified my file to point at what I think is the axises vs the joints.. I really don't care about using the pendant before the machine is homed as the autohome functions work just fine to get the machine into a 'known' state.

I am getting this:
./vc-p2s.hal:25: Pin 'halui.axis.x.plus' was already linked to signal 'jog-x-pos'

line 25 is this:
net jog.0.cont-plus  vc-p2s.jog.0.plus  => halui.axis.x.plus halui.joint.0.plus

I found the same reference in the main machine config:
net jog-x-pos.    halui.axis.x.plus

am I supposed to comment one out, or maybe edit one if that's the case.. which one gets commented or edited.

Sorry if I'm asking dumb questions -- if there's a really clear doc of how this is supposed to integrate, please point me at a link.

 

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

More
06 Jan 2023 03:25 #261059 by spumco
Welcome to HAL; you're not asking really dumb questions.

There is a very significant difference between stupid and ignorant: Ignorance can be cured...

Without looking at your hal file, I assume you generated your original file/config using stepconf or pncconf.  Those baseline hal files include connections to halui.axis.N.jog (or some such) as a 'starter' for you so that you can use screen or physical buttons to jog the machine.  If that connection wasn't there, the on-screen or physical jog buttons wouldn't work (probably, depends on other stuff too).  The 'stock' statements dont actually work as-is, but they are half the required connection to get you going.

Your vista HAL file (probably) has the following in it:

net jog.0.cont-plus  vc-p4s.jog.0.plus  => halui.axis.x.plus halui.joint.0.plus

The above gibberish can be more easily read if it's broken out in to multiple lines:

net jog.0.cont-plus <= vc-p4s.jog.0.plus [connects vista output pin to a signal]
net jog.0.cont-plus => halui.axis.x.plus [connects same signal to axis jogging input pin]
net jog.0.cont-plus => halui.joint.0.plus [connects same signal - again - to joint jogging input pin]

So what that line of the vista HAL is doing is connecting the vista pendant output to halui axis jogging AND joint jogging.

BUT...

You can connect ONE signal to multiple pins, but you can only connect ONE signal to a particular pin.  Can't connect multipel signals to a single pin.

Your 'stock' HAL file already has a signal connected to pin halui.axis.plus.  LinuxCNC goes through the main HAL file, then goes through the vista  HAL files and see that the pin is already connected so it vomits and give your the error message.

Easiest thing for you to do is comment out all the "net ...halui.axis.N.something" jogging lines in your main hal file.

It gets a little more complicated if you want multiple inputs to control the same output, but it's not that bad.  Looks like this, simplified:

net signal0 <= input.pin0
net signal1 <= input.pin1
net signal0 => or2.0.in0
net signal1 => or2.0.in1
net signal3 <= or2.0.out
net signal3 => output.pin

Although there aren't any really good docs for the vista MPG, there are really clear docs on how to integrate HAL in general, but, sadly... they only become really clear in hindsight.  I still remember when HAL 'clicked' for me: it was like night vs day.

Keep asking questions.  Most helpful thing I found is to open the LinuxCNC instruction manual online and have about 7 or 8 tabs open with the various component descriptions as well as the main help file chapter.  Multiple monitors is a huge help.  Read through your hal files a million times and if there's something you dont understand exactly what it does, look it up:

component description example: linuxcnc.org/docs/devel/html/man/man1/halui.1.html
chapter example: linuxcnc.org/docs/devel/html/hal/basic-hal.html

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

More
06 Jan 2023 03:35 #261060 by spumco
And another thing... go watch this guy's videos.

The following user(s) said Thank You: tommylight

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

More
06 Jan 2023 13:35 #261081 by jvanick
ok, that's starting to become as clear as mud ;)

so if I was to want to do something like leave my pncconf hal file alone, and just have a the vista hal file add the hal lines for the pendant, could I do something like:

net jog.0.cont-plus <= vc.p2s.jog.0.plus

basically connecting the same signal, or is that just something that you can't do since now I'm defining that signal multiple times?

What I'd like to get to, is a drop-in v2c hal file that doesn't require modifying what pncconfig creates.

FWIW, I was able to get my X, Y, and Z jogging via the pendant working properly by commenting out those lines in the main hal file.. and commenting out the rest of the v2c file... I figure I'll add each function back in and test along the way, but if there was an easier way to re-craft the v2c file, that would be great.

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

More
06 Jan 2023 14:15 #261082 by spumco
Yes, you can accomplish what you want just in the vc HAL.

If you want to jog ONLY after homing, then simply change the v2c HAL signal name to match the one in your main hal:

net jog-x-pos <=  vc.p2s.jog.0.plus

If you want BOTH joint & axis jogging (before and after homing), link both to the same signal in v2c HAL

net jog-x-pos <=  vc.p2s.jog.0.plus
net jog-x-pos =>  halui.joint.0.plus

Remember if you wind up having to reinstall your vista pendant you'll need to re-write the v2c.hal.  Good idea to save the modified v2c.hal somewhere on a USB stick or other computer in case you wind up wiping your LCNC installation.

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

More
06 Jan 2023 15:35 #261089 by jvanick
oh yeah, my entire config directory is saved in my own personal subversion repo (which is off the machine itself).

I basically 'commit' the changes after each successful config change, so I can easily diff or revert back if I totally mess things up.

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

More
06 Jan 2023 15:48 #261091 by jvanick
so is there any real good reason to have the hal lines all combined like in the original file?

because while it's more verbose to separate the line out into 3 or 4 different lines, it's certainly much more understandable to someone like myself getting started in the HAL.

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

Time to create page: 0.109 seconds
Powered by Kunena Forum