How to hold last greater value until next value?

I get values pyrometer from OPCDA server. This pyrometer measures the hot bar. The bar has to measure after entering the angle of view, then the bar moves, there is the outward viewing angle. The output is zero. How to keep great value until next bar?

You can use context.set and context.get to compare values

Use a join node set to produce an array after 2 values.
Try this flow to see the principle.

[{"id":"46eb32e6.39048c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"5ee5f03f.b624","type":"join","z":"46eb32e6.39048c","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":320,"y":80,"wires":[["74c796a9.0543c8"]]},{"id":"70b0c453.c3541c","type":"inject","z":"46eb32e6.39048c","name":"","topic":"","payload":"500","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":60,"wires":[["5ee5f03f.b624"]]},{"id":"d3006bfa.d790d8","type":"inject","z":"46eb32e6.39048c","name":"","topic":"","payload":"600","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":100,"wires":[["5ee5f03f.b624"]]},{"id":"74c796a9.0543c8","type":"debug","z":"46eb32e6.39048c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":600,"y":100,"wires":[]}]

I am not sure exactly what you want, but if you want to keep track of a maximum value then the smooth node can do that I believe. However it may be that I don't understand the problem fully.

I appoligies.

It's a one float input. It's change between 0...1000 celcius degree. I would see pickup value in GUI until the next bar.

Best regards

Have a look at the smooth node as I suggested. See if that does it for you.

Almost default setting solved my problem. Thnks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.