Replacing PLCs in Industrial Applications with Microcontrollers

RobNevada

Joined Jul 29, 2019
24
Hi Dw,
Great response. I like hearing both sides of the discussion and you had some great points. I agree if you only learn one side of programming and that is ladder logic, C, or any other platform you will feel like a deer in the headlights if asked to move in a direction where you have to hurry up and learn something new. Most of the companies where I have provided my services, I included the software and any custom scripts I wrote. They can always reach me by phone or email and ask questions. I started with a Commodore 64 back in the day and was on the Arpanet to share a little of my background. In other words an old fart. My favorite new sensor is the time of flight board.
 

dwdohm

Joined Mar 8, 2019
9
Actually the first CNC project I did was using the AB 1771 PLC's in the 80's and they had just introduced their 1771-QC (bulletin 1388) servo positioning module. No writing of PID loops etc.
PLC's generally have not been used for CNC due to lack of interpolation for multi-axis.
Fortunately this was a single axis application.
I eventually went with Mitsubishi for both PLC and CNC, (the software was free!).

BTW, I guess Baby Boomers have something against paragraphs!?
Very hard to read.;)
Max.
Max....I'll try to pay more attention to my composition in the future....and perhaps not be so wordy. Good feedback!
David
 

dwdohm

Joined Mar 8, 2019
9
Hi Dw,
Great response. I like hearing both sides of the discussion and you had some great points. I agree if you only learn one side of programming and that is ladder logic, C, or any other platform you will feel like a deer in the headlights if asked to move in a direction where you have to hurry up and learn something new. Most of the companies where I have provided my services, I included the software and any custom scripts I wrote. They can always reach me by phone or email and ask questions. I started with a Commodore 64 back in the day and was on the Arpanet to share a little of my background. In other words an old fart. My favorite new sensor is the time of flight board.
Hey Rob,
Commodore 64! I knew an agricultural engineer in the Salinas, California area who used a VIC-20 as the processor on a field harvester. When I questioned him about maintainability, he pointed out that should the hardware fail, the folks in Yuma could always go down to the local Thrifty drugstore and get a replacement processor (at that time, the closest automation distributor was in Phoenix). Different perspectives, but I appreciate all.
Cheers, David
 

dendad

Joined Feb 20, 2016
3,186
Years ago, here in Oz, there was a pear grader system run from a C64. We had the job of upgrading it using our own custom hardware, but later it was scrapped altogether.
I do think the C64 system was from the USA as it was a 110V system.
 

dwdohm

Joined Mar 8, 2019
9
Hey Rob,
Commodore 64! I knew an agricultural engineer in the Salinas, California area who used a VIC-20 as the processor on a field harvester. When I questioned him about maintainability, he pointed out that should the hardware fail, the folks in Yuma could always go down to the local Thrifty drugstore and get a replacement processor (at that time, the closest automation distributor was in Phoenix). Different perspectives, but I appreciate all.
Cheers, David
Hi Dw,
Great response. I like hearing both sides of the discussion and you had some great points. I agree if you only learn one side of programming and that is ladder logic, C, or any other platform you will feel like a deer in the headlights if asked to move in a direction where you have to hurry up and learn something new. Most of the companies where I have provided my services, I included the software and any custom scripts I wrote. They can always reach me by phone or email and ask questions. I started with a Commodore 64 back in the day and was on the Arpanet to share a little of my background. In other words an old fart. My favorite new sensor is the time of flight board.
Rob, Since you seem very comfortable with Node Red perhaps you might have done an application that implemented a Drum Sequencer. I've looked around for a User Contributed node, and had no luck. My current thought is to roll my own, using an array and counter (essentially how some of the RLL packages seem to do it), but am lazy enough to take advantage of others work. Have you seen such a node in any of the libraries floating around? I'm planning on ditching the messy flow I created for irrigation using discrete timers and one shots, which has become quite ugly with UI buttons to initiate single zones when the whole place doesn't need water. Your Thoughts?
David (aka "DW")
 

RobNevada

Joined Jul 29, 2019
24
Hi David,
There should be Nodes that would fit your needs. If you search Node Red Library you will find hundreds of Nodes. You can also go to YouTube for videos on how to program. I usually use a Raspberry Pi for Node Red (Node Red is loaded when you image the Pi as a resident program) and then I/O to Arduino, other microcontrollers, or make a PCB. Node red also has a very user friendly display that is easy to program and use.
 

dwdohm

Joined Mar 8, 2019
9
Hi David,
There should be Nodes that would fit your needs. If you search Node Red Library you will find hundreds of Nodes. You can also go to YouTube for videos on how to program. I usually use a Raspberry Pi for Node Red (Node Red is loaded when you image the Pi as a resident program) and then I/O to Arduino, other microcontrollers, or make a PCB. Node red also has a very user friendly display that is easy to program and use.
Hi Rob,
I'm aware of some of what you mention in your reply.
I run my home automation system on Raspbian and Node Red with ESP8266 WiFi based wireless I/O nodes programmed in C++ for lighting and irrigation using an MQTT broker and messaging.
Much of what I've done is "purloined" from others, such as Peter Scarghill and "the Swiss guy with the accent" and modified to meet my needs. I simply haven't found, what I considered to be, a straightforward time based drum sequencer node similar to that which exists in RA Logix or Schneider programming environments.
I'll keep combing the User-Contrib Nodes, but thought you might have run across one in your deployments.
Thanks for the Reply,
David
 

MaxHeadRoom

Joined Jul 18, 2013
19,466
Hi David,
I have to admit I don't know exactly what a drum sequencer is. Can you shed some light?
Drum sequencer, at least the ones I am familiar with are just that, a rotating drum that has raised points on it that operate contacts, so when the drum is indexed to the next position, the next sequence/operation is switched.
I believe I have a PLC version somewhere, if I can find it.
Max.
 

dwdohm

Joined Mar 8, 2019
9
Drum sequencer, at least the ones I am familiar with are just that, a rotating drum that has raised points on it that operate contacts, so when the drum is indexed to the next position, the next sequence/operation is switched.
I believe I have a PLC version somewhere, if I can find it.
Max.
Yes, Max's example is what I was describing.
The RSLogix instruction would be "SQO" for an output sequencer (I don't recall the equivalent in CodeSys).
How's that for brevity Max!
Now, the "rest of the story" .... Struthers Dunn and other manufacturers built mechanical drum sequencers that came in two versions, one with a synchronous motor (time driven sequencer) and one with a solenoid that drove a pawl and sprocket that advanced to the next step each time the solenoid was energized (event driven).
These were commonly used for tasks such as regeneration of water softeners and in palletizers.
Both drove a "drum assembly" that had a row of microswitches, each centered over wheels with removable spikes or cams, that could be adjusted to close the corresponding microswitch for one or more segments of rotation of the "drum".
Us saloon goers also enjoyed an earlier implementation ..... player pianos (Hey Miss Kitty, ya' feelin' lonely with Marshal Dillon out of town????).
I'm guessing I'll have to put together a node with an indexed array and timer myself, because I haven't found a user contrib node (and I'm fighting the impulse to pull out an old Micrologix that I used in another house or load CodeSys on a Raspberry Pi because Node Red would be a much more elegant solution).
Cheers,
David
 

RobNevada

Joined Jul 29, 2019
24
Hi David,
The same thing could be done with an Arduino with a small amount of coding. A digitalRead (sensor location)and a digitalWrite would do most of what you are after. You could also write a serial out to a Pi and monitor in Node Red.
 

dwdohm

Joined Mar 8, 2019
9
Hi Rob,
I considered doing the sequencer inside of the ESP8266 that I use as a valve controller. Issue is that I have more than one valve controller (banks of valves are in 3 separate locations).
This would mean that I would have to feed the steps for the other valves controlled by separate ESP8266 boards back to node red to have the logic there for manual override and UI indication.
I'm in the middle of experimentation with LoRa nodes (ESP32 Heltec units) and building and testing antennas to boost the range right now, so I probably won't get back to the irrigation controls until the rain becomes infrequent enough here in the Central Coast of California that I have to start watering again.
I think I may have purchased a "Sprinkler Pi" Hat a few years ago that is stashed in a box somewhere, so I may look into how I might use that as a basis for the irrigation (since I'm hosting Node Red on a Raspberry Pi). Depending on how easy it is to expand the number of valves and route the binary state out to my MQTT broker (directly or via Node Red) to publish the valve state to the remote ESP8266 controllers, this may also be a solution.
Thanks for your suggestions.
I'm off to look at impedance matching of folded dipole driven elements to see what might be the simplest method of fabricating them for use in Yagis.
If you find yourself fussing around with something similar, check out the Nano VNA-F vector network analyzer. One heck of a bargain, and does a real good job (especially when paired with the NanoVNA software package).
Cheers,
David
 

dendad

Joined Feb 20, 2016
3,186
If you go with the Pi, after it is all up and running, make the SD card file system read only. Otherwise the SD card wears out over a time. For instance, my telephone exchange died after about 4 years. That may seem like a long time, but I would have liked it to run for 100 ;)
As you may note. I did not know about the read only file system then.
 
Top