Mesa 7i96 with SPINX1 to control spindle speed

More
23 Feb 2022 02:17 #235579 by PCW
Did you set a high spindle speed?

The stepgen errors are because you set too wide step pulses for the
requested step rate (the requested step rate is physically
impossible without violating your specified timing)

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

More
23 Feb 2022 05:58 #235581 by kbec
I think that is coming from my XAxis stepgen which I am not concerned about. I just am trying to get the spindle working with the encoder. In the spindle section I have it set from 70RMP to 2800.

[SPINDLE]
OUTPUT_TYPE = 1
SCALE = 2800
PWM_FREQUENCY = 5000
MAX_RPM = 2800
MIN_RPM = 70
DEADBAND = 0
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
MAX_ERROR = 0

I am trying to just focus on the one thing at the moment. I usually create my config with the pmcconf tool, but I didn't think it could handle the PWM firmware, so I used the 7i96 one.

You also said set scale to 2800, I thought that was for the encoder, that is why I had it at 1600.

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

More
23 Feb 2022 12:26 #235596 by BigJohnT

The PWM frequency should be set to 5 KHz in the utility

If you dont get PWM output, it would probably be best to
post your hal file here to see where the issue lies..
 

Default PWM frequency has been fixed.

JT

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

More
23 Feb 2022 12:39 #235599 by BigJohnT

Ahh, I think Johns utility has an additional hal file for connections
perhaps io.hal? I would need to see that also

Here are some needed changes in the SPINDLE section of the ini file:

[SPINDLE]
OUTPUT_TYPE = 1
SCALE = 2800
PWM_FREQUENCY = 5000
MAX_RPM = 2800
MIN_RPM = 70
DEADBAND = 0
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
MAX_ERROR = 0

And at minimum in the hal file, replace:

net spindle-vel-cmd-rpm => pid.1.command

with

net spindle-vel-cmd-rpm-abs => pid.1.command
 

 

All these items have been fixed as well.

Thanks
JT

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

More
23 Feb 2022 13:16 #235602 by BigJohnT
I think I have all the issues fixed and have pushed a new deb.
What should setp pid.3.maxoutput [SPINDLE]MAX_OUTPUT be?

gnipsel.com/mesa/7i96/install.html

Thanks for the help on the spindle section.
JT
Attachments:

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

More
23 Feb 2022 13:18 #235603 by BigJohnT

Step4+ to 7I96 PWM, Dir4+ to Dir

Also I was wrong about

net spindle-vel-cmd-rpm => pid.1.command

Thats correct because the PWM sign determines the direction output


 

And this has been unfixed!

JT

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

More
23 Feb 2022 13:21 #235604 by kbec
I have an appointment to go to but will try later today and let you know how things work out.

Are the settings for the encoder under the spindle tab?

The other issue was my configuration settings are not loading in when I load my file.

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

More
23 Feb 2022 14:15 #235606 by BigJohnT
Yes the encoder count is on the spindle tab and I think I fixed all the items not getting loaded when you open the ini file.

Thanks for testing and feedback.

JT
The following user(s) said Thank You: tommylight

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

More
23 Feb 2022 17:01 #235628 by kbec
The configuration information still isn't coming in when the ini loads for me.
I am also getting the quotes error on the line

I fixed this one, but this is the line:
loadrt [HOSTMOT2](DRIVER) board_ip=[HOSTMOT2](IPADDRESS) config="num_stepgens=[HOSTMOT2](STEPGENS) num_encoders=[HOSTMOT2](ENCODERS) num_pwmgens=[HOSTMOT2](PWMS) "

Also, this setp line keeps having two in it.
setp setp hm2_7i96.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY

Here is the surrounding parts, maybe a value is missing and picking up the next line.

setp pid.1.error-previous-target true
setp setp hm2_7i96.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY
setp hm2_7i96.0.pwmgen.00.scale [SPINDLE]SCALE

Also, the line in the io.hal tries to redo something I think is in the hal, unless I comment that out, Linux CNC crashes.

You're more than welcome on the testing and feedback. I wish I knew Python better, but I don't. I'm happy to do what I can to assist.

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

More
23 Feb 2022 19:24 - 23 Feb 2022 19:25 #235639 by BigJohnT
Post your ini file and the error.
JT
Last edit: 23 Feb 2022 19:25 by BigJohnT.

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

Moderators: PCWjmelson
Time to create page: 0.166 seconds
Powered by Kunena Forum