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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/machinekit/35ba18bc-fc32-4ff9-8bfb-1befc5232d8d%40googlegroups.com.
