- Posts: 224
- Thank you received: 0
Spindle control, three questions
2 years 7 months ago #295073
by slowpoke
Spindle control, three questions was created by slowpoke
I'm using a Mesa 7i95t with Axis.
I have a Mesa output wired to my VFD to start the spindle. When I issue a M3 S1000 command in MDI, the spindle output (forward) is enabled
At the moment I have a pot connected to the VFD for speed control. I prefer to manually set the speed with the pot instead of issuing S commands.
1) I see that F9 enables/disables the spindle when on the manual tab, the F9 key does not work when you move to the MDI tab
2) Is there a way to set the "S" value on power-up, or have it default to a value so I don't have to manually send a "S" command before enabling the spindle with a M3 command
3) Is there a way to trigger the Mesa spindle on output with an input signal to the Mesa board?
I have a Mesa output wired to my VFD to start the spindle. When I issue a M3 S1000 command in MDI, the spindle output (forward) is enabled
At the moment I have a pot connected to the VFD for speed control. I prefer to manually set the speed with the pot instead of issuing S commands.
1) I see that F9 enables/disables the spindle when on the manual tab, the F9 key does not work when you move to the MDI tab
2) Is there a way to set the "S" value on power-up, or have it default to a value so I don't have to manually send a "S" command before enabling the spindle with a M3 command
3) Is there a way to trigger the Mesa spindle on output with an input signal to the Mesa board?
Please Log in to join the conversation.
2 years 7 months ago #295074
by PCW
Replied by PCW on topic Spindle control, three questions
2. see:
linuxcnc.org/docs/stable/html/config/ini...sub:ini:sec:rs274ngc
3. Yes, you can connect the input to output (with any desired additional logic) in hal
linuxcnc.org/docs/stable/html/config/ini...sub:ini:sec:rs274ngc
Code:
RS274NGC_STARTUP_CODE section
3. Yes, you can connect the input to output (with any desired additional logic) in hal
Please Log in to join the conversation.
2 years 7 months ago #295094
by slowpoke
2) I added RS274NGC_STARTUP_CODE = S1000 to the [RS274NGC] section of
jeffs-knee1.var and that seems to do the trick. ......Thanks
3) For the I--> O control, I'm guessing I would be adding additional lines to io.hal, not main.hal is that correct?
If we assume:
If yes can you give an example or the correct syntax for the example in italics?
Much appreciated.
Replied by slowpoke on topic Spindle control, three questions
This sounds promising,2. see:
linuxcnc.org/docs/stable/html/config/ini...sub:ini:sec:rs274ngcCode:RS274NGC_STARTUP_CODE section 3. Yes, you can connect the input to output (with any desired additional logic) in hal
2) I added RS274NGC_STARTUP_CODE = S1000 to the [RS274NGC] section of
jeffs-knee1.var and that seems to do the trick. ......Thanks
3) For the I--> O control, I'm guessing I would be adding additional lines to io.hal, not main.hal is that correct?
If we assume:
- output 1 is the output to be controlled
- input 1 accepts a momentary signal to latch output 1 on, and
- input 2 accepts a momentary signal to reset or unlatch output 1
If yes can you give an example or the correct syntax for the example in italics?
Much appreciated.
Please Log in to join the conversation.
2 years 7 months ago #295100
by PCW
Replied by PCW on topic Spindle control, three questions
Something like this:
# load the flipflop component and add it to the servo thread
loadrt flipflop
addf flipflop.0 servo-thread
# we want the set/reset inputs to be slow and well filtered
setp hm2_7i95.0.inm.00.input-01-slow true
setp hm2_7i95.0.inm.00.input-02-slow true
# connect up the flip flop
net set-spindle-on hm2_7i95.0.inm.00.input-01 flipflop.0.set
net set-spindle-off hm2_7i95.0.inm.00.input-02 flipflop.0.reset
net spindle-on flipflop.0.out hm2_7i95.0.ssr.00.out-00
# load the flipflop component and add it to the servo thread
loadrt flipflop
addf flipflop.0 servo-thread
# we want the set/reset inputs to be slow and well filtered
setp hm2_7i95.0.inm.00.input-01-slow true
setp hm2_7i95.0.inm.00.input-02-slow true
# connect up the flip flop
net set-spindle-on hm2_7i95.0.inm.00.input-01 flipflop.0.set
net set-spindle-off hm2_7i95.0.inm.00.input-02 flipflop.0.reset
net spindle-on flipflop.0.out hm2_7i95.0.ssr.00.out-00
Please Log in to join the conversation.
2 years 7 months ago #295156
by slowpoke
When I attempt to start Axis, I'm greeted with the following error. (see attached)
I'm happy to do a bit of reading on hal to be less in the dark, there are numerous documents any suggestions on the best one for me to read or if there is something obvious from the debug information please advise.
Replied by slowpoke on topic Spindle control, three questions
I tried the preceding in both io.hal as well as main.halSomething like this:
# load the flipflop component and add it to the servo thread
loadrt flipflop
addf flipflop.0 servo-thread
# we want the set/reset inputs to be slow and well filtered
setp hm2_7i95.0.inm.00.input-01-slow true
setp hm2_7i95.0.inm.00.input-02-slow true
# connect up the flip flop
net set-spindle-on hm2_7i95.0.inm.00.input-01 flipflop.0.set
net set-spindle-off hm2_7i95.0.inm.00.input-02 flipflop.0.reset
net spindle-on flipflop.0.out hm2_7i95.0.ssr.00.out-00
When I attempt to start Axis, I'm greeted with the following error. (see attached)
I'm happy to do a bit of reading on hal to be less in the dark, there are numerous documents any suggestions on the best one for me to read or if there is something obvious from the debug information please advise.
Attachment not found
Attachment not found
Please Log in to join the conversation.
2 years 7 months ago #295158
by PCW
Replied by PCW on topic Spindle control, three questions
Sorry forgot the 7I95 uses inmux not inm.
# load the flipflop component and add it to the servo thread
loadrt flipflop
addf flipflop.0 servo-thread
# we want the set/reset inputs to be slow and well filtered
setp hm2_7i95.0.inmux.00.input-01-slow true
setp hm2_7i95.0.inmux.00.input-02-slow true
# connect up the flip flop
net set-spindle-on hm2_7i95.0.inmux.00.input-01 flipflop.0.set
net set-spindle-off hm2_7i95.0.inmux.00.input-02 flipflop.0.reset
net spindle-on flipflop.0.out hm2_7i95.0.ssr.00.out-00
The permissions error is not related to this, that's often a LinuxCNC installation/build issue
# load the flipflop component and add it to the servo thread
loadrt flipflop
addf flipflop.0 servo-thread
# we want the set/reset inputs to be slow and well filtered
setp hm2_7i95.0.inmux.00.input-01-slow true
setp hm2_7i95.0.inmux.00.input-02-slow true
# connect up the flip flop
net set-spindle-on hm2_7i95.0.inmux.00.input-01 flipflop.0.set
net set-spindle-off hm2_7i95.0.inmux.00.input-02 flipflop.0.reset
net spindle-on flipflop.0.out hm2_7i95.0.ssr.00.out-00
The permissions error is not related to this, that's often a LinuxCNC installation/build issue
Please Log in to join the conversation.
2 years 7 months ago #295166
by slowpoke
Replied by slowpoke on topic Spindle control, three questions
PCW,
Working, thank you again!
From the comments at the top of io.hal, is it correct to assume if I use MesaCT again, I will need to append these changes to the io.hal that MesaCT will generate?
I had to comment out the original output...
net spindle-cw spindle.0.forward => hm2_7i95.0.ssr.00.out-00
I will always start the spindle manually with this new push button, it would be nice to still have the M5 command stop the spindle when issued. Is it possible to "OR" the original M5 stop spindle command with my new push flip-flop reset button, so either one will initiate a stop?
Much appreciated.
Working, thank you again!
From the comments at the top of io.hal, is it correct to assume if I use MesaCT again, I will need to append these changes to the io.hal that MesaCT will generate?
I had to comment out the original output...
net spindle-cw spindle.0.forward => hm2_7i95.0.ssr.00.out-00
I will always start the spindle manually with this new push button, it would be nice to still have the M5 command stop the spindle when issued. Is it possible to "OR" the original M5 stop spindle command with my new push flip-flop reset button, so either one will initiate a stop?
Much appreciated.
Please Log in to join the conversation.
Time to create page: 0.088 seconds
