Electronic – Are there any commercially available PLC’s that can compile/ download programs through an API

automationinterfaceplc

My team has decided to use a PLC for controlling an industrial process that requires simple, real-time IO to external devices with minimal processing. However, we expect the exact outputs needed to vary between runs (in fact, a given run will very rarely ever be repeated), and the operator will not have any PLC/ software programming experience.

While I can't disclose the actual product, the best analogy would be that we're designing an industrial smoothie maker, with PLC controlling precisely the opening and closing of different valves in real-time. The operator will use our software to design a custom sequence of additions of different reagents and the on/ off of relevant heavy machinery (e.g., an industrial mixer).

Here's the challenge: our current approach is to write our own compiler that translates the instructions that the operator gives (open valve A for 10 ms, open valve B for 20 ms) into ladder logic and PLC machine code. We would then directly download our self-compiled program to the PLC via serial. All of this would need to be automated so that the operator only needs to click a button after coming up with his sequence of steps.

However, despite my research, I have not found a single PLC vendor that both 1) has a compiler with API or publishes enough information about their PLC machine code to allow one to write a compiler, 2) supports direct downloading of programs to the PLC without use of the vendor's programming software (CX-programmer, Atmel studio, etc.).

I'm led to believe we might be taking the wrong approach, or at least don't know what product to look for. The i/o is simple enough to not justify the building of our own board, but the functionality we're looking for, namely PLC interaction with high level PC software, doesn't seem to be available.

Ideally, we'd like to download the entire program to the PLC at once and not be sending instructions one at a time. Execution of all instructions on the PLC (or whatever device we end up using) needs to be real time.

Are there any commercially available PLC's that support compiling and downloading of machine code, such that the entire process could be automated by a larger program? Is there any other way to download a real-time program to a PLC written by PC software written in a high level language?

Best Answer

You can definetely use a PLC for this. Except, you don't want to change the PLC code for each "smoothie recipe".
You should write a PLC application that reads recipes from any source, like sd cards, network storage, internal storage or even QR codes if you're feeling fancy.

Often PLC's already have a feature for this, where a recipe is a set of parameters you can load (and edit with the HMI).

real-time IO to external devices with minimal processing

Whatever you choose to use, do not invent your own PLC. It's probably not worth the time. And don't think the software or additional module is expensive, you are not able write it for that price.