SPINDLE INDICATOR (3 STate)
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23558
- Thank you received: 4858
28 Sep 2015 05:19 #63100
by andypugh
Both the halui and motion pins are output pins. I have never bothered to check, but it is possible that the halui pin is based on motion.spindle-speed-in to tracks actual rather than commanded.
Replied by andypugh on topic SPINDLE INDICATOR (3 STate)
I was trying the motion... but it looked like they were control pins and the halui was an output (result) pin... but hey... still learning.
Both the halui and motion pins are output pins. I have never bothered to check, but it is possible that the halui pin is based on motion.spindle-speed-in to tracks actual rather than commanded.
Please Log in or Create an account to join the conversation.
- Askjerry
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 313
- Thank you received: 35
29 Sep 2015 15:34 - 29 Sep 2015 15:34 #63182
by Askjerry
Replied by Askjerry on topic SPINDLE INDICATOR (3 STate)
I did some serious updates to this machine.
So if this all checks out... it should be the most advanced panel (technically) that I have built to date. I still need to add in home switches and probe commands... but they haven't installed the components yet.
Attached for your enjoyment... let me know if you find it useful.
Jerry
- Updated Spindle RPM to display actual speed from PHASE A input. (50 pulses per rev)
- Spindle-At-Speed now compares commanded (spindle-cmd) with actual speed +/- 1.5 scale
- Green REV and FOR buttons have a variable time delay to allow the machine to spin down when reversing direction.
- Spindle-At-Speed now incorporated into the RPM display... only visible when active.
- Set ABS function so when running reverse the negative commanded speed is set positive.
- Minor graphics and panel tweaks to make it look better.
- Automated PECK DRILL tab tweaked, routines patched for better metric feed rates. (Was limited to 50)
So if this all checks out... it should be the most advanced panel (technically) that I have built to date. I still need to add in home switches and probe commands... but they haven't installed the components yet.
Attached for your enjoyment... let me know if you find it useful.
Jerry
Last edit: 29 Sep 2015 15:34 by Askjerry.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23558
- Thank you received: 4858
29 Sep 2015 15:39 #63183
by andypugh
Rather than a time delay, why not wait until the measured spindle speed is below a threshold?
Replied by andypugh on topic SPINDLE INDICATOR (3 STate)
Green REV and FOR buttons have a variable time delay to allow the machine to spin down when reversing direction.
Rather than a time delay, why not wait until the measured spindle speed is below a threshold?
Please Log in or Create an account to join the conversation.
- Askjerry
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 313
- Thank you received: 35
29 Sep 2015 15:46 - 29 Sep 2015 15:47 #63184
by Askjerry
Replied by Askjerry on topic SPINDLE INDICATOR (3 STate)
When he clicks the pyvcp button... it pulls a routine... and I wasn't sure if the variable was passed one-time when the routine ran... or continuously.
If it can be read on-the-fly... then yeah... I can put in a loop...
Is input less than 100 RPM? (yes / no)
If yes... change directions and quit... if no... go to the top and check again. I'll probably experiment with that... it will be good to know for other options / ideas / widgets.
Good idea... that will probably be the next update you see.
... dang it... now I can't sleep... gotta try it...
If it can be read on-the-fly... then yeah... I can put in a loop...
Is input less than 100 RPM? (yes / no)
If yes... change directions and quit... if no... go to the top and check again. I'll probably experiment with that... it will be good to know for other options / ideas / widgets.
Good idea... that will probably be the next update you see.
... dang it... now I can't sleep... gotta try it...
Last edit: 29 Sep 2015 15:47 by Askjerry.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23558
- Thank you received: 4858
29 Sep 2015 15:55 - 29 Sep 2015 16:00 #63186
by andypugh
I was imagining that the button was grayed-out when not available, and that that was handled in HAL.
It can probably work in the button handler code too, though.
Is this GladeVCP or PyVCP?
I looked at the file, and it is PyVCP.
It is rather easier to embed code to change behaviour in GladeVCP than in PyVCP.
I have code on my milling machine that disables an actual physical tool-release button (and turns off the button lamp) if the spindle is turning, but that is HAL logic.
Replied by andypugh on topic SPINDLE INDICATOR (3 STate)
When he clicks the pyvcp button... it pulls a routine... and I wasn't sure if the variable was passed one-time when the routine ran... or continuously.
I was imagining that the button was grayed-out when not available, and that that was handled in HAL.
It can probably work in the button handler code too, though.
I looked at the file, and it is PyVCP.
It is rather easier to embed code to change behaviour in GladeVCP than in PyVCP.
I have code on my milling machine that disables an actual physical tool-release button (and turns off the button lamp) if the spindle is turning, but that is HAL logic.
Last edit: 29 Sep 2015 16:00 by andypugh.
Please Log in or Create an account to join the conversation.
- Askjerry
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 313
- Thank you received: 35
29 Sep 2015 16:16 - 29 Sep 2015 16:23 #63187
by Askjerry
Replied by Askjerry on topic SPINDLE INDICATOR (3 STate)
I haven't wrapped my head around GLADE yet... still figuring out pyVCP.
Ok... I put in a very simple WHILE command... should work... but I keep getting a fail message...
bad character 'w' used .
I don't get it... the subroutine is trivial...
If I use this code...
I get...
bad character 'f' used .
It shouldn't be that difficult.
Ok... I put in a very simple WHILE command... should work... but I keep getting a fail message...
bad character 'w' used .
I don't get it... the subroutine is trivial...
( Custom Spindle Control Routine - FORWARD )
O <set-spindle-forward> sub
M05
#1 = #<_hal[pyvcp.spindle-speed]>
#2 = 100
WHILE [#1 GT #2] DO1
END1
M03 S500
O <set-spindle-forward> endsub
If I use this code...
O <set-spindle-forward> sub
M05
N100
#1 = #<_hal[pyvcp.spindle-speed]>
#2 = 100
IF [ #1 GT #2] GOTO 100
M03 S500
O <set-spindle-forward> endsub
I get...
bad character 'f' used .
It shouldn't be that difficult.
Last edit: 29 Sep 2015 16:23 by Askjerry.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23558
- Thank you received: 4858
29 Sep 2015 16:24 #63189
by andypugh
Replied by andypugh on topic SPINDLE INDICATOR (3 STate)
IF / WHILE / WEND / ENDIF all need an O-word label.
O101 WHILE ....
O200 IF .....
...
O200 ENDIF
O101 WEND
O101 WHILE ....
O200 IF .....
...
O200 ENDIF
O101 WEND
Please Log in or Create an account to join the conversation.
- Askjerry
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 313
- Thank you received: 35
29 Sep 2015 16:55 - 29 Sep 2015 16:58 #63195
by Askjerry
Replied by Askjerry on topic SPINDLE INDICATOR (3 STate)
Ok... I was lookin up this on another web page... they did NOT have the "o" in from of anything... perhaps MACH3 doesn't need it. (?)
Anyway... yeay... hit head with big enough hammer... get results...
Works like a champ... I don't have a mill here with a PHASE A output... so I ran my function generator to the input to simulate it slowing down... worked really nice!
I appreciate your patience with me.
Thanks,
Jerry
Anyway... yeay... hit head with big enough hammer... get results...
( Custom Spindle Control Routine - FORWARD )
O <set-spindle-forward> sub
M05
o100 while [#<_hal[pyvcp.spindle-speed]> GT 99]
o100 endwhile
M03 S500
O <set-spindle-forward> endsub
Works like a champ... I don't have a mill here with a PHASE A output... so I ran my function generator to the input to simulate it slowing down... worked really nice!
I appreciate your patience with me.
Thanks,
Jerry
Last edit: 29 Sep 2015 16:58 by Askjerry.
Please Log in or Create an account to join the conversation.
Time to create page: 0.077 seconds