Sometimes a PLC is the right solution

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Sometimes a PLC is the right solution

Post by Richards »

The Acorn's possibilities are almost endless but mixing and matching various servos with opposing I/O requirements can be frustrating.

A few weeks ago, when I connected some Teknic ClearPath servos and a DMM DYN4 750 watt motor to my Acorn, I realized that I would have to add some "glue" logic to make everything work. A few days later I had the necessary chips from Mouser and another day later, I had everything running via two Arduino boards. The next step was to layout a P.C. board. NOT!

About that same time, one of my sons, who is an electrical engineer who specializes in controlling oil refineries, sent me some photos of the PLCs he normally works with. Those PLCs cost thousands of dollars each, but they started me thinking about "simple". This morning I visited AutomationDirect's online store, downloaded a manual and some software and realized that all I had to do was connect wires from the servo motors or servo drives to the PLC and then write some very simple code. Simple. Effective. Inexpensive.

The basic CLICK PLC costs $69. The ethernet model I selected is about $130. The CPU module comes with eight inputs and six outputs. I added another sixteen lines of Inputs and sixteen lines of outputs so that I wouldn't be limited by any conceivable configuration.

One line of ladder logic handles all fault input possibilities, and sets an output to signal go/no-go to the Acorn. A few more lines of ladder logic handle turning on power to the drives, cutting power to individual drives, sensing limit sensors, and almost anything else that I can think off.

There's no waiting for circuit boards to be fabricated. No C/C++ programming. No custom solutions for generic problems.

Sometimes it's best to think outside the box and the endless possiblities that really exist instead of staying inside the box and seeing only limitations.
-Mike Richards
cnckeith
Posts: 7164
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Sometimes a PLC is the right solution

Post by cnckeith »

Very cool thanks for posting let's see some photos!
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Sometimes a PLC is the right solution

Post by Richards »

Keith,

All parts will arrive Thursday or Friday after Christmas. Photos will follow. All that I can show now are screen shots of PLC program code - not overly interesting to non-programmers (but it's what I thrive on, i.e., X001 - X004 = Motor Fault Status and Y001 = PLC output to Acorn input, where X001 = | |, X002 = | |, X003 = |/|, X004 = |/| resulting in Y001 = |/|. Didn't that make you think that Christmas had already come? The beauty of a secondary PLC is that if some components produce an active HIGH signal and other components produce an active LOW signal to indicate a safe condition, and if there is only one dedicated input to handle either active HIGH or active LOW, then a secondary PLC allows using both active HIGH and active LOW signals to generate whatever the Acorn is expecting to see. Add just one other function that I need - Z-axis motor is kept enabled as long as the Acorn is active AND as long as no fault condition has been sensed. The secondary PLC can monitor an Acorn output to verify the the system is ready and it can monitor an E-stop contact, the fault condidtions of each motor and the limit switches to combinatorially decide whether each motor's enable line should be active or inactive. Now I'm certain that Christmas has already come)
-Mike Richards
Gary Campbell
Posts: 2164
Joined: Sat Nov 18, 2017 2:32 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: Acorn 238
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Marquette, MI
Contact:

Re: Sometimes a PLC is the right solution

Post by Gary Campbell »

Mike...
Have you looked at the PLC programming for the BBG in Acorn? I am not saying it can replace a lack of IO like your system will, but it may open up a number of additional options for your "playing".
GCnC Control
CNC Control & Retrofits
https://www.youtube.com/user/Islaww1/videos
Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Sometimes a PLC is the right solution

Post by Richards »

Gary,
I watched the Acorn PLC programming video several times and considered doing something similar, but the problem was limited I/O. For instance, with four motors with opposing fault statuses, I would need to use four Inputs. Then, if I wanted to monitor limits on both ends of the X and Y axis and on one end of the Z axis, I've already exceeded the number of inputs available. Because the Acorn's I/O have been well thought out and because they handle important and necessary I/O to safely and efficiently use the Acorn, I decided to not remake something that was already very well made. After using Arduinos, 74HC595 and 74HC165 shift registers along with transistors, resistors and RGB LEDs, I could see that going full custom would require too much overly difficult programming to be attractive to people who are more interested in using CNC machines instead of building them. A safe middle-ground was defined and a generic PLC fit that slot perfectly.
-Mike Richards
Black Forest
Posts: 345
Joined: Thu Nov 23, 2017 1:39 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Sometimes a PLC is the right solution

Post by Black Forest »

I don't know anything about the PLC that you wrote about but if you want a very simple to program PLC using Function Block Diagram (FBD) than have a look at the Siemens Logo 8. Very expandable and very reliable. You can program them using ladder logic also. I like the picture I get in my head using the FBD. I have used quite a number of the Logo's and find them 100% reliable. They are also quite inexpensive.
Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Sometimes a PLC is the right solution

Post by Richards »

Threre are a lot of PLCs available to suit almost any need. When I dabble in electronics, I like to get something that exceeds my perceived needs until I've had a chance to work through some ideas. Yesterday, when I posted this thread, I thought that I had a clear idea of what I wanted to do. After running through the CLICK tutorials and then watching tutorials on other PLCs, I realized that there was a lot more that I could do without spending any more money. I found a lecture on YouTube that lasted over two hours, but it covered the basics. After watching that video, I realized that, on first glance, I had so little undertanding of the potential of PROPERLY using PLCs that I could have ended up paying too much to "brute force" a solution, or, if budget dictated the parts, I could have bought too little.

For instance, by configuring each input signal to be the "normal" state of the input, i.e., ClearPath "servo ok" signal (for me) is NC. The DYN4 "alarm" signal is NO. I could just compare the inputs to their "normal" state and then set or reset an Output signal to the Acorn, or I could store those inputs in memory and then perform logic on them according to the task at hand. For instance, if I found that the ClearPath motor or the DYN4 driver was apt to give a false signal when power was first applied, I might add a timer to the input to give the electronics time to settle before considering the signal valid. Or, maybe I wouldn't care about the fault or alarm signals when other signals switched state. By having a choice, I can look outside the box, letting each component work at top efficiency without just "making do". That's one of the benefits of waiting for parts to arrive. Having a few days to mull over the possibilities help me to throw out some of my preconceived ideas.
-Mike Richards
Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Sometimes a PLC is the right solution

Post by Richards »

The AutomationDirect CLICK PLC arrived late yesterday afternoon. Company dropped in just when I had it wired and ready to test. This morning, I only had an hour to run a quick test, but in that hour, the PLC had ClearPath servos working with DMM DYN4 servos (monitorig servo fault lines). It had a one-second heartbeat blinker going. It had the 70VDC power supply connected to turn on five seconds after one of the Acorn's output relays turned on, and the DMM DYN4 drive was connected to turn on ten seconds later (to even out any possible on-rush condition). It had motor enables configered so that the servos "enable" energise thirty seconds after their power supplies are turned on and the "enable" stays on until either the emergency stop is pressed, the CNC program is ended or until I push a button (not yet wired in). Also, the PLC filters possible events that require an emergency stop.

The unit is small. It's fast and it is inexpensive (if not more than eight inputs and six outputs need to be controlled, a basic unit is just $70). Additional Inputs (16 sinking or sourcing) and additional 16 outputs cost less than $50 per module.

I'll try to get some photos posted before the weekend is over.
-Mike Richards
Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Sometimes a PLC is the right solution

Post by Richards »

The CLICK PLC has been programmed (first run, anyway). I'll physically hook it up to the Acorn after tearing apart my test bench setup. However, because the CLICK has "views", it's easy to simulate its actions, and, by simply connecting ground leads to the acorn, its just as easy to simulate what will happen when the CLICK PLC and Acorn are fully integrated.

Here are some screen capture JPGs of the CLICK's programming environment, a shot of a "view" and a shot of its System Monitor. Keep in mind that the CLICK PLC is only about 5-1/2" X 3-1/2".
Ladder Logic, 1/4
Ladder Logic, 1/4
Ladder Logic, 2/4
Ladder Logic, 2/4
Ladder Logic, 3/4
Ladder Logic, 3/4
Ladder Logic, 4/4
Ladder Logic, 4/4
Data View where I/O is manually manipulated
Data View where I/O is manually manipulated
System Monitor showing I/O
System Monitor showing I/O
-Mike Richards
Lance801
Posts: 2
Joined: Sat Dec 29, 2018 6:45 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Sometimes a PLC is the right solution

Post by Lance801 »

I am also going to be using a mixture of DMM dyn4 and clearpath servos for my Mill conversion and I want to try to PLC route to fix the input signals issue. I don't have any experience with PLC's however. I would just follow your lead and go with the Click PLC but I am currently living overseas and that unit is not readily available. However, I was reading above and saw someone mention the Siemens Logo which I can get here (Asia) for pretty cheap. I am sure that this will work in the same manner as it is also able to be programmed with Ladder Logic. Do you feel the Click PLC is easier to program or is a better system? Did you consider the Logo? Any reason in particular you chose the Click system?

Can you post a few pictures of the wiring inside your control panel? Are you using individual breakers and contactors per power supply as stated above? Is the PLC energizing the contactors for each power supply?

I have been scratching my head trying to figure out how to make this work. I bought 3 clearpath servos before I found the DMM stuff and started questioning the strength of my choice of Z motor. A couple months later I bought a couple DMM servos, 1 to use for the spindle and one for the Z that has a bit more torque than my original choice.

My goal was to eventually set up the spindle to be capable of rigid tapping and using the DMM for the Z, not knowing that the input signals would be different and that this would not be as simple as setting up the clearpath stuff. I was really close to just buying another Clearpath servo as I already spent a considerable amount of time building the motor mounts for the clearpath motors for the X and Y (still haven't made the Z) and the DMM servo mounting holes are a little different, but eventually I think I will convert the whole machine to DMM servos as I feel like that system has quite a bit more options. Why did you decide to go with a mixure of the two servo systems? Similar circumstance?

P.S. I also used to live in South Jordan. My family is still in Utah. My brother is currently living in Saratoga. Small world... I am following your Youtube channel as well. Thank you for posting this.
Post Reply