Hello Guest it is March 08, 2021, 04:04:44 AM

Author Topic: PLC With Analog Input  (Read 14549 times)

0 Members and 1 Guest are viewing this topic.

Re: PLC With Analog Input
« Reply #10 on: November 26, 2010, 07:36:05 PM »
Looks like the 05 is not capable of floating point math.  I think I'll need that.  Looks like the 06 is it.

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: PLC With Analog Input
« Reply #11 on: November 28, 2010, 10:30:14 AM »
Yes, you can use a DL06 Plus an analog module to do THC.

   In the DL06 you can use "PID Loops" to handle your Z hiegth drive, if your Z hiegth is driven up/down by an analog motor control then I recommend you get a Analog module with both input and output capability. I use the 4/2 cards, (4 in, 2 out), they are around 200+ dollars. If your Z uses a Stepper
motor drive, then you will need to have the Analog input card (like the one you have), plus the CTRIO (hs counter card), it is capable of driving a Stepper
motor at a faster response time but it is around 200+ dollars also........ another option is you can use the built in Stepper pulse out in the DL06, but its step rate is slower than the HS module.......

   In your PLC, you can set up in the PID, an upper and lower MAX range, (for your maximum down amount for instance), and for anti-dive, the easiest to do is
set up a timer so that if your movement amount is suddenly MORE than 10% of your set point (or what ever % you want to say, since most sheet shouldn't be that warped...... hopefully........), then it will not dive more than 10% for *********x number of micro seconds, this will allow you to cross cut lines or small gaps, depending on what you set your timer too. So, when it crosses a cut line, it will wait for *********x seconds if it still says, go more than 10% it would then Go to what ever your MAX Lower end of your PID loop would stop it at........ which would be some minimal distance above your sheet so as to not crush your tip.

scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: PLC With Analog Input
« Reply #12 on: November 28, 2010, 11:08:21 AM »
Thanks Scott.  That about the logic I had in mind.  I hadn't considered using analog out to a DC motor drive.  The Z still has to be able to be driven by Mach for manual UP/Down jogging and initial height sensing, but that would probably be possible through the modbus link.  My plan was to use a stepper, and use the outputs on the PLC to drive the THC Up and Down inputs in Mach, but after reading your post, I'm thinking the CTRIO may provide a faster pulse rate and better response time for cutting irregular surfaces like corrugated metal.

Do you think the CTRIO would be considerably faster than just driving the THC UP/DOWN mach inputs? Not sure what the max pulse rate is on the PLC outputs.

You mentioned the built in stepper pulse out.  Do you think this would be faster than driving the THC UP/DOWN inputs?

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: PLC With Analog Input
« Reply #13 on: November 28, 2010, 04:37:46 PM »
CTRIO if MUCH faster than the built in pulse gen in the native PLC, faster than machs lower PP engine settings but mach can outrun it at faster settings.
just so you know, you can jog up/down for initial and other stuff with JUST the PLC also if you want, analog can be driven by external buttons or from screen buttons across the modbus......  it is just a matter of getting it into your rungs.

Just a side note: there is price, then there is price.......  I can beat Toms price on a THC by using a ADC PLC.... but not a HUGH gap in price point. He offers
an excellant, well thought out, integrated system....  If I do my PLC and it malfuncitons what ever, I get to do the Tech support, but if you buy his, then
HE eats the tech support, warrenty, etc.........   so, when you buy Toms stuff, his price includes your future headaches (to an extent).
There is a time/learning/debugging curve involved with setting up a ADC PLC, ESPECIALLY the CTRIO module if you use it for motion, it is NOT simple to use.
just want you to understand that what you are considering is not trivial.

scott
« Last Edit: November 28, 2010, 04:40:51 PM by poppabear »
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: PLC With Analog Input
« Reply #14 on: November 29, 2010, 10:28:36 AM »
It's not really about the money.  I'm just looking for a more "industrial" solution (for lack of a better term).  I have a Sound Logic THC and it works fine, and buying another one is the easy way out, but I think I can build a better one using a PLC.  I also need a PLC anyway because I want to build an LCD touch screen remote.

Offline kf2qd

*
  •  124 124
    • View Profile
Re: PLC With Analog Input
« Reply #15 on: November 29, 2010, 11:50:08 AM »
You should be able to control the THC with just the PLC. Yiou would need some communication between MACH and the THC so it would know when initial heaght has been set. Initial height can be set with just a timer, go down until the switch contact opens, raise for some amount of time, stop motion and tell MACH that the torch is in position. Another timer can be used to raise the torch when the THC run is turned off by MACH. The PLC will work for a THC with just about any type of motor - yiou could use a reversable AC motor, or a DC motor - you would have to use relays to control either - Pheonix contact made some small din rail mounted relay modules that worked real well. If you have 2 analog inputs you could use a potentiometer to set your arc voltage.

I have used an Omron CP1-H PLC to control a THC using stepper motors and it worked well. A stepper interface might work with the DL06, but there is a problem with most PLC's that they don't like the step commands changed while in a move. The Omron PLC has a nice workaround and lets the motion commands be changed on the fly.

Analog output could be used but unless you can program a proper deadband in the motor drive you will have to deal with creep in the THC when it should be sitting stationary.

I would think that it would be easier to treat the THC as a seperate component and not try to control the height with MACH because the  height doesn't have a good number as it is relative to what is happenenig between the torch and the plate.
Re: PLC With Analog Input
« Reply #16 on: November 29, 2010, 01:51:13 PM »
You should be able to control the THC with just the PLC. Yiou would need some communication between MACH and the THC so it would know when initial height has been set.

Mach has an input for ArcOK.  You would just need to provide a signal on that pin so Mach knows that it's OK to start movement.  If ArcOK is lost, then Mach automatically pauses the program until ArcOK is restored.

Initial height can be set with just a timer, go down until the switch contact opens, raise for some amount of time, stop motion and tell MACH that the torch is in position. Another timer can be used to raise the torch when the THC run is turned off by MACH.

I hadn't thought of just using a standard DC motor.  That would work as long as the PLC can reverse the motor direction.  A better solution might be to just use a simple DC motor control that way you can control speed...Unless the PLC can send a DC pulse similar to a motor speed control.


The PLC will work for a THC with just about any type of motor - you could use a reversible AC motor, or a DC motor - you would have to use relays to control either

Ah yes...I've done that before.  Used a DPDT relay to reverse a DC motor.  If you fed the relay through a speed control and used the PLC to switch the relay, that should work.  CNC control over Z feed rate wouldn't be needed but a way to adjust the speed would be.

I would think that it would be easier to treat the THC as a separate component and not try to control the height with MACH because the  height doesn't have a good number as it is relative to what is happening between the torch and the plate.

My reasoning there was that the PLC would handle all of the logic.  ArcOK is just a low current voltage or a relay contact coming from the Plasma unit.  The PLC can monitor that and apply 5V to Mach's ArcOK input.  Mach Also has inputs for THC UP and DOWN.  If I used a stepper and stepper driver connected to Mach, the PLC could just control Mach through the UP/DOWN inputs, although that may be slower than a DC motor.  The other advantage to letting Mach control motion is that I would retain the ability to attach a router, drill, engraver, etc. to the same machine, all of which do require Mach control of the Z axis. 

This is how the Sound Logic THC works.  Not sure, but my guess is that Toms unit works the same way. It controls Mach through the THC UP/DOWN inputs.  The above idea would basically just replace the sound logic or CandCNC board with a PLC.  All that would be required is a PLC with analog input.  Not sure if this is possible, but instead of setting a PP pin high for torch UP/DN and ArcOK, just signal Mach through the serial interface without using any inputs or outputs.  If you can programatically control an input on the PLC, you should be able to signal Mach from software just as if a physical input were applied to the PLC.  

Offline BR549

*
  •  6,944 6,944
    • View Profile
Re: PLC With Analog Input
« Reply #17 on: November 29, 2010, 02:03:30 PM »
Tom has a new low cost unit out as well. One thing to think about there is more to the THC than meets the eye. IF it were as simple as it seems everyone would be doing it with a simpl plc (;-).

From experience there are THC's and there are GOOD THC's. 

Just a thought, (;-) TP
Re: PLC With Analog Input
« Reply #18 on: November 29, 2010, 02:39:58 PM »
I agree completely but look at it this way.  Most, if not all of these low cost THC's use a pic or some other programmable microcontroller.  It their simplest form, they read an analog voltage, compare it to a set analog voltage and set the Mach THC UP/DN pin accordingly.  What makes a good THC is the programmed logic, and I agree, there is a lot to consider.  I have to believe that the programming capacity of a good PLC at least equal that of a micrcontroller, which means that the same even more complex logic could be done with a PLC.

The other end of this is the voltage divider.  A stable analog voltage to the THC is pretty important.  This is a bigger deal for me than programming the PLC.  My electronics background is minimal.   

Offline kf2qd

*
  •  124 124
    • View Profile
Re: PLC With Analog Input
« Reply #19 on: November 30, 2010, 03:25:53 PM »
A voltage divider is not all that complex... The right combination of resistor of a high enough wattage and MAYBE a small cappacitor across the output side to filter it slightly. Then you have to program a little bit of deadband around your setpoint (2 to 5 counts out of 256) and it will behave pretty well. There may also be some averaging in the A2D circuit in the PLC to help with the noise. I have built a couple of PLC based THC and it does not have to be complex at all. Mostly you are looking at whether the arc voltage is greater or less than some reference value and then triggering the appropriate output for up or down.

Using MACH - you could send the Plasm Start signal to the PLC and then when the Initial height is set the PLC gets the Arc Transferred signal and sends it back to MACH. When MACH drops the Plasm Start signal then PLC turns off the plasma and waits for a second or 2 for the plasm to shutoff and then retracts for some preset time.

The main advantage of the PLC over the PIC is that you don't have to worry about the Real Time part of the process, the PLC does that itself. Also the programming might be a bit easier for someone else to understand because, while some try to disparage it, ladder logic is rather universal and thus easy to figure out.

I have had to figure out others ladder logic and been able to do major additions, the other option is STL and poorly written STL is a vile as poorly written assembler...