Need help with the orient component for spindle activation (M19)

More
13 Mar 2022 15:52 #237120 by andypugh
Have you tried looking with halmeter? I would pay special attention to the pid.1.command, pid.1.feedback and pid.1.output pins.

pid.1.command should be the commanded spindle posiition. pid.1.feedback should be the actual position, and pid.1.output should be a number that increases as the angular angle increases. And you _should_ see that same number appear on the pwmgen.0.value pin

You can open as many halmeters as you need to watch a number of pins, though at some point it makes more sense to use the "watch" tab of halshow.

(in the Axis interface, these are machine->halmeter and machine->show hal configuration.

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

More
13 Mar 2022 23:01 - 13 Mar 2022 23:04 #237155 by jpg
Good evening Andy, only PID.1. FEEDBACK moves outside the orient mode, PID .1.OUTPUT and PWMGEN.0.VALUE have the same values (as you expected) and stop outside orient and PID.1.COMMAND changes value according to the angle requested ( 1.75 , 1,000028 ect..)
Attachments:
Last edit: 13 Mar 2022 23:04 by jpg.

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

More
14 Mar 2022 20:24 #237233 by andypugh
Is the motor really spinning at 1777 rpm?

If it is, then it looks like the problem might be the "abs" function, or possibly the spindle direction control.

Do you see pid.1.error increasing or decreasing? (or neither, if the spindle isn't turning)

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

More
14 Mar 2022 21:27 - 14 Mar 2022 21:39 #237240 by jpg
no, Andy, in "orient" mode, the spindle doesn't turn, I only switch on the relay, the speed, for the moment is "fancy", I think ABS is a problem, but without your help, I'm a little bit (not to say a lot) lost, PID .1.ERROR moves in -/+ in "orient" mode but not the spindle
Last edit: 14 Mar 2022 21:39 by jpg.

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

More
14 Mar 2022 23:02 #237256 by andypugh
What is different between the modes? There is a value going to the pwmgen in both modes, but Is the number similar? Is that number 29 rpm? (or is it 29 rps?) Can the spindle turn at that speed?

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

More
15 Mar 2022 06:05 #237291 by jpg
Hello, the value of PID.1.ERROR is 1/100 (e.g. 0.125) compared to PWMGEN.0.VALUE (12.5); PWMGEN.0.VALUE stops when not in "orient" mode.

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

More
15 Mar 2022 09:17 #237311 by andypugh

Hello, the value of PID.1.ERROR is 1/100 (e.g. 0.125) compared to PWMGEN.0.VALUE (12.5); PWMGEN.0.VALUE stops when not in "orient" mode.

Can you answer the second part of the question? are the numbers big enough to turn the spindle? The Halmeter images shows a spindle speed command of 29 rpm. Does your spindle drive even respond to a speed request of 29 rpm? If it is a VFD then it is unlikely to go below 10Hz, or 150 rpm. 
Try increasing the PGAIN_P to 1000 and also add some IGAIN_P of 0.1 or so
I think that this might all just be incorrect PID tuning. 
 

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

More
15 Mar 2022 17:02 - 15 Mar 2022 17:05 #237345 by jpg
Good evening, I put in INI the indicated values, but the spindle remains inactive in "orient" mode, the values change, but nothing happens, concerning "PWMGEN.0.VALUE" (v=1.03) in "spindle" mode the VDF is at 10 hz,minimum speed
Last edit: 15 Mar 2022 17:05 by jpg.

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

More
15 Mar 2022 17:16 #237350 by andypugh
Which values change? Does the pwmgen.0.value ever get high enough to turn on the VFD?

With the I-gain active you should see the pwmgen.0.value steadily increasing. At some point I would expect it to get high enough to satisfy the VFD.

Unless my guess is wrong about what is going wrong.

Note that you need to restart LinuxCNC (only LinuxCNC) for INI file values to register.

You can try using the "Calibrate" menu item in Axis to make live changes to the PID tuning.

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

More
15 Mar 2022 18:57 #237360 by jpg
sorry Andy, still no rotation, I change the values, on the pictures, I put yours back but still nothing :-(
Attachments:

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

Time to create page: 0.089 seconds
Powered by Kunena Forum