Understaning PWM
- hairyMug
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 3
12 Jul 2021 22:28 - 12 Jul 2021 22:37 #214438
by hairyMug
Replied by hairyMug on topic Understaning PWM
this does not sound right...
First of all, I see no capability in the pncconfig tool for specifying a + & - for an output...
Is this available as a HAL command?
Also, why would the + be connected to the SPINX enable? if it should be LOW to enable?
...I'm just not getting it...
the light just came on... sso connects the enable to ground...
First of all, I see no capability in the pncconfig tool for specifying a + & - for an output...
Is this available as a HAL command?
Also, why would the + be connected to the SPINX enable? if it should be LOW to enable?
...I'm just not getting it...
the light just came on... sso connects the enable to ground...
Last edit: 12 Jul 2021 22:37 by hairyMug.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17974
- Thank you received: 4831
12 Jul 2021 22:44 #214442
by PCW
Replied by PCW on topic Understaning PWM
Yes, its just a switch
( A polarized switch so the most positive signal must connect to OUTN+ )
( A polarized switch so the most positive signal must connect to OUTN+ )
Please Log in or Create an account to join the conversation.
- hairyMug
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 3
13 Jul 2021 00:02 #214457
by hairyMug
Replied by hairyMug on topic Understaning PWM
ok... still have the issue of no speed control; it's off or full speed, 24000 rpm...
and I did a dump of the pin-outs and the two pins are :
pin 25:
Primary Tag: 0x03 (IOPort)
Secondary Pin: 0x81 (PWM, Output)
pin 26:
Primary Tag: 0x03 (IOPort)
Secondary Pin: 0x82 (Dir, Output)
I would not expect them to be one after another? since they are supposed to be step+ and dir+
Something does not add up
and I did a dump of the pin-outs and the two pins are :
pin 25:
Primary Tag: 0x03 (IOPort)
Secondary Pin: 0x81 (PWM, Output)
pin 26:
Primary Tag: 0x03 (IOPort)
Secondary Pin: 0x82 (Dir, Output)
I would not expect them to be one after another? since they are supposed to be step+ and dir+
Something does not add up
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17974
- Thank you received: 4831
13 Jul 2021 02:15 - 13 Jul 2021 02:20 #214472
by PCW
Replied by PCW on topic Understaning PWM
They are sequential
Is the PWM scale set to 24000?
PWM is active high. If you have the SPINX1 PWM signal connected to TB2 pin3 (STEP4+) , PWM should be 0 when the commanded spindle speed is 0. You should verify this with a voltmeter. (the voltmeter will read the average so should read
0V on STEP4+ at 0 PWM, about 2.5V at 50% PWM and about 5V at100% PWM.
The SPV voltage relative to SP- should track these voltages (scaled up by the 10V or so between SP+ and SP-)
Is the PWM scale set to 24000?
PWM is active high. If you have the SPINX1 PWM signal connected to TB2 pin3 (STEP4+) , PWM should be 0 when the commanded spindle speed is 0. You should verify this with a voltmeter. (the voltmeter will read the average so should read
0V on STEP4+ at 0 PWM, about 2.5V at 50% PWM and about 5V at100% PWM.
The SPV voltage relative to SP- should track these voltages (scaled up by the 10V or so between SP+ and SP-)
Last edit: 13 Jul 2021 02:20 by PCW.
Please Log in or Create an account to join the conversation.
- hairyMug
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 3
13 Jul 2021 10:09 #214526
by hairyMug
Replied by hairyMug on topic Understaning PWM
Mystery Solved!
Thank you SO MUCH!
I looked at the pins and realized I was using Stepper#3... DUH
Now that I use #4, I just need to tweak the scale and it should be good to go.
What a "learning experience"
Thank you SO MUCH!
I looked at the pins and realized I was using Stepper#3... DUH
Now that I use #4, I just need to tweak the scale and it should be good to go.
What a "learning experience"
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
13 Jul 2021 16:49 #214616
by andypugh
Replied by andypugh on topic Understaning PWM
You learned that geeks have nine fingers: finger zero, finger one....What a "learning experience"
Please Log in or Create an account to join the conversation.
- hairyMug
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 3
13 Jul 2021 17:53 #214629
by hairyMug
Replied by hairyMug on topic Understaning PWM
I R A GEEK! (from the Windows world)
>> this HAL programming SCREAMS for a pre-compiler to translate "normal" programming to "HAL-speak"...
It's almost like going back to C++ from C#!
In any case, I will post a topic with my files to maybe help another poor soul...
Thanks All for your help!
>> this HAL programming SCREAMS for a pre-compiler to translate "normal" programming to "HAL-speak"...
It's almost like going back to C++ from C#!
In any case, I will post a topic with my files to maybe help another poor soul...
Thanks All for your help!
Please Log in or Create an account to join the conversation.
Time to create page: 0.072 seconds