motion.analog-out-00 Scaling M68 output with Pot on 7i76e
- prcdslnc13
- Offline
- Junior Member
-
Less
More
- Posts: 25
- Thank you received: 0
13 Nov 2020 19:24 #189242
by prcdslnc13
Scaling M68 output with Pot on 7i76e was created by prcdslnc13
I have a setup where I need to re-map the spindle analog output on the 7i76e to a standard analog out so that I can change my output with M68 and not break corner rounding (basically the process cant stop, but I need to be able to change a pump speed on the fly)
I currently have a hal file working with M68 outputting the expected voltage, But this breaks some of the current tuning workflow we use. Basically nothing about this is an exact science yet, so the operators were playing with the "spindle speed" sliders until the pump was just right and then the process went a long from there.
I need to give them a way to tweak M68's output on the fly and I think a good way is with scaling its output through a pot.
Ive been trying multiple ways I've found on the forum to scale something like feed rate in an attempt to understand what I'd need to do, but so far I've not had much success.
below are my hal files for current state.
I currently have a hal file working with M68 outputting the expected voltage, But this breaks some of the current tuning workflow we use. Basically nothing about this is an exact science yet, so the operators were playing with the "spindle speed" sliders until the pump was just right and then the process went a long from there.
I need to give them a way to tweak M68's output on the fly and I think a good way is with scaling its output through a pot.
Ive been trying multiple ways I've found on the forum to scale something like feed rate in an attempt to understand what I'd need to do, but so far I've not had much success.
below are my hal files for current state.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18534
- Thank you received: 5080
13 Nov 2020 20:31 #189252
by PCW
Replied by PCW on topic motion.analog-out-00 Scaling M68 output with Pot on 7i76e
You could add a scale component with its gain pin connected
a 7i76 analog input hal pin. and input connected to motion.analog-out-00
a 7i76 analog input hal pin. and input connected to motion.analog-out-00
Please Log in or Create an account to join the conversation.
- prcdslnc13
- Offline
- Junior Member
-
Less
More
- Posts: 25
- Thank you received: 0
13 Nov 2020 21:37 #189258
by prcdslnc13
Replied by prcdslnc13 on topic motion.analog-out-00 Scaling M68 output with Pot on 7i76e
Ok. I think I am close, but I am definitely not right. Any help here would be awesome.
Here is where I am at. I will be digging more into this tonight most likely.
Here is where I am at. I will be digging more into this tonight most likely.
# Pump speed control setup
loadrt conv_float_s32 count=2
loadrt scale names=pump-scale
addf pump-scale servo-thread
addf conv-float-s32.0 servo-thread
net pump_analog hm2_7i76e.0.7i76.0.0.analogin0 => pump-scale.in
net pump-override-convert pump-scale.out conv-float-s32.0.in
setp pump-scale.gain conv-float-s32.0.out
#change spindle analog output to manual analog out - JMS
net pump-scale.in pump_speed
net pump_speed motion.analog-out-00 => hm2_7i76e.0.7i76.0.0.spinout
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18534
- Thank you received: 5080
14 Nov 2020 00:18 - 14 Nov 2020 00:19 #189279
by PCW
Replied by PCW on topic motion.analog-out-00 Scaling M68 output with Pot on 7i76e
I was thinking more something like this:
# Pump speed control setup
loadrt scale names=pump-scale
addf pump-scale servo-thread
setp hm2_7i76e.0.7i76.0.0.analogin0-scalemax 2
net pump_override hm2_7i76e.0.7i76.0.0.analogin0 pump-scale.gain
net pump_gcode_speed motion.analog-out-00 pump-scale.in
net pump_speed pump-scale.out hm2_7i76e.0.7i76.0.0.spinout
# Pump speed control setup
loadrt scale names=pump-scale
addf pump-scale servo-thread
setp hm2_7i76e.0.7i76.0.0.analogin0-scalemax 2
net pump_override hm2_7i76e.0.7i76.0.0.analogin0 pump-scale.gain
net pump_gcode_speed motion.analog-out-00 pump-scale.in
net pump_speed pump-scale.out hm2_7i76e.0.7i76.0.0.spinout
Last edit: 14 Nov 2020 00:19 by PCW.
Please Log in or Create an account to join the conversation.
- prcdslnc13
- Offline
- Junior Member
-
Less
More
- Posts: 25
- Thank you received: 0
14 Nov 2020 03:33 #189288
by prcdslnc13
Replied by prcdslnc13 on topic motion.analog-out-00 Scaling M68 output with Pot on 7i76e
YESSSS this is it. THANK YOU. Ive spent two days trying to figure this out.
Off topic. Is there somewhere that has a bunch of hal examples of things like this?
Im looking for simple things like putting pots on feed and speeds that can help me understand loadrt, setp and net better.
Off topic. Is there somewhere that has a bunch of hal examples of things like this?
Im looking for simple things like putting pots on feed and speeds that can help me understand loadrt, setp and net better.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18534
- Thank you received: 5080
14 Nov 2020 04:35 - 14 Nov 2020 04:35 #189290
by PCW
Replied by PCW on topic motion.analog-out-00 Scaling M68 output with Pot on 7i76e
Last edit: 14 Nov 2020 04:35 by PCW.
Please Log in or Create an account to join the conversation.
- prcdslnc13
- Offline
- Junior Member
-
Less
More
- Posts: 25
- Thank you received: 0
14 Nov 2020 18:00 #189354
by prcdslnc13
Replied by prcdslnc13 on topic motion.analog-out-00 Scaling M68 output with Pot on 7i76e
Yea, that's exactly what I'm looking for lol. Had no idea it existed. Thank you.
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.066 seconds