You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • @Thijsmans

    They could most certainly be the heart of a PLC.

    And they are - not just the heart - but the complete PLC. The question is how you program them.

    From your comments I conclude that you expect a higher level of - or more dedicated - sway of programming.

    Looking at what JS already brings to the table and the interrupt driven implementation in Espruino as Hardware, Firmware and Software components / modules, it is already way towering over practically any other (general purpose) micro controller on the market -and even PLCs. And when you would have to pay usage license for what @Gordon and the community have put together, € 600 can be considered 'change'. Said so, does not mean I do not understand what you try to say or the point you make is not taken.

    Developing a next layer / level of programming with a PLC language that is interpreted by a PLCL interpreter is kind of an answer but it breaks the resource budget - memory, cycles, power consumption - these micro controller platforms have to offer and are targeting... Even a Raspberry Pi may reach its limits thinking of something like that.

    A system the way you have an idea of I can see implemented the following way:

    • Satellite / Orbiting Espruinos have a basic infrastructure implemented - including LAN and as backup up WLAN/Wifi or BLE and MQTT and the capability of OTW / OTA update - and run with some dedicated modules sets of sensors. Power supply is POE w/ some local backup to survive a few hours (w/ support of power consuming mode of a satellite).
    • A decent Raspberry Pi (4?) is running the Center / Sun and is equipped with enough memory and storage and connectivity to handle collector / hub / control / monitor / gateway functions.

    Doing something like that non-commercially is quite an exercise... I don't say it is not feasible, but it is a lot of work... and while you settle for a set of sensors, satellite and center configuration and the implementation, these components evolve and settlement becomes pretty quickly outdated.

    This should not discourage you at all to begin with something... You can even run Espruino on the Raspberry Pi (I do though not know about communication support). Start to create a PLC as JS 'class' / prototype that you extend over time with what you need and implement. You come up with some JSON that describes your control definitions that you can send to the PLCs running on each of the satellites of MQTT. Said that, the PLC has core functions to understand receiving such descriptions / configurations, put/update them in place, and start and stop their operation. This is in addition to the operational functions that move control to and data from the PLC control entities and sensors.

About

Avatar for allObjects @allObjects started