Spindle control, three questions

More
03 Mar 2024 19:00 #295073 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?





 

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

More
03 Mar 2024 19:15 #295074 by PCW
2. see:
linuxcnc.org/docs/stable/html/config/ini...sub:ini:sec:rs274ngc
RS274NGC_STARTUP_CODE section

3. Yes, you can connect the input to output (with any desired additional logic) in hal

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

More
03 Mar 2024 22:35 #295094 by slowpoke

2. see:
linuxcnc.org/docs/stable/html/config/ini...sub:ini:sec:rs274ngc
RS274NGC_STARTUP_CODE section

3. Yes, you can connect the input to output (with any desired additional logic) in hal
 

This sounds promising,

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
Is it possible to to that by simply adding a few lines to the hal file or is that overly optimistic?
If yes can you give an example or the correct syntax for the example in italics?

Much appreciated.
 

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

More
04 Mar 2024 00:22 - 04 Mar 2024 00:26 #295100 by PCW
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
Last edit: 04 Mar 2024 00:26 by PCW.
The following user(s) said Thank You: tommylight, slowpoke

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

More
04 Mar 2024 18:49 - 04 Mar 2024 18:50 #295156 by slowpoke

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
 

 

I tried the preceding in both io.hal as well as main.hal
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.
 
Attachments:
Last edit: 04 Mar 2024 18:50 by slowpoke.

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

More
04 Mar 2024 18:55 - 04 Mar 2024 18:56 #295158 by PCW
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
Last edit: 04 Mar 2024 18:56 by PCW.
The following user(s) said Thank You: slowpoke

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

More
04 Mar 2024 22:19 #295166 by slowpoke
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.

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

Time to create page: 0.130 seconds
Powered by Kunena Forum