Bridgeport Torq-Cut TC4G Retrofit

More
20 Mar 2021 18:01 #203001 by andypugh

This prompted me to start on the orientation side of things. Using the orient component worked for me but the PID for the orient does not know what to do in low gear vs high gear. The angle always was correct though, but in high gear the spindle would vibrate badly and in low gear it is perfect.


You almost certainly need different PID gains in each gear.
I would suggest a set of mux components to choose P and I (and maybe D) according to gear.

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

More
20 Mar 2021 21:05 #203045 by chopper79

You almost certainly need different PID gains in each gear.
I would suggest a set of mux components to choose P and I (and maybe D) according to gear.


This was direction I was going to go for now. About 1/2 way done with it currently. Taking multiple mux2 to patch it all together using (2) PID sections. Created a low and high gear PID so just mux2 the enables, commands, feedback, and position of each PID group. Have to take that and mux2 the spindle PID so mux2 sel(s) can chose the right path based on certain bits going true.

Its a maze... Maybe I am just muxing it up and do not need so many.

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

More
21 Mar 2021 02:33 - 21 Mar 2021 02:36 #203077 by chopper79
Update

The machine now has spindle orientation with both high and low gear. Took a bit to figure out how to piece it all together, but figured it out. Using (2) orient PIDs and a few or2, mux2, and other misc. items.

Now need to tune the PID on both gear as they both oscillate when oriented. The low gear is not as noticeable due to the 4:1 ratio, but it is there.

Currently both PIDs are only using Pgain and FF1. ( Just messing around with these)

Andy you mentioned P, I, and maybe some D. I tried to put some values in to see what happened and never got any decent results. Any recommendation on how to go about this? I have looked over briefly the PID tuning pages, but not deep enough yet.

Also finished up the following:

1) Manual tool release (Tied in with air pressure and spindle stop)
2) Manual carousel index (Tied in with spindle stop)
3) Air pressure tied with estop (No air pressure = No estop clear)
4) Transmission component tied with air pressure and orientation (No air pressure = No gear change)
5) Finished tool change (No air pressure = No tool change)

Getting closer...
Last edit: 21 Mar 2021 02:36 by chopper79.

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

More
21 Mar 2021 22:27 #203166 by andypugh

Currently both PIDs are only using Pgain and FF1. ( Just messing around with these)


I wouldn't expect FF1 to be helpful. The commanded position is a static value so none of the FF terms will be any help, and probably the opposite.

It will mainly need P, but I would expect a little I to help pull out the last bit of static error. But the I-term will be 100 to 1000x smaller than the P.

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

More
22 Mar 2021 01:36 #203187 by chopper79
I gave the PID tuning a go and still having issues.

Set all values to 0 (excluding max output which is 100 as I figure 100rpm orientation is fine for now)

Using halshow I introduced P, I, D values and never arrived at a good spot. I set P to 1 and the spindle will rotate slowly to the orientation degree and stop. Added more P and the rotation is quicker, but when oriented the oscillation is greater as well. No matter how much P,I, or D is introduced the oscillation is there. If to much D the oscillation is less, but a heavy vibration is present.

Also inverted my spindle encoder just incase this was the issue and then the spindle never orients. It just rotates and never stops in position.

Wonder if the Yaskawa VFD's internal parameter constants are interfering with this process?

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

More
22 Mar 2021 09:50 #203215 by andypugh

I set P to 1 and the spindle will rotate slowly to the orientation degree and stop. Added more P and the rotation is quicker, but when oriented the oscillation is greater as well.


Maybe the P needs to be less than 1?

If you increase P as far as you can without oscillation then add some I it will probably speed up. (but might then enter I-term oscillation).

I will never dampen oscillation if P is too high. D might, sometimes.

You could try the Zeigler-Nichols method

Increase P until you get oscillation.
Then set P to 0.45 times that value, and I to 0.8 times the oscillation frequency.

It might well be that the system can only orient slowly.

You might need some inverse-deadband if the VFD doesn't even come alive below a certain frequency (which is likely)
If I was doing this I would probably use the "lincurve" HAL component to map frequency requests below 2Hz to 0 and between 2Hz and 10Hz to 10Hz, then 1:1 above there.

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

More
22 Mar 2021 22:39 #203310 by chopper79
Still no luck..

I get oscillation with a P value of 0.0005 and all other PID values at 0 If I drop P to 0 then the spindle will rotate slowly on its own and never orient. This goes back to an issue I had a few posts back about when spindle is enabled it begins to rotate about 1 rpm. Not sure at this moment on how to do this orientation thing. I did try adding some I and inverse D with no luck at all

The orientation speed from the factory is about 300 rpm.

I will have to look at this lincurve you mentioned. Not familiar with it so need to research some more on it.

Just for the heck of it I triggered the orientation on the VFD and the spindle orients at 400 rpm and stops solid with no issues excluding the position is wrong and if I change gears it is wrong again. This is using the encoder on the spindle motor and not the load encoder on the spindle.

Well for now I will have to sit back and keep thinking about this issue.

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

More
23 Mar 2021 01:10 #203327 by andypugh
Does the encoder on the motor use an index?

What kind of motor is it? If you are using a VFD then presumably an induction motor? What dies it use the encoder for?

I wonder what would happen if you wired the spindle encoder to the VFD in place of the motor encoder?

Can you show us _all_ the pins/params of your spindle PID? I wonder if you have a max_output getting in the way.

Does it actually matter if the spindle oscillates? Could you simply disable the PID once the spindle is oriented?

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

More
23 Mar 2021 01:47 - 23 Mar 2021 02:08 #203332 by chopper79
The motor encoder does use an index and yes it is an induction motor.

Motor = Yaskawa UAASKA-06DBM12
VFD = Yaskawa 626vm3c

This is a match set and when the VFD is installed you must enter the motor code. From this point the VFD manages different parameters and the encoder on the motor lets the VFD know how it is performing. Adjustments are made on the fly in the VFD based on the encoder and the high voltage wiring monitoring. Well according to Yaskawa anyway...

I thought about connecting the spindle encoder to the VFD and not the motor, but Yaskawa stated that due to the above the motor and VFD would not perform correctly. They said that the DX32 controller used a PID to orient the spindle. Basically just like I am attempting in LCNC.

I thought about disabling the PID once oriented, but if the spindle rotates a little then the drive dog will not line up with the notch in the tool holder. (To much potential for error personally)

The oscillation may not matter at all but I figure that it should not be there as the original control was able to handle it so LCNC should be able to as well. Just do not know the OEMS magic sauce for it yet.

Attached is my HAL and INI file that I am using for testing the PID. Also note that even though the HAL has dual PID (Low and High gear) the same results happen with even a single PID for orient. Also attempted multiple different configurations of the pin/signal and keep coming up with the same results. I may have something basic messing me up on this so please by all means have a look.

Thank you

**** Focus on the area that is ###### TEST ####### This is my testing area so I do not have random stuff everywhere in the HAL. ****

If anyone attempts to use this HAL and INI file. I caution you that it is not complete has work still to be done on it. This is just the current spot I am at in the progress of getting the controls set up.
Attachments:
Last edit: 23 Mar 2021 02:08 by chopper79.

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

More
23 Mar 2021 02:28 #203337 by PCW

I get oscillation with a P value of 0.0005


I don't really understand this as a P value of 0.0005 would result in a correction velocity
of only .00025 RPM when 1/2 turn out of position (assuming the velocity command is scaled in RPM)

Because of the step in position during orient (and the slow response of VFDs) it might be worth a try
to use an exponential motion by setting P proportional to the absolute error. This is helpful in eliminating
small oscillations as the gain is near 0 once in place. Bounding the PID error might help as well
The following user(s) said Thank You: chopper79

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

Moderators: cncbasher
Time to create page: 0.089 seconds
Powered by Kunena Forum