You are not logged in.
Pages: 1
Topic closed
Hi,
i really enjoy your software and 'writing' code with it. As for now i just played around. It's a nice tool to get in touch with PLC programming and logics.
One possible project idea for me would be to have one RPi master running and a few slaves for decentralised peripherals. For instance the RPi zero w in the kitchen which controls the cabinet light by PIR sensor or switch could be set up with REX and communicate with RDC FB with the master RPi to turn the light on/off by HMI.
Also the decorational light next to the TV could be controlled with RPi zero running REX. Additionally connect a temp/humidity sensor on each slave to monitor room climate. Maybe add an outdoor weatherstation to the list.
I am uncertain about the licensing options for such a scenario. If understood correctly i would need an advanced licence for each RPi to connect. Right now an Arduino controls the kitchen lights.. sure its not connected to the network but it does the job. But buying the advanced licence or even just the starter licence would be a bit to much considering the hardware vs software costs (not talking about multiple slaves yet).
Don't get me wrong... I would not mind buying the advanced licence once and to rewrite e.g. the kitchen lights in REX for exercise.
That use case set i would be better of just running all slaves with python scripts and polling a SQL DB for flags set to initiate commands or have UDP communication server/clients.
Any opinions, ideas, workarounds or other solutions to the matter are very welcome.
Cheers
Seb
Offline
Dear Seb,
thanks for your kind words, glad you like our software! Also thanks for your question, I understand your concern about the price. REX is a family of software products mainly targeted at industrial automation and therefore it might be an overkill for your scenario and thus seem overpriced. On the other hand, consider how much time you save compared to traditional hand-coding. For a small project this might not be that significant but as the project grows, this becomes more and more apparent. And based on our experience, even the smallest projects grow and grow...
Nevertheless, you have the following options:
You can use RDC block for bidirectional data exchange. You would need RexCore Plus licence for each device.
You can have RexCore Plus on your master device and RexCore Starter on the slave devices. Then, on your master device, you can use the HTTP2 block to write data to the running algorithm on the slave device and read some data back. Even RexCore Starter provides a REST API. See example 0302-01 in our GitHub repository of example projects: https://github.com/rexcontrols/REXexamp … master.zip
You can have RexCore Plus on your master device and use e.g. Node-RED on the slave devices. Just like in the above, you will use the HTTP2 block to read/write data from/to the Node-RED flow (using HTTP POST and GET requests).
You can have RexCore Plus on your master device and implement UDP data exchange using the REXLANG programmable function block. See example 0504-01. On the slaves you can run e.g. Python scripts.
Or you can have RexCore Starter on your master device and use it as a "server" for the individual nodes, which will be pushing data to REX algorithm and retrieving it back using the REST API of RexCore. See example 0302-06 which uses Node-RED again but you can achieve the same with Python scripts.
You can decide to implement everything on your own.
No matter what option you choose, I'll be happy to hear your thoughts.
Best regards,
Jaroslav
PS Since you mentioned Arduino, you might be interested in using some ESP8266-based Wi-Fi modules. These are excellent nodes for scenarios 3-6.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Pages: 1
Topic closed