In addition to the above, if the outputs of the offset component are 
correct, the only thing you should really adjust is the  
"hpg.pwmgen.00.out.00.scale [SPINDLE]PWM_OUTPUT_SCALE"

It should be scaled correctly as is however there may be some delays or 
inconsistencies of the PWM between the BBB and the cape. Again, first 
verify that the component values I listed above look as they should, then I 
would focus on making sure at 0 RPM that the cape is outputting 50%. Also 
keep in mind that most multimeters cannot measure PWM correctly, what kind 
of meter are you using? 

Your dac may not like the PWM frequency it is receiving either changing 
hpg.pwmgen.00.out.00.pwm_period [SPINDLE]PWM_PERIOD might help that. 

I would certainly be using a scope to verify the PWM in this case, there's 
just too much going on here.


On Wednesday, January 1, 2020 at 1:50:42 PM UTC-5, justin White wrote:
>
> Do you have your motor hooked up, attached to the spindle and your encoder 
> installed and wired in? If not why are you worried about adjusting the PID? 
> you are chasing your tail here. First I have to ask, do you understand that 
> the PID is trying to close the control loop but without having a motor for 
> it to control and an encoder or something feeding back to it it can't do 
> anything right. It's like driving a car with your eyes closed, you probably 
> won't make it to where you are trying to go.........
>
> So why are you adjusting the PID? It's there in the config because you *WILL 
> *be using it later, but whatever you do right now with it is going to be 
> erroneous.
>
> If you just want to play with the stuff you have then disconnect the pid 
> from the config. 
>
> if at full speed reverse (request -3300rpm) "motion.spindle-speed-out-rps" 
> pin is at ~-55, then don't mess with the offset, you'll be defeating the 
> purpose of it. If you want to play with it without the real encoder 
> functioning then comment out these lines:
> net DAC-ctrl-in <= pid.spindle.output
> net DAC-ctrl-in => offset.pwmgen.in
>
> And add these lines right beneath it so you know what you changed for 
> testing:
> #FOR TESTING
> net spindle-vel-cmd-rps => offset.pwmgen.in
>
> That will disconnect the PID and pipe the motion speed command straight 
> into the offset component so you can test whatever else. Verify these things
>
> If at full reverse (-55 on "motion.spindle-speed-out-rps") the 
> "offset.pwmgen.out" pin is at 0, and your PWM is at ~0, 
> If at 0 speed (0 on "motion.spindle-speed-out-rps") the 
> "offset.pwmgen.out" pin is at 55, and your PWM is at ~50% or~12v
> If at full forward(55 on "motion.spindle-speed-out-rps") the 
> "offset.pwmgen.out" pin is at 110, and your PWM is at ~100% or~24v
>
> If all of that is about the case then you are done. You "DAC" is not doing 
> what you want it to and you need to either adjust it or get rid of it. 
> There's already alot of funny business going on with this config and you 
> don't want to keep trying to adjust offsets and add this and add that, your 
> setup will not be safe.
>
> setp hpg.pwmgen.00.out.00.enable 1  # allow to be at half value when 
> spindle is off due to offset use but maybee bad idea ??
>
> Yes, you need to keep the pwmgen enabled because of this setup, I probably 
> missed it when I wrote it, like I said, I don't have this hardware to test. 
> This is why you need to use this 
>
> net spindle-enable => fur.do-6
>
> You need to hook this output up to a relay that will operate the enable of 
> the KBMG. when the spindle is requested off it will disable the KBMG, that 
> way you don't rely solely on the PWM to output @50% and the "dac" thing to 
> remain at 0v to keep the spindle stopped. This is pretty much how it will 
> have to be to be safe. You may even want to integrate the 
> motion.spindle-inhibit pin once it gets running to further increase safety.
>
>
>
>
>
>
>
>
> On Wednesday, January 1, 2020 at 12:32:43 PM UTC-5, Aurelien wrote:
>>
>> Sorry i allways miss some information :
>>
>> until now i have only
>>  Do=0 cape 0/24v PWM out to -10v 0v +10v isolator/convertissor to 
>> multimeter
>>
>>
>> I have do some test with I = 0.1 and work fine the value 
>> increase/decrease slowly in the good range (without input rpm) as excepted 
>> regarding to asked rpm.
>>
>> What you think about about adding to ini a "OFFSET_OUTPUT = xx" for 
>> finding 0v center point ? or there is better way to do this ?
>>
>> the isolator/convertissor have some potentiometer for set zero and span 
>> but impossible to decrese deeper he is already set to min zero i can only 
>> increase  to more than +2v.
>>
>> Br
>>
>>
>>
>>
>>
>>
>>
>>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/machinekit/6041e815-1d70-4519-a62a-997b2a34c17e%40googlegroups.com.

Reply via email to