[HN Gopher] Arduino PLC IDE
       ___________________________________________________________________
        
       Arduino PLC IDE
        
       Author : Lwrless
       Score  : 55 points
       Date   : 2024-09-05 15:17 UTC (7 hours ago)
        
 (HTM) web link (www.arduino.cc)
 (TXT) w3m dump (www.arduino.cc)
        
       | LtWorf wrote:
       | Haha omg why!!
       | 
       | My dad had an industrial machine and he coherced the maker to
       | give him the sources and it was done with this versapro thing.
       | 
       | Graphical environment + a gazillion of memory bugs because there
       | were no variables, just memory addresses, and you were supposed
       | to remember how many numbers to skip, depending on the size of
       | the variable.
        
       | kevin_thibedeau wrote:
       | I don't see what they they think the market is for pseudo-
       | industrial hardware that lacks the bare minimum of ESD protection
       | and terminations. And they want suckers to pay a premium for
       | their black PCBs that have nothing about them to justify the
       | cost.
        
         | sgt wrote:
         | Probably for folks who want to play around with PLC
        
           | dfox wrote:
           | The only reason why you want to use PLC is that the fact that
           | the hardware is generally robust and has industrial IO
           | interfaces offsets the totally horrible developer experience
           | of IEC 61131-3.
        
             | sgt wrote:
             | Doesn't sound like a great way to be spending one's days.
             | Is there another type of PLC developer experience that is
             | superior? I don't know much about PLC.
        
               | buescher wrote:
               | The PLC developer experience makes it possible for
               | average technicians to do some things (like, things
               | people typically use PLCs for) in days that would take
               | average embedded C programmers weeks. It's worth taking a
               | look at.
        
               | minkles wrote:
               | Yeah this. It's about getting work done.
               | 
               | PLCs also replaced a hell of a lot of very unreliable
               | wiring and electromechanical hardware.
        
               | dfox wrote:
               | That might be case for small non-modular PLCs that
               | replace what would otherwise be half a cabinet worth of
               | relay rat's nest. That is a valid use for PLCs and the
               | ladder diagram is also somewhat natural for that.
               | 
               | But in many cases you have large-ish systems that have
               | various lookup tables in PLC memory, do non-cyclical
               | communication (ie. communicate with something external
               | over some "normal" protocol, not over fieldbus) or even
               | just contain many instances of the same logic (there are
               | PLC families that cannot do indirect accesses to the
               | process image memory, so if you want the PLC to do 12
               | instances of the same trivial logic, there is no way to
               | do that in a loop and you have to copy-paste that 12
               | times...). In my opinion for many of these situations
               | just programming the thing in "real" programming language
               | (even while preserving the cyclic process image model)
               | would be very beneficial.
        
               | Eduard wrote:
               | > The PLC developer experience makes it possible for
               | average technicians to do some things (like, things
               | people typically use PLCs for) in days that would take
               | average embedded C programmers weeks.
               | 
               | can you give examples where that is the case? It's hard
               | for me to believe this. The embedded C ecosystem has all
               | the best practices available (software and hardware
               | abstractions, libraries and frameworks, unlimited open
               | source availability, transparent tool chains, testing,
               | build automation, continuous deployment, huge developer
               | pool with shared)
               | 
               | Does PLC match ALL this and even go beyond?
        
               | Salgat wrote:
               | At least with ladder logic, at the steel mill I worked
               | at, even electricians with no programming experience
               | could look at a ladder logic program and troubleshoot the
               | problem, even remotely adjust controls and do overrides.
        
               | CameronBanga wrote:
               | Unfortunately, there really isn't. Phoenix Contact has
               | their PLCNext which is alright. But regardless of the PLC
               | you work with, the developer experience is pretty bad
               | compared to what anyone here is going to be familiar
               | with.
        
               | weaksauce wrote:
               | structured text is about the best thing you are going to
               | get in the plc world. it's kinda bad and has a ton of
               | quirks but it's alright.
               | 
               | ladder logic is painful but works pretty reliably and
               | probably the easiest to learn.
               | 
               | depends on what you want to do and what you're familiar
               | with. in all PLC is a different programming paradigm than
               | you are used to.
               | 
               | the simplest and cheapest way to get into it is probably
               | automation direct stuff or maybe the arduino pro stuff.
        
           | minkles wrote:
           | You can buy a shitty clone PLC off aliexpress if you want to
           | do that.
           | 
           | They are similarly priced to the arduino and the hardware
           | interface is several orders of magnitude more robust.
        
           | MisterTea wrote:
           | Under $100 and software is free: https://www.automationdirect
           | .com/adc/shopping/catalog/progra...
           | 
           | With Ethernet that supports both Modbus TCP and Ethernet/IP,
           | two very standard industrial protocols*: https://www.automati
           | ondirect.com/adc/shopping/catalog/progra...
           | 
           | Note: I *HATE* EIP but we're stuck with it in the USA.*
        
         | rpcope1 wrote:
         | Like a lot of Arduino products, it must be targeted at people
         | who don't know any better and whose sole exposure to electrical
         | engineering or systems engineering is what they see in make
         | videos. Automation direct PLCs are cheaper than whatever
         | they're hawking here and almost certainly way more robust
         | (having used a few, they were surprisingly good). Anyone who is
         | using PLCs in a remotely serious industrial fashion is almost
         | certainly going to keep buying Rockwell or Siemens anyways.
        
           | LtWorf wrote:
           | > Automation direct PLCs are cheaper
           | 
           | Uh... no.
        
             | MisterTea wrote:
             | Click is competitively priced with the Opta and programming
             | software is free.
        
           | erik_seaberg wrote:
           | There may be competing products, but you can't go to a
           | screwdriver shop today and buy quantity=1 to learn from,
           | which vendors should have accommodated even at some
           | substantial margin.
        
             | folmar wrote:
             | Any large supplier will hapilly sell you one PLC of any
             | type (there are also quite a lot projects needing just one
             | piece of specific PLU), the tools might kill your budget
             | though. And there are special beginner/low scale series
             | like Siemens LOGO with simplified configuration and cheaper
             | simpler tooling.
        
               | erik_seaberg wrote:
               | https://mall.industry.siemens.com/mall/en/WW/Catalog/Prod
               | uct... seems like a difficult vendor, with no buy button
               | and no price tag.
        
               | seabird wrote:
               | Call your closest electrical supply and get the price.
               | Plant maintenance technicians are comparatively old-
               | timey, so ask yourself how you would do it in 1990 and
               | try that.
               | 
               | And for the record, brand new Logos are like $100-$200 on
               | the low end and you probably shouldn't use them. The low
               | end of S7-1200 will come in between $500-$1000 and is
               | much more likely to fulfill your needs.
        
               | doobiedowner wrote:
               | Sure, call. Do a back and forth with calls and emails for
               | two days with their sales guy to make sure they got it
               | right. Spending five to six figures. 5-15% of order shows
               | up incorrect.
               | 
               | When you go to try another distributor: No, you're in
               | crappy vendor's territory. So, sorry!
               | 
               | Waiting for that invisible hand of the free market to
               | step in...
        
           | MisterTea wrote:
           | > Like a lot of Arduino products, it must be targeted at
           | people who don't know any better and whose sole exposure to
           | electrical engineering or systems engineering is what they
           | see in make videos.
           | 
           | Industrial automation is exactly this. If you look up the
           | history of the PLC, Dick Morley, founder of Modicon,
           | specifically designed it to hide the computer part. The
           | reasons were twofold: partly for marketing as in ye olde days
           | computers were big, expensive and required costly engineers,
           | and to enable plant electricians and other maintenance
           | personnel the ability to program them using ladder schematics
           | which is why we have ladder logic. So from the beginning the
           | PLC has been targeted at non-technical personnel.
           | 
           | > Automation direct PLCs are cheaper than whatever they're
           | hawking here and almost certainly way more robust (having
           | used a few, they were surprisingly good).
           | 
           | Indeed, though I only like the Click. I have two Clicks at
           | home and used them at work for all sorts of little projects.
           | I haven't bothered with their Productivity line as I dont
           | think it's a very forward thinking platform as its stuck in
           | the 90's with parallel busses on backplanes with proprietary
           | expansion (literally a clone of their Koyo DL series). Then
           | there is their legacy Direct Logic series from Koyo which is
           | solid as hell but long in the tooth. Now they are selling LS
           | Electric which makes me feel they are all over the place PLC
           | wise.
           | 
           | For bigger automation projects I use Beckhoff gear which is
           | very modular and their EtherCAT protocol is very well
           | designed and thought out - deterministic structs over
           | Ethernet. My only gripe is the big shitty Visual studio shell
           | IDE that tends to fall over but every automation vendor has
           | big shitty IDE's. Thankfully they have a FreeBSD runtime
           | alternative to Windows Embedded for the controller side. I
           | can write real-time PLC programs in C/C++ and whatever on the
           | Windows/BSD side. Or stick with IEC 61131-3 languages.
           | 
           | > Anyone who is using PLCs in a remotely serious industrial
           | fashion is almost certainly going to keep buying Rockwell or
           | Siemens anyways.
           | 
           | That is more of an industry trope: "no one ever got fired for
           | buying IBM" but replace IBM with AB for the USA or Siemens in
           | Europe. Basically, Enterprise grade automation with all the
           | associated enterprise goodness: high cost, licensing, price
           | gouging legacy support, and poor technical decisions. I stay
           | away from it.
        
             | fluorinerocket wrote:
             | Beckhoff is so awesome. I bought at least 100 of their EP
             | series modules, which are IP65 and can be mounted anywhere
             | and use M12 and M8 connectors, so with the right sensors
             | you can just connect with an off the shelf cable, no wiring
             | connectors. No running endless sensor and actuator cables
             | back to a central cabinet.
             | 
             | And you get fast deterministic control with etherCAT no
             | problem.
             | 
             | Don't sleep on beckhoff
        
             | petsfed wrote:
             | There's also this really weird fear in that industry of
             | open-source anything.
             | 
             | A while back, I was investigating security options for PLCs
             | (in the light of e.g. stuxnet), and while Siemens and
             | Rockwell do ultimately feature such things, there was
             | always a lot of "you can trust _our_ security schema, but
             | you can 't trust that open-source stuff, anybody could put
             | anything in there".
             | 
             | There are very good reasons to use PLCs, that the Arduino
             | PLCs completely fail to address. But I'll bet that a lot of
             | criticism within the industry will come down to "its open
             | source, so you can't trust them!".
        
             | willglynn wrote:
             | Seconding Beckhoff. EtherCAT is a fantastic protocol,
             | TwinCAT/BSD works great, reliability is excellent. It's
             | super nice to run realtime PLC code on specific processor
             | cores with us of jitter while other cores run a normal OS
             | with normal applications (e.g. VictoriaMetrics) on the
             | controller itself.
             | 
             | I have a construction project involving several buildings
             | with overlapping infrastructure. Everything gets connected
             | to EtherCAT as quickly as possible. Electric generation:
             | solar panels, batteries, inverters. Energy management:
             | branch circuit monitoring, weather forecasts, solar
             | forecasts, load control for things like EV charging and
             | water heating. HVAC: heat pumps, buffer tanks, circulation
             | pumps, valves. Building automation: lighting, access
             | control. I just add I/O wherever, connect over Ethernet,
             | and glue all the signals together in software.
             | 
             | I wouldn't dare approach a project like this with Arduino.
        
               | doobiedowner wrote:
               | How is procurement process with Beckhoff? I am tempted to
               | make the jump from mostly AB.
        
               | willglynn wrote:
               | It's... fine? Unlike certain other brands, I've
               | encountered no network of frothing, territorial,
               | gatekeeping dealers with Beckhoff. For my project, I
               | reached out to sales.usa@beckhoff.com, got a rep, asked
               | for a quote, and went from there.
               | 
               | Secondhand can be viable too. Some of my "jellybean"
               | EtherCAT terminals came from eBay. I won't get help from
               | Beckhoff if they break, but given that I already have
               | replacements on hand, I'm really not worried about it.
               | 
               | Beckhoff also lets you download almost all the
               | development tools, runtimes, and PLC libraries without
               | paying. In their words:
               | 
               | > Trial licenses can be generated in the TwinCAT 3
               | development environment (XAE) for many TwinCAT 3
               | functions for a validity period of 7 days. This can be
               | repeated any number of times. An internet connection is
               | not required for this. In this way, these TwinCAT
               | functions can be used simply and cost-effectively in
               | laboratory operations, e.g. in the education sector.
               | 
               | This is obviously useful for development and
               | experimentation. It can also be an escape hatch in
               | production if you need to substitute controllers.
               | Beckhoff wants you to pay for what you use, sure, but
               | their licensing scheme goes out of its way to avoid
               | kicking you when you're down.
        
           | nick__m wrote:
           | I second your opinion on Automation Direct PLC. I use a few
           | of them in an installation for a museum 15 years ago and they
           | had a surprisingly good reliability/feature/price ratio.
        
             | doobiedowner wrote:
             | Cheap and reliable goods. Free software. Great prices.
             | Decent Docs.
             | 
             | Best of all, no middle men distributors to dick around
             | with. It is so easy to buy their stuff compared to almost
             | all other controls hardware.
        
         | LeifCarrotson wrote:
         | It's all about the education market - whether in schools or for
         | maintenance techs and electricians to educate themselves and
         | get promotions to controls engineering positions.
         | 
         | No one in their right mind is using this as a product around
         | which to build a machine or a business.
        
         | joezydeco wrote:
         | I met with Arduino the other month. They're trying to get into
         | the industrial market with a line of "pro" turnkey hardware,
         | using their software ecosystem on top.
         | 
         | https://store-usa.arduino.cc/collections/pro-family
        
         | obscuretone wrote:
         | Prototypes.
         | 
         | Have 100% used arduino to PoC industrial electronics in a
         | startup setting.
        
           | MisterTea wrote:
           | Serious question: Why not use a low cost PLC?
        
         | minkles wrote:
         | Yeah this.
         | 
         | It actually scares the shit out of me when I see stuff like
         | this because I know someone naive will use one somewhere
         | completely inappropriate and something bad will happen.
         | 
         | (Ex EE for ref)
        
         | eternityforest wrote:
         | I think we need something in between PLCs and Arduinos, but
         | anything like that is very rare.
         | 
         | Like, just put some 220 ohm resistors, PCB spark gaps, and ESD
         | diodes on every pin, and you've covered a lot already.
         | 
         | I'm planning on ordering some PCBs for something similar in a
         | few days, and I'm still confused about why this doesn't exist
         | already.
         | 
         | So many simple cheap things could be done to make Arduino
         | better. Like, connecting individual pins is fun very briefly as
         | a beginner, after that I want nice clean professional
         | r/cableporn.
         | 
         | Give us 3 pin servo plugs or STEMMA connectors for everything.
         | 
         | Put a diode on the USB-C line so I can power it externally
         | without back feeding and breaking the spec.
         | 
         | Maybe figure out your inrush current so I can have some peace
         | of mind that it won't break itself with inductive current
         | spikes.
         | 
         | Maybe stop using crappy blue relays. 99% of DIY projects do not
         | switch 120vac. Why can't we have protected MOSFETs that don't
         | wear out?
         | 
         | Can we quit using a different pinout for ever everything? Just
         | make your module copy something similar. Every little I2C
         | display thingy has a different pinout for no reason, seemingly
         | evenly distributed across all the possible combinations.
         | 
         | Give us a 5v IO pin for addressable LEDs. Why am I still using
         | discreet 5mm LEDs with dead bug soldered on resistors for
         | space-constrained stuff?
         | 
         | Hobby type MCU boards are too deep in the "Hacker" mindset,
         | where the tech _is_ the focus, as opposed to being part of
         | something else.
         | 
         | Adafruit does great stuff, but so many boards are just... Meh.
         | 
         | Anything you build without getting a custom PCB almost always
         | winds up as cable spaghetti even for trivial things, and it
         | doesn't need to be like that.
        
           | petsfed wrote:
           | I think its because the difference between "hacked together
           | on top of an Arduino" and "hacked together on top of an
           | Arduino _with ESD protection and connectors_ " is basically
           | nill. The market for that in-between species has got to be an
           | order of magnitude smaller than either, because the problem
           | becomes the one-size-fits-all approach.
           | 
           | I _hate_ how many screw terminals appear in the average PLC
           | wiring scheme, but there 's really no other way to get things
           | as customizable as the customer wants without servicing a
           | million and a half SKUs. It sucks, but that's the business.
        
       | deburo wrote:
       | Ah, I thought it was something new, perhaps offering a IDE built
       | on modern tech. It looks like it's built on old Win32 common
       | controls, surely with poor text editing features.
       | 
       | I wonder who's going to be the first to integrate something like
       | VSCode in their dev environment.
       | 
       | The dev tools in the industrial automation industry are so
       | depressing, luckily we have the excellent Ignition (from
       | Inductive Automation) for HMI/SCADA development.
        
         | gaze wrote:
         | Modern tech like electron? Qt might have been nice but win32 is
         | snappy and dependable.
        
         | fragmede wrote:
         | A number of places have VSCode extenstions for their dev
         | environment, eg ExpressIF for Esp32.
        
         | stefcoetzee wrote:
         | SIMATIC AX seems to be a step in the direction of VSCode
         | integration.
        
         | Gracana wrote:
         | I gave this a shot a while back and it's as clunky as it looks
         | in the screenshots, so about the same as the established
         | industry.
        
       | deadlyllama wrote:
       | How prevalent is ladder logic for new industrial systems?
       | 
       | Over two decades ago I was programming a Foxboro PLC in their
       | SALL language, which was compiled down to C. Variables and
       | control structures! And you could hack the C if you wanted your
       | state transitions to go faster.
        
         | applied_heat wrote:
         | For Boolean logic ladder is still a good visual representation
         | that can be animated to make it obvious which inputs are
         | determining the output.
         | 
         | In Allen Bradley rslogix it can be entered quickly using the
         | keyboard.
         | 
         | In my opinion the ladder paradigm is poor when dealing with
         | numeric values, and function block better serves the purpose
         | there
        
         | folmar wrote:
         | It's sadly bread and butter, if you order a typical PLC program
         | made-to-measure you'll get ladders. Anyway custom languages are
         | certainly not the way to go, IEC 61131-3 languages are
         | virtually always used, LD being most popular and SFC also gets
         | its share.
        
         | synecdoche wrote:
         | In my opinion Ladder logic is easiest to troubleshoot, as cause
         | and effect can be easily followed, especially when being
         | connected online and seeing the signaling. Unless events are
         | too quick. Then no language has the advantage. Then data trace
         | is helpful.
         | 
         | Structured Text is superior when it comes to calculations, bit
         | manipulation and code flow (loops, conditionals etc). Sequences
         | diagrams are advantageous for abstracting sequences. Function
         | Block Diagrams are good for connecting abstractions. They all
         | have their place imo, except Instruction List, which I can't
         | think of having a single advantage.
        
       | kristerj wrote:
       | It kinda seems like we've taken the best part of arduino
       | (programming environment) and replaced it with the worst part of
       | PLCs (IEC 61131). In turn we have traded the reliability of PLC
       | hardware and compatibility with industrial sensors with hardware
       | that has none of that.
       | 
       | We have actually been getting away from proprietary PLC's just so
       | we can get away from IEC 61131. Its taken a few years but we are
       | about there.
        
       | heyflyguy wrote:
       | Ladder logic? Ugh, come on!
        
       | snvzz wrote:
       | Damn. I was expecting ladder for everyone. I am nostalgic for
       | ladder, which I learned alongside basic in the late 80s, and
       | haven't used since. I'd run PC-LDR on a PC emulator (transformer)
       | on the Amiga 500.
       | 
       | But it's walled behind a license fee. So no ladder for everyone,
       | but rather, ladder for people who are already using ladder and
       | aren't gonna drop their PLCs to adopt Arduino.
       | 
       | Sad.
        
       ___________________________________________________________________
       (page generated 2024-09-05 23:00 UTC)