can not find a variable or signal that tells me in what mode the machine is

  • ikkuh
  • ikkuh's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
19 Aug 2024 07:11 - 19 Aug 2024 07:19 #308119 by ikkuh
I am almost done with the qtDragon version of the rapidchangeatc toolchanger panel and M6 routines.
There is one (or two) things holding me up.

How can I tell from a macro (.ngc) file in what mode the machine is working?
With mode I mean, could be in toolchange mode, in idle mode and so on.
I have dust extraction coupled with the vfd.spindle-on signal.

#vacuum cleaner delay
addf vacuumOr2 servo-thread

loadrt timedelay names=timeDelayVacuum
addf timeDelayVacuum servo-thread

setp timeDelayVacuum.on-delay  0
setp timeDelayVacuum.off-delay 4

net spindle-on spindle.0.on => vfd.spindle-on

net spindle-on vacuumOr2.in0     # probably an M command
net coolant-flood  vacuumOr2.in1 # re use the flood button in qtvcp
net vacuum vacuumOr2.out
net vacuum timeDelayVacuum.in    # start the delay

net delay_sig timeDelayVacuum.out  [HMOT](CARD0).ssr.00.out-05[/code]


For the ATC to work the spindle has to turn. In my setup the dust extraction turns on when the ATC fires the spindle up. Lots of unnecessary noise.
I figure I can fix in this two ways, expand the above code with another OR2 and the Machine mode signal, or do it in the macro.

So my problem is I can not find a variable or signal that tells me in what mode the machine is.
Can somebody help me with that?
Last edit: 19 Aug 2024 07:19 by ikkuh. Reason: this editor sucks!

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

More
19 Aug 2024 10:05 - 19 Aug 2024 10:06 #308126 by MaHa
For this i use this hal pin:
[b]motion.motion-type[/b] OUT S32
These values are from src/emc/nml_intf/motion_types.h.0: Idle (no motion)
1: Traverse
2: Linear feed
3: Arc feed
4: Tool change
5: Probing
6: Rotary unlock for traverse
Last edit: 19 Aug 2024 10:06 by MaHa.
The following user(s) said Thank You: tommylight

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

  • ikkuh
  • ikkuh's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
19 Aug 2024 12:40 #308133 by ikkuh
I used this:

#vacuum cleaner delay
addf vacuumOr2 servo-thread

addf toolchangeXor2 servo-thread

loadrt timedelay names=timeDelayVacuum
addf timeDelayVacuum servo-thread

setp timeDelayVacuum.on-delay  0 
setp timeDelayVacuum.off-delay 4


net spindle-on spindle.0.on => vfd.spindle-on


net spindle-on vacuumOr2.in0
net coolant-flood  vacuumOr2.in1
net vacuum vacuumOr2.out 
#net vacuum timeDelayVacuum.in

#net in-toolchange iocontrol.0.tool-change #in toolchange

net vacuum        toolchangeXor2.in0
net in-toolchange toolchangeXor2.in1
net toolchanging  toolchangeXor2.out
net toolchanging  timeDelayVacuum.in

net delay_sig timeDelayVacuum.out  [HMOT](CARD0).ssr.00.out-05


But watching in Halshow the iocontrol.0.tool-change never changes. Will try your suggestion tomorrow, I did come across that motion-type but for some reason I didn´t want to use it.
Thanks!

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

Moderators: cmorley
Time to create page: 0.112 seconds
Powered by Kunena Forum