Mesa 7i96 with SPINX1 to control spindle speed

More
4 years 8 months ago #235707 by kbec
This is when the spindle should be running, you can see the changes:
 

Attachment not found

Please Log in to join the conversation.

More
4 years 8 months ago #235709 by PCW
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

 

Please Log in to join the conversation.

More
4 years 8 months ago #235712 by kbec
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

Attachment not found



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

Please Log in to join the conversation.

More
4 years 8 months ago #235714 by PCW
Yeah, that will stay at 0 until the missing addf is fixed:

addf pid.1.do-pid-calcs servo-thread

Please Log in to join the conversation.

More
4 years 8 months ago #235716 by kbec
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 to join the conversation.

More
4 years 8 months ago #235717 by PCW
addf pid.1.do-pid-calcs servo-thread

Please Log in to join the conversation.

More
4 years 8 months ago #235719 by kbec
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

 

Attachment not found


 

Attachment not found

Please Log in to join the conversation.

More
4 years 8 months ago #235721 by PCW
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

Please Log in to join the conversation.

More
4 years 8 months ago #235727 by kbec
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. 
 

Attachment not found



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.

 

Please Log in to join the conversation.

More
4 years 8 months ago #235734 by BigJohnT
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

Please Log in to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum