PID loop-Retrofit old plasma cnc with air valve actuated z-axis low tech THC

More
10 Dec 2021 13:13 #228776 by oeleboele
Hey

I'm working on an old plasma cnc machine. Quite an obscure piece. Its made by Rother Machine Tools ltd. and probably they didn't make many of them. It has a super low-tech torch height control: three ball bearings which roll over the surface of your sheet Its solenoid actuated with a air valve for the z-up movement.

I'm planning on fitting a real z-axis (with real THC) in the future but for now I want to get the machine working as it is. Originally it was fitted with a TRIO motion coordinator series 1, which I managed to get going. It was working with CADLINK 2000 software on a xp-machine and written in TRIO-BASIC language. Since I didn't really planned to learn cadlink2000 I decided to learn linuxcnc instead. Which is way better.

So my new basic setup is:

Qtplasmac
mesa 7i76e with 7i77 (bit overkill but decided to have a 7i76e as backup in case I couldn't get the servo to work).
2 midi-meastro 140x8/16 drives. These are analog dc servo drives with tach feedback and I believe internal PID-loop control.
2 SEM MT30M4-59 brushed DC motors fitted with 1000ppr British encoders.

I managed to get everything hooked up and haven't fried anything so I'm quite happy with where I am now.

I think the midi-meastro drives have a PID controller inside and since it was working before I figured it could be working with minimal PID settings in linuxcnc.
With a bit trial and error I got the motors not to walk away.
I've set P to 0.6 and FF1 to 0.3 and when I jog very slow there are no following errors. When I turn up jogging speed I get following errors.

So my question is what is a good starting point for the PID settings in linuxcnc? Do I need to tune the loop here as well? Or is the PID controller of the drive sufficient?

Another thing I've been trying to figure out is how to get the Z-axis to work with Qtplasmac in this setup.Since I'm planning on building a z-axis with stepper motor and THC control I've set-up the z-axis with pncconf on the 7i76e IO connector2 0:stepgen.

For the z-axis to move up I need to actuate a solenoid so I figured I could simply use the direction signal of the stepgen.
But I don't seem to understand where this pin is in the Halshow. I figured it should be hm2.7i76e.0.gpio.003 or 004.
But somehow this doesn't correspond with the z-axis movement. gpio pin 000 does go true when z-axis is moving down.

So how do I read the mesa 7i76e gpio pins? TB2 on the 7i76e starts with 1 GND. So I figured that should be gpio.000. And TB2 4 Dir0- should be gpio.003. I'm I missing something here?

I also have issues with some of the functionality  in Qtplasmac. Since I don't have a float switch the program keeps on probing down until the max limit it reached. I did make a sort of workaround with a wcomp function as an input for the float switch. But it doesnt feel elegant at all.

So is there a example of some kind for a xy machine with just a up down movement for the z-axis? Like a pen plotter or something.

I attached a few photos of the machine and the manual for the midi-meastro drives

Thanks in advance,
Boele 

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

More
10 Dec 2021 13:44 #228777 by oeleboele
Video of the machine run with the old controller (and a bit loose optical cable for ark-on signal)

vimeo.com/655342122

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

More
10 Dec 2021 15:50 #228783 by PCW
You normally do not use GPIO at all on a 7I76E (or 7I77)

You would use the field I/O for 24V I/O

I would suggest starting with a pncconf created configuration
since this will have the correct pin names for the field I/O
on 7I76E TB5 and TB6

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

More
10 Dec 2021 16:08 #228784 by oeleboele
Yeah, I was intending to use it as an input for a function. But I managed to get the z-axis working with a abs function on the joint.2.vel-cmd

I have wired all outputs on the 7i77 field io's

Thanks

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

More
10 Dec 2021 18:12 #228790 by oeleboele
I have the z-axis sort of working.
I made a wcomp function which takes joint.2.pos-fb as an input and output this to the plasmac.float-switch to simulate a float switch for plasmac.

Now the problem is that while probing it hits the (virtual) float switch and then backs off again to the cut/pierce height. Which makes my z-axis move up again and that is problematic for the arc to be ok.

Is there a way around the probing function?

thanks

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

More
10 Dec 2021 20:12 #228802 by tommylight
Yes, add a float switch.
Plasma is not comfortably usable without it.

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

More
10 Dec 2021 20:18 #228804 by oeleboele
Normally that would be true, but in this case a float switch is pointless since it is impossible to probe down too deep. Check the video link in post2 to see the machine, there's no motor on the z-axis only gravity doing its job ;)

But i agree that normally a float switch would be a necessity

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

More
10 Dec 2021 20:31 #228807 by tommylight
Ok, then what is your end goal?
As it is, it will not work.
But you can still use the rollers and do a simple LinuxCNC config.
Get a Nema 17 stepper, a cheap "TB6600" drive, 8mm lead screw, and have a propper machine.
If it did not cost me over 60 Euro for DHL, i would gladly send you a stepper free of charge. No drives and srews left. :(

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

More
11 Dec 2021 10:31 #228864 by oeleboele
Thanks for the offer ;)

That will be the end-goal, to fit a z-axis with thc with stepper. So you're probably right, why not do it now?

As a mid-goal I like this system to work so I can already use it and as a practice for learning linuxcnc. A simple linuxcnc setup would be an option. But I do like the functionality plasmac.

I will try to make some workaround probably. Or just start adding the z-axis ;)

Do you have any thoughts on tuning the DC servos with these drives?
Thanks

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

More
11 Dec 2021 11:08 #228865 by phillc54
There may be a possibility of doing something like the following:

Setup a fake Z axis with something like this in hal:
net zpos joint.2.motor-pos-cmd  => joint.2.motor-pos-fb

Then connect your real Z axis in hal to specific states of the plasmac.state-out pin:
linuxcnc.org/docs/devel/html/plasma/qtpl...lasmac_state_outputs

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

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