5 ms·
On one hand I think it's ridiculous to mention these languages for industrial applications. But I've also just spent the past year programming an automated mob
by evv 7y ago
On one hand I think it's ridiculous to mention these languages for industrial applications.
But I've also just spent the past year programming an automated mobile restaurant. We use a traditional PLC for everything safety or time-sensitive, but everything else is JavaScript.
We're planning to use even more JS on the next-gen system. Details are in my profile if you want to help, or if you want to convince me otherwise.
- artursapek 7y agoAre you using TypeScript?
- vb6sp6 7y agoI think you should stick with the language you know the best, especially if you are the one doing the coding.
- katmannthree 7y agoI agree with that, but writing code for industrial applications is fundamentally different from whipping up a backend for the hottest new Lyft for Parrots startup. If industrial equipment malfunctions, people can be killed or horribly maimed. Industrial equipment needs to do exactly what it was designed to do 24/7 for years or decades in horrible (EMI, temperature, etc) environments.
- deleted 7y ago[deleted]
- jiofih 7y agoPretty sure that class of equipment will not be using any kind of Arduino board (see also: certifications above).
- dekhn 7y agoI've been in a few 27/4 biotech labs that run all the environmental sensors, and some of the industrial controls, off arduinos. ALways fun to open a field box and find a DIN-mounted Uno.
- CamperBob2 7y agoHN commenters love to talk about how Raspberry Pi and Arduino boards aren't suitable for use in production hardware. I recently had a chance to wander around one of the bigger EMS factories in the Bay Area, rubbernecking at everybody else's products in various stages of assembly. It's safe to say not many naysaying HN'ers have done that recently, or they would be saying something very different.
- jiofih 7y agoThe comment I was replying to was talking about DEATHS being caused by failure, not environmental sensors. I have nothing against its use.
- CamperBob2 7y agoAgreed, and I'm not necessarily defending this practice, just saying that it is, in fact, being done. One of the RasPi-based devices I saw being assembled was actually some kind of medical device that will presumably have to be FDA-certified. It was going into a very nice enclosure, with top-grade plastics and other materials, and they were building a (literal) ton of them. In principle I'm sure that can be done successfully, but I have to wonder if it'll really save the company that much time or money.
- spookthesunset 7y ago> If industrial equipment malfunctions, people can be killed or horribly maimed. In what way does C vs. python or javascript have any impact on this? If anything, C has way more ability to shoot yourself in the foot than python or javascript. Hell, what about a non memory-managed language like rust? Like somebody else says, this feels more like a cultural issue than an actual technical issue.
- vineyardmike 7y agoBecause the debate is often not C Vs JS/Python, it’s [C, Js, Python] Vs [Ladder Logic, PLC-specific Langs] where PLC languages have time-guarantees in the language
- wolrah 7y agoIf someone is dumb enough to be using an Arduino in a life-critical application then what language they're programming it in is almost a moot point. To the larger point of coding for these kinds of applications, keep in mind that there are entire classes of bugs that are common in traditional microcontroller languages like C which literally do not exist in Python or Javascript. As far as I've seen as an outsider to the embedded world the main barriers to adoption of higher level languages have not been based upon concerns of reliability, but instead memory usage and timing constraints, the former of which is less and less of a real problem outside of extremely cost constrained applications.
- ahnick 7y agoWhat's the automated mobile restaurant?
- evv 7y agoOur first brand is "Ono Blends", a smoothie truck in LA (onoblends.co) To address the sibling comment, we don't use much TypeScript yet, but I'm open to it. I'm also looking at ReasonML because I'm cautious about half-measures when it comes to type safety. Much of our complexity stems from race conditions between PLC and the JS server, so the next system is likely to use node.js on linux boards instead of a PLC. We currently have a supervisory safety system with all safety-rated hardware and controls, and will almost certainly continue using this approach as we replace the PLC.
- kevin_thibedeau 7y agoBASIC was a common industrial automation language at one time. If the platform has the resources, use them.
- msla 7y agoYou've just reminded me of the BASIC Stamp, which lead me to find this interesting website comparing that to the Arduino head-to-head. The BASIC Stamp was weirdly expensive for what it was, but that's probably my post-Arduino post-Raspberry Pi bias: https://todbot.com/blog/2006/09/25/arduino-the-basic-stamp-killer/ https://todbot.com/blog/2006/09/25/arduino-the-basic-stamp-k... > Getting to the “Hello World” of microcontroller projects, the blinking LED, on Arduino costs $32 compared to the $119 for a Basic Stamp. This is perhaps a little unfair because the Basic Stamp board contains a full bread-boarding space. A similar setup for Arduino would cost about $60, still a 2x savings (and can made cheaper if you want). [snip] > The standard Atmel AVR ATmega8 chip used on the Arduino board can be obtained for less than $4. The Basic Stamp must be obtained from Parallax and costs $50.
- mrguyorama 7y agoAs a kid who once got a BASIC Stamp microcontroller and project kit, one super important thing to understand was that it came before Arduino brought the prices way down. It was reasonable for what it was at the time, ie a tool used for teachers that also happened to be sold to the public. I don't know how popular it was in industry
- crtlaltdel 7y agoI've used embedded linux systems for industrial control systems many times. In those applications, as you mention, we integrated with a PLC for life-safety systems or another control system via contact closures. We ran python for most of our on-board system level software and some networking related services. No way in hell would I have used our output relays to do things like close a flood gate.
- mbanzi 7y agoit's a dual core board. you run c++ /mbedos on the CM4 for your mission critical software then you can use the m7 for high level languages / tensorflow. you can even RPC between cores
- mhh__ 7y agoWhy JavaScript? Unless it's a training constraint, I just don't see anything about the language that directs people to write good code. It just seems insane to me to use a language with such bizarre semantics.
- peterwwillis 7y agoInvesting in a better class of developers is not only more expensive, it's more difficult to find them, whereas javascript developers are a dime a dozen.
- pjmlp 7y agoMost modern embedded devices are way more powerful than 60's mainframes where Lisp used to run, or Xerox PARC workstations, so I see it more as culture issue than anything else. Heck, the ESP32 runs circles around the Amstrad that I used to play Defender of the Crown on.