Mesa 7i96 with SPINX1 to control spindle speed
- kbec
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 4
24 Feb 2022 15:12 #235707
by kbec
Replied by kbec on topic Mesa 7i96 with SPINX1 to control spindle speed
This is when the spindle should be running, you can see the changes:
Attachments:
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17907
- Thank you received: 4794
24 Feb 2022 15:37 - 24 Feb 2022 15:54 #235709
by PCW
Replied by PCW on topic Mesa 7i96 with SPINX1 to control spindle speed
The ini file PID values are incorrect for a spindle
They need to be what I posted before:
Oops never mind, I was looking at the wrong PID channel
but:
23 float IN 1 pid.1.command <== spindle-vel-cmd-rpm
The commanded RPM is 1!
You should probably set this to all least 1/2 speed (1400) for initial tests.
Also:
23 s32 RW 0 pid.1.do-pid-calcs.tmax
The 0 time means that there is a missing addf for pid1
The missing addf means the PID 1 output will be stuck at 0
They need to be what I posted before:
Oops never mind, I was looking at the wrong PID channel
but:
23 float IN 1 pid.1.command <== spindle-vel-cmd-rpm
The commanded RPM is 1!
You should probably set this to all least 1/2 speed (1400) for initial tests.
Also:
23 s32 RW 0 pid.1.do-pid-calcs.tmax
The 0 time means that there is a missing addf for pid1
The missing addf means the PID 1 output will be stuck at 0
Last edit: 24 Feb 2022 15:54 by PCW.
Please Log in or Create an account to join the conversation.
- kbec
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 4
24 Feb 2022 15:57 - 24 Feb 2022 15:58 #235712
by kbec
Replied by kbec on topic Mesa 7i96 with SPINX1 to control spindle speed
Here is another file with the speed increased a bit
23 float IN 301 pid.1.command <== spindle-vel-cmd-rpm
19 float OUT 301 spindle.0.speed-out ==> spindle-vel-cmd-rpm
19 float OUT 301 spindle.0.speed-out-abs ==> spindle-vel-cmd-rpm-abs
float 301 spindle-vel-cmd-rpm
float 301 spindle-vel-cmd-rpm-abs
19 float RO 301 motion.debug-float-0
That was just turning on before. It does increase when I press the + in LinuxCNC, but still no change in the value
29 float IN 0 hm2_7i96.0.pwmgen.00.value <== spindle-output
23 float IN 301 pid.1.command <== spindle-vel-cmd-rpm
19 float OUT 301 spindle.0.speed-out ==> spindle-vel-cmd-rpm
19 float OUT 301 spindle.0.speed-out-abs ==> spindle-vel-cmd-rpm-abs
float 301 spindle-vel-cmd-rpm
float 301 spindle-vel-cmd-rpm-abs
19 float RO 301 motion.debug-float-0
That was just turning on before. It does increase when I press the + in LinuxCNC, but still no change in the value
29 float IN 0 hm2_7i96.0.pwmgen.00.value <== spindle-output
Attachments:
Last edit: 24 Feb 2022 15:58 by kbec.
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17907
- Thank you received: 4794
24 Feb 2022 15:59 - 24 Feb 2022 16:01 #235714
by PCW
Replied by PCW on topic Mesa 7i96 with SPINX1 to control spindle speed
Yeah, that will stay at 0 until the missing addf is fixed:
addf pid.1.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
Last edit: 24 Feb 2022 16:01 by PCW.
Please Log in or Create an account to join the conversation.
- kbec
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 4
24 Feb 2022 16:03 #235716
by kbec
Replied by kbec on topic Mesa 7i96 with SPINX1 to control spindle speed
Any idea what the addf should look like? I can add manually and test it. Almost all the documentation is geared towards parallel port or drastically different cards and setups.
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17907
- Thank you received: 4794
24 Feb 2022 16:08 - 24 Feb 2022 16:08 #235717
by PCW
Replied by PCW on topic Mesa 7i96 with SPINX1 to control spindle speed
addf pid.1.do-pid-calcs servo-thread
Last edit: 24 Feb 2022 16:08 by PCW.
Please Log in or Create an account to join the conversation.
- kbec
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 4
24 Feb 2022 16:21 - 24 Feb 2022 16:22 #235719
by kbec
Replied by kbec on topic Mesa 7i96 with SPINX1 to control spindle speed
Makes sense, but didn't seem to fix anything. value is still at 0.
29 float IN 0 hm2_7i96.0.pwmgen.00.value <== spindle-output
29 float IN 0 hm2_7i96.0.pwmgen.00.value <== spindle-output
Attachments:
Last edit: 24 Feb 2022 16:22 by kbec.
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17907
- Thank you received: 4794
24 Feb 2022 16:26 - 24 Feb 2022 16:29 #235721
by PCW
Replied by PCW on topic Mesa 7i96 with SPINX1 to control spindle speed
looks like you have the spindle turned off:
23 bit IN FALSE pid.1.enable <== spindle-enable
or
net spindle-enable pid.1.enable
should be
net spindle-on pid.1.enable
23 bit IN FALSE pid.1.enable <== spindle-enable
or
net spindle-enable pid.1.enable
should be
net spindle-on pid.1.enable
Last edit: 24 Feb 2022 16:29 by PCW.
Please Log in or Create an account to join the conversation.
- kbec
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 4
24 Feb 2022 17:03 #235727
by kbec
Replied by kbec on topic Mesa 7i96 with SPINX1 to control spindle speed
Made this change
#net spindle-enable pid.1.enable
net spindle-on pid.1.enable
Now the value seems to be working. I will need to check my SPINX out, but at least the signals going in look like they are working now.
kirk@LinuxCNC1:~/linuxcnc/configs/spintest3$ halcmd getp hm2_7i96.0.pwmgen.00.value
0
kirk@LinuxCNC1:~/linuxcnc/configs/spintest3$ Issuing EMC_SPINDLE_ON -- ( +1304,+64, +62,1.000000,0.000000,0.000000, +1,)
halcmd getp hm2_7i96.0.pwmgen.00.value
1
kirk@LinuxCNC1:~/linuxcnc/configs/spintest3$ Issuing EMC_SPINDLE_INCREASE -- ( +1309,+40, +63,0.000000,)
Issuing EMC_SPINDLE_CONSTANT -- ( +1311,+40, +64,0.000000,)
halcmd getp hm2_7i96.0.pwmgen.00.value
101
Also attaching the latest hal file for BigJohnT to look at.
I think what fixed it to work was adding
addf pid.1.do-pid-calcs servo-thread
and the change for the enable
#net spindle-enable pid.1.enable
net spindle-on pid.1.enable
I do notice my direction LED comes on and doesn't turn off, whether enabled or not, is that kind of expected?
Thanks a bunch to both of you. John, once you have something else for me to test, just let mw know, I understand if it may take a little while.
#net spindle-enable pid.1.enable
net spindle-on pid.1.enable
Now the value seems to be working. I will need to check my SPINX out, but at least the signals going in look like they are working now.
kirk@LinuxCNC1:~/linuxcnc/configs/spintest3$ halcmd getp hm2_7i96.0.pwmgen.00.value
0
kirk@LinuxCNC1:~/linuxcnc/configs/spintest3$ Issuing EMC_SPINDLE_ON -- ( +1304,+64, +62,1.000000,0.000000,0.000000, +1,)
halcmd getp hm2_7i96.0.pwmgen.00.value
1
kirk@LinuxCNC1:~/linuxcnc/configs/spintest3$ Issuing EMC_SPINDLE_INCREASE -- ( +1309,+40, +63,0.000000,)
Issuing EMC_SPINDLE_CONSTANT -- ( +1311,+40, +64,0.000000,)
halcmd getp hm2_7i96.0.pwmgen.00.value
101
Also attaching the latest hal file for BigJohnT to look at.
I think what fixed it to work was adding
addf pid.1.do-pid-calcs servo-thread
and the change for the enable
#net spindle-enable pid.1.enable
net spindle-on pid.1.enable
I do notice my direction LED comes on and doesn't turn off, whether enabled or not, is that kind of expected?
Thanks a bunch to both of you. John, once you have something else for me to test, just let mw know, I understand if it may take a little while.
Attachments:
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
Less
More
- Posts: 7000
- Thank you received: 1172
24 Feb 2022 18:15 #235734
by BigJohnT
Replied by BigJohnT on topic Mesa 7i96 with SPINX1 to control spindle speed
My internet has been down all day. Anyway pid-1-do-calcs never got in the hal file. As soon as I get internet back up I'll push the fix. Using my phone for internet is painful lol.
JT
JT
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.090 seconds