Hello guys, me and my team managed to mount a Edge IO with which we monitor our machines using GPIO in Node-Red. We’ve also purchased a set of andon lightstacks that we plan to use.
Both the sensors and the lightstacks will be managed from Node-Red.
The flows for the GPIO sensors were easy to make but for the andons is a bit more tricky. The lightstacks will be controlled using the phidgets 16x SS Relay. We would like to be able to switch the different lightstacks’ colors based on the state of the machine.
We managed to understand how the phidgets SSRs work in Node-Red and we managed to even control the duty cycle for the frequency controlled ports of the relay.
We would like to be able to take the machine states from Tulip and use the in Node-Red to control the SSR and, in turn, the Andons but I wasn’t able to find a solution for this (Running - Green, Idle - Yellow, Stopped - Red).
We already have triggers in Tulip to control the states of the machine and I was thinking to import the trigger logics into Node-Red but that would not be idea.
Maybe some of you can provide us with some ideas or solutions to our problem, thanks!
Hey @alex.moraru , thanks for posting!
This is a great use-case - happy to hear that you’re finding the Phidgets relay useful.
If I’m understanding right, the issue is that you would like the Andon light (from node-red) to reflect the Machine State that exists in Tulip. There are two options here that I can see:
-
Drive everything within node-red. As you correctly state, importing trigger logic to node-red is not ideal, but is possible. However, if you are changing your andon light based on logic within node-red this will be the fastest way to see a result as all logic is running locally on the Edge Device. If you only have three states, I don’t think this logic should be too difficult to re-create: I could even see it possibly done with a single
function
node. -
Drive information back from Tulip to Node-RED. In order to do this, you need something, in Tulip, to send a message back to Node-RED. This is done with a Connector (see this guide), or by writing to a Tulip Table that the Node-RED flow is checking every so often via the Tables API.
Classically, you need an app to be doing this - all logic has to live inside apps. So, you need an app somewhere that sees the state has changed, and either makes the Connector call or Tables write manually.
Does this help? If it was me, I would recommend simply doing this in node-red to save the headache. It should only take a few nodes - fork off of your existing nodes to just add another action - so now, it’s “send state to tulip” and “control andon”. Shouldn’t be that complex.