Greenie problems configuring 6i25 with 7i77, using Granite Devices VSD-E drives

More
8 years 6 months ago #108518 by DeckelHead
Had a delay due to work and the VFD problem. I just bought a new one and will look at the old guy later... Anyhow, I have a minor problem with integrating the VistaCNC pendant. This should be an easy one.

I have two HAL files:
hurco.hal:
Code:
net jog-x-pos halui.jog.0.plus

vc-p4s.hal:
Code:
net jog.0.cont-plus vc-p4s.jog.0.plus => halui.jog.0.plus

error when starting:
Code:
./vc-p4s.hal:25: Pin 'halui.jog.0.plus' was already linked to signal 'jog-x-pos'

I get the error... I think. I have two things driving the same ping, halui.jog.0.plus. Those are jog-x-pos and jog.0.cont-plus (sourced from vc-p4s.jog.0.plus). My 'I think' is that I know that I have two outputs driving the same pin and that is bus contention; I'm not 100% sure my summary of *what* the two outputs are is correct, so confirmation there would be great.

My bigger problem, though, is how to solve this. It seems reasonable that I should be able to have a button on the control console and the pendant all initiate a jog. In fact, I can see three different jog buttons: the menu, a physical switch on the console, and the physical switch on pendant. But how do I do that? Hmmm... an OR operation? Is this the proper/sanctioned resolution for the case of two buttons?

hurco.hal:
Code:
# net jog-x-pos halui.jog.0.plus

vc-p4s.hal:
Code:
loadrt or2 addf or2.0 servo-thread ... #net jog.0.cont-plus vc-p4s.jog.0.plus => halui.jog.0.plus net jog.0.cont-plus vc-p4s.jog.0.plus net jog.0.cont-plus or2.0.in0 net jog-x-pos or2.0.in1 net jog.0.plus.sig or2.0.out halui.jog.0.plus

Note: at least this compiles, but I have to have that jog.0.plus.sig in there, which has no other use than to avoid an error. That seems suspicious. Also, how does one easily tell what is a pin and what is a signal. They seem rather ambiguous.

Please Log in to join the conversation.

More
8 years 6 months ago #108524 by Todd Zuercher
I can't say for sure with out seeing your whole halfiles.

But from what you have shown us you could simply do all you have above by just changing the signal names so they are the same.

Hurco hal:
Code:
net jog-x-pos halui.jog.0.plus

vc-p4s.hal:
Code:
net jog-x-pos vc-p4s.jog.0.plus

All hal pins can only ever be attached to one signal name. Each signal name (jog-x-pos is your signal name) can only have one output pin attached to it, but can be connected to as many input pins as you like.
"halui.jog.0.plus" is an input pin. (it receives info from a hal signal)
"vc-p4s.jog.0.plus" is an output pin (it sends info to a hal signal)
If your signal named "jog-x-pos" is not connected to another output pin (which I can't know without seeing your whole files) the above is all you need.

Please Log in to join the conversation.

More
8 years 6 months ago #108527 by DeckelHead
OK, that worked. I think I'm a little discombobulated though. It seems as though your approach functioned as a logical OR, which I was not expecting. Both halui.jog.0.plus and vc-p4s.jog.0.plus are outputs as a function of a button being pressed on either the UI or the pendant. Both result in jog-x-pos changing state. My erroneous thought was to view this from a digital electronic circuit perspective. Two outputs (unless open collector) can't drive a single input. I guess I had it backwards, sorry!

I have a little bit of a difficult time deciding what is an input pin and what is an output pin. Out of curiosity, is there an easy way to ascertain this, or am I just being foolish.

Finally, I'm usually a little nervous about changing the name of signals because I don't know where else them may be used. So, in the example solution you provided, I was/am worried about the usage of the now removed jog.0.cont-plus. I don't see it elsewhere in my HAL files (which I will post once I clean them up a bit) so maybe it isn't an issue (?).

An area that causes me a little confusion is what signals or pins are reserved and/or need to be configured. I found this someplace a bit ago but now I seem to have lost it. If there is a link you can share, that would be great.

Please Log in to join the conversation.

More
8 years 6 months ago #108530 by DeckelHead
I've added the two HAL files that I'm working with right now. I've made the changes you suggested and rectified the X/Y/Z neg/pos errors. I'm presently having these two issues:
  • ./vc-p4s.hal:90: Signal 'spindle-enable' can not add OUT pin 'vc-p4s.spindle-override.count.enable', it already has OUT pin 'motion.spindle-on'
    This seems to be the opposite case as before, where I think I'm trying to send the spindle-enable, sourced from motion.spindle-on (line 332) to a pin on the 7i77 (line 324), as well as vc-p4s.spindle-override.count.enable and halui.spindle-override.count-enable (line 90). I'm assuming I actually need it sent to two output pins, however, so how does one accomplish this?
  • I'm getting errors on line 112, etc. It seems that halui.mdi-command-[06 - 10] is not there. I get errors similar to: Pin 'halui.mdi-command-06' does not exist. The part that has me scratching my head a little bit is that the halui pins are all ephemeral, right? If correct, then I would have expected those to exist. I just commented out the reference to the missing mdi-command pins and moved forward, but I want to be sure that is OK

Please Log in to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum