Spinx1 to 7i85
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
12 Nov 2015 00:21 #65153
by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Interesting. I do see the + and - for the spindle direction under motion but I dont see the status of the spinx cw led change. I can assign a pin to cw and the led changes.
Please Log in or Create an account to join the conversation.
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
12 Nov 2015 15:46 #65156
by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Spindle works, well sort of.
VFD is hooked up now and I get cw and ccw rotation but the pwm is not varying the spindle speed.
I have checked the physical connections on the 7i85 , TX6 and TX7 and tried different combinations on that connector.
I used a separate gpio for the cw/ccw to get the dir to work.
I'm assuming the pwm pin seems to go high or off based on how the spindle responds. I get 60hz (on the vfd display) when commanded to spin at 100 rpm or 3000rpm.
At 0 rpm its off. Currently the vfd is set internally at 60hz max rpm for testing.
The potentiometer connections should be correct as I had a pot installed prior for testing and that varied the rpm just fine.
Somewhere in hal I don't remember where, the pwm was at 5000 and a pdm number came up at 20000 . I don't have a pdm component set. Any issues with that?
Am I missing something in the hal or ini??
Not sure how to proceed
VFD is hooked up now and I get cw and ccw rotation but the pwm is not varying the spindle speed.
I have checked the physical connections on the 7i85 , TX6 and TX7 and tried different combinations on that connector.
I used a separate gpio for the cw/ccw to get the dir to work.
I'm assuming the pwm pin seems to go high or off based on how the spindle responds. I get 60hz (on the vfd display) when commanded to spin at 100 rpm or 3000rpm.
At 0 rpm its off. Currently the vfd is set internally at 60hz max rpm for testing.
The potentiometer connections should be correct as I had a pot installed prior for testing and that varied the rpm just fine.
Somewhere in hal I don't remember where, the pwm was at 5000 and a pdm number came up at 20000 . I don't have a pdm component set. Any issues with that?
Am I missing something in the hal or ini??
Not sure how to proceed
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
12 Nov 2015 15:57 #65159
by andypugh
Replied by andypugh on topic Spinx1 to 7i85
What is your PWM scale? It needs to be set to the rpm that happens at 10V output.
What does S 0.1 give you?
What does S 0.1 give you?
Please Log in or Create an account to join the conversation.
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
12 Nov 2015 16:00 #65160
by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Scale is set for 3500rpm at 10v.
I'll check what .1 gives. At S1, I get full rpm
I'll check what .1 gives. At S1, I get full rpm
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
12 Nov 2015 16:22 #65161
by andypugh
Do you have an oscilloscope? Can you check that the PWM bit is actually wiggling?
Replied by andypugh on topic Spinx1 to 7i85
Scale is set for 3500rpm at 10v.
I'll check what .1 gives. At S1, I get full rpm
Do you have an oscilloscope? Can you check that the PWM bit is actually wiggling?
Please Log in or Create an account to join the conversation.
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
12 Nov 2015 20:35 #65186
by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Checked it with a scope. PWM is active on what I had as dir. PWM now is on TX6 and the dir change is on /TX7.
I also added :
net spindle-enable => hm2_5i25.0.pwmgen.00.enable. That seems to work!
The only thing wrong now is the pwm is reversed? meaning if I type S1000, it goes faster than when I type S3000. The spindle speed override slider acts in reverse also which is expected when the signal is reversed.
I tried to change the output scale to - in the ini file but that didn't reverse the output.
Just to clarify the cw/ccw is correct. It's the speed that's reversed. How do I correct that.
Thanks!!
I also added :
net spindle-enable => hm2_5i25.0.pwmgen.00.enable. That seems to work!
The only thing wrong now is the pwm is reversed? meaning if I type S1000, it goes faster than when I type S3000. The spindle speed override slider acts in reverse also which is expected when the signal is reversed.
I tried to change the output scale to - in the ini file but that didn't reverse the output.
Just to clarify the cw/ccw is correct. It's the speed that's reversed. How do I correct that.
Thanks!!
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
12 Nov 2015 20:42 - 12 Nov 2015 20:44 #65188
by andypugh
That's bizarre. One possibility is that you have it wired incorrectly, so it is active-low.
If you are _sure_ that the wiring is correct (and the scope will answer that question) then you can invert the output pin
setp hm2_5i25.0.gpio.NNN.invert-output 1
This is all my fault. For some reason I earlier told you to invert the output.
setp hm2_5i25.0.gpio.017.invert_output 0
Replied by andypugh on topic Spinx1 to 7i85
The only thing wrong now is the pwm is reversed?
That's bizarre. One possibility is that you have it wired incorrectly, so it is active-low.
setp hm2_5i25.0.gpio.NNN.invert-output 1
This is all my fault. For some reason I earlier told you to invert the output.
setp hm2_5i25.0.gpio.017.invert_output 0
Last edit: 12 Nov 2015 20:44 by andypugh.
Please Log in or Create an account to join the conversation.
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
12 Nov 2015 20:50 #65189
by OT-CNC
I will try that but wasn't that just for the enable? How does that change the pwm signal?
Replied by OT-CNC on topic Spinx1 to 7i85
setp hm2_5i25.0.gpio.017.invert_output 0
I will try that but wasn't that just for the enable? How does that change the pwm signal?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
12 Nov 2015 20:59 #65190
by andypugh
Ah, was it?
In that case, no, that isn't what you want.
Look in the dmesg output, find out what pin the PWM is on, then invert that one the same way.
Replied by andypugh on topic Spinx1 to 7i85
I will try that but wasn't that just for the enable? How does that change the pwm signal?
Ah, was it?
In that case, no, that isn't what you want.
Look in the dmesg output, find out what pin the PWM is on, then invert that one the same way.
The following user(s) said Thank You: OT-CNC
Please Log in or Create an account to join the conversation.
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
12 Nov 2015 21:27 - 12 Nov 2015 21:28 #65191
by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Awwsome! That did the trick!
I will have more questions I'm sure as my goal is to get closed loop spindle to work but that's for later....
Thank you Andy and PCW for your help!
I will have more questions I'm sure as my goal is to get closed loop spindle to work but that's for later....
Thank you Andy and PCW for your help!
Last edit: 12 Nov 2015 21:28 by OT-CNC. Reason: left out pcw!!!
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.759 seconds