Vista CNC and 2.9

More
2 years 5 months ago #301915 by spumco
Replied by spumco on topic Vista CNC and 2.9
So... as you mentioned in the first post, signal 'spindle-on' is connected to your parport pin, which is what turns the spindle on.

I don't know what's connected to that signal - i.e. what input drives that signal.  Perhaps something in your GUI?  What GUI are you using?

Can you look in halshow and see what pin is connected to signal 'spindle-on'?

Reason I'm asking is because I think you need an or2 component so that either the vista output or the GUI output can start/stop the spindle.  And we need to know what pin is currently driving the signal so we can set up the appropriate or2 logic.

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

More
2 years 5 months ago #301917 by milu
Replied by milu on topic Vista CNC and 2.9
According to halshow, nothing is connected to spindle-on (although, as you mention spindle-on is connected to parport). I tried something like:

net spindle.start vc-p4s.spindle.start => spindle-on

But it causes linuxcnc to abort on launch because it can't find spindle-on and I don't know any other way to refer to spindle-on.

For what it is worth, even the current setup seems to cause a command to start the spindle to be written to shared memory, and then read back, but nothing happens.

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

More
2 years 5 months ago - 2 years 5 months ago #301931 by Aciera
Replied by Aciera on topic Vista CNC and 2.9
I think you are confusing 'signals' and 'pins'.

With this line you assign the pin 'parport.0.pin-01-out' to a signal named 'spindle-on'

net spindle-on => parport.0.pin-01-out

to connect that signal to another pin you would use:

net spindle-on <= vc-p4s.spindle.start

Note that the '<=' and '=>' are optional and only help the user to see the direction of the information.

[edit]
for more information see section 1.4:
www.linuxcnc.org/docs/html/hal/basic-hal.html
Last edit: 2 years 5 months ago by Aciera.
The following user(s) said Thank You: spumco

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

More
2 years 5 months ago #301983 by milu
Replied by milu on topic Vista CNC and 2.9
So I changed it to match what I think is your suggestion:

# 12---SPINDLE
net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
#net spindle.start vc-p4s.spindle.start => halui.spindle.0.start
net spindle.stop vc-p4s.spindle.stop => halui.spindle.0.stop
net spindle-on <= vc-p4s.spindle.start

I assumed this would allow the pendant to turn the spindle on (but maybe not off), but it does neither. Did I get this wrong?

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

More
2 years 5 months ago - 2 years 5 months ago #301984 by Aciera
Replied by Aciera on topic Vista CNC and 2.9
Apologies, I was trying to show how signals are different from pins.

Try this:
# 12---SPINDLE
net spindle-start <= vc-p4s.spindle.start => halui.spindle.0.start
net spindle-stop <= vc-p4s.spindle.stop => halui.spindle.0.stop
net spindle-is-on <= halui.spindle.0.is-on => vc-p4s.spindle.is-on => parport.0.pin-01-out
Last edit: 2 years 5 months ago by Aciera. Reason: Change signal names to make them look less like pins

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

More
2 years 5 months ago #302010 by milu
Replied by milu on topic Vista CNC and 2.9
I replaced my section 12 with the code you suggest and linuxcnc aborts with:

./vc-p4s.hal:109: Pin 'parport.0.pin-01-out' was already linked to signal 'spindle-on'

So I commented this line out in the main hal:

#net spindle-on => parport.0.pin-01-out

and that fixes the error, but the spindle still does not operate.

Can I ask a basic question? If this section of src/emc/motion/command.c is reached (which it is) shouldn't the spindle turn on?

case EMCMOT_SPINDLE_ON:

rtapi_print_msg(RTAPI_MSG_DBG, "SPINDLE_ON: spindle %d/%d speed %d\n",
emcmotCommand->spindle, emcmotConfig->numSpindles, (int) emcmotCommand->vel);
spindle_num = emcmotCommand->spindle;
if (spindle_num >= emcmotConfig->numSpindles){
reportError(_("Attempt to start non-existent spindle"));
emcmotStatus->commandStatus = EMCMOT_COMMAND_INVALID_COMMAND;
break;
}

...

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

Time to create page: 0.060 seconds
Powered by Kunena Forum