Spinx1 to 7i85

More
29 Nov 2015 21:05 - 29 Nov 2015 21:06 #66053 by andypugh
Replied by andypugh on topic Spinx1 to 7i85

I'm having trouble with the net spindle-pwm line and the enable out to the gpio.018 below it.


You can only connect one thing to hm2_5i25.0.pwmgen.00.value and you have already connected it to spindle-cmd-abs in the line above.

"net spindle-pwmgen.00.enable => hm2_5i25.0.gpio.018.out"

That HAL line will create a signal called "spindle-pwmgen.00.enable " which might not be what you want, but shouldn't be an error.

There isn't an enable in the original HAL file. You probably need to add an OR component to enable the SPINX1 if either orient-mode or velocity-mode is active:

Don't just blindly add this, it is a modification of some existing code:
# this switches modes
loadrt or2 count=1
addf or2.0 servo-thread
net orient-mode      motion.spindle-orient orient.0.enable pid.1.enable mux2.0.sel or2.0.in0
net velocity-mode    motion.spindle-on pid.0.enable or2.0.in1
net spindle-enable   or2.0.out  => hm2_5i20.0.pwmgen.00.enable    hm2_5i20.0.gpio.018.out
Last edit: 29 Nov 2015 21:06 by andypugh.

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

More
29 Nov 2015 21:12 - 30 Nov 2015 15:53 #66055 by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Andy,

The gpio.018.out , I just added it to the net velocity-mode line and the spinx enables now. The invert pin stuff is all good, and it enables now. I get rotation now but only CW dir, regardless of M03 or M04.

Peter,
Thanks for catching my rps error. I'm having a senior moment lol

The spindle right now has a super slow ramp up. so I need to look at the pid?
The M19 mode is not working yet
Last edit: 30 Nov 2015 15:53 by OT-CNC. Reason: rps

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

More
29 Nov 2015 21:19 #66057 by andypugh
Replied by andypugh on topic Spinx1 to 7i85

The gpio.018.out , I just added it to the net velocity-mode line and the spinx enables now. The invert pin stuff is all good, and it enables now. I get rotation now but only CW dir, regardless of M03 or M04.


if you look at the original code there was this:
# net spindle-fwd abs.0.is-positive parport.0.pin-NN-out
# net spindle-rev abs.0.is-negative parport.0.pin-NN-out

You need to connect those to the direction pins of the Spinx1

The spindle right now has a super slow ramp up. so I need to look at the pid?

Yes, start by modifying the FF0 term. You might be able to do this "live" from the machine-calibration menu item.
Once FF0 gives you the right speed, then look at the Igain.

[/quote]The M19 mode is not working yet[/quote]
That is because you are only enabling the SPINX1 in velocity-mode. That is why you need the or2 component.

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

More
29 Nov 2015 21:57 #66060 by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85

if you look at the original code there was this:
# net spindle-fwd abs.0.is-positive parport.0.pin-NN-out
# net spindle-rev abs.0.is-negative parport.0.pin-NN-out

I'm trying to pick the cw/ccw from your earlier code: setp hm2_5i25.0.pwgen.00.output-type 1 and the line below setp hm2_5i25.0.gpio.002.invert_output 1. I was trying to add the gpio.002 to the net spindle-fwd/rev but it errors out.
net spindle-rev abs.0.is-negative hm2_5i25.0.gpio.002.out-true, whats the proper ending for both?
Or is it better to have 2 pins linked? The way we had it, cw is always on.

You might be able to do this "live" from the machine-calibration menu item.

I only see x,y,z calibration menus. Is possible to get both spindle calibrations pid screens up?

/quote]The M19 mode is not working yet

That is because you are only enabling the SPINX1 in velocity-mode. That is why you need the or2 component.[/quote]

Understood. I type slow so I didn't see your response in time

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

More
29 Nov 2015 23:33 #66066 by andypugh
Replied by andypugh on topic Spinx1 to 7i85
Thinking further, I have been giving somewhat bad advice, I suspect.

There is another very long thread about the Spinx1 (parallel port config) and I keep mixing the two up.

Because you are using a Mesa card there is already a direction pin on the pwmgen. You should use this to drive the SPINX1 direction input.

The reason it isn't working is the abs function. Get rid of that, net the spindle-cmd directly to the pwmgen, and negative values will set the direction output of the pwmgen.

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

More
30 Nov 2015 01:24 #66076 by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Thanks Andy. I will get rid of the abs function tomorrow.

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

More
30 Nov 2015 16:14 #66112 by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Getting closer! CW/CCW works Somehow my spindle wants to ramp up to full rpm, regardless of S values set, same with m19. My RPS scale number is 60.
I tried changing encoder value to neg in case it's a runaway. No change.
Encoder hal cofig shows the values for counting, vel, rawlatch, rawcounts, position, position-latched (0) and count latched (0).
Anything else missing before I get back to PID??

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

More
30 Nov 2015 17:02 - 30 Nov 2015 17:02 #66116 by andypugh
Replied by andypugh on topic Spinx1 to 7i85

Getting closer! CW/CCW works Somehow my spindle wants to ramp up to full rpm, regardless of S values set, same with m19. My RPS scale number is 60.


Have a look at PID command, feedback and error when that is happening.

This is probably a PID runaway of some sort. Does the encoder read positive and negative velocities correctly?
Last edit: 30 Nov 2015 17:02 by andypugh.

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

More
30 Nov 2015 17:19 #66118 by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Velocity is neg when I spin the spindle manually CW. Oddly it's still neg when I make the encoder scale value opposite in the ini.

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

More
30 Nov 2015 17:27 #66120 by andypugh
Replied by andypugh on topic Spinx1 to 7i85

Velocity is neg when I spin the spindle manually CW. Oddly it's still neg when I make the encoder scale value opposite in the ini.


Is the HAL actually reading the scale from the INI?

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

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