How to Configure Multiple repeat intervals for different Alarms& Events ->5Seconds ,4Seconds etc.,

I Need Two Repeat Intervals for same Node . One Interval is 5 Seconds & other one is 4 Seconds, as Machine is sending the events in different times viz., 5 seconds & 4 Seconds. But Now I am able to capture one event 5 second OR 4 Seconds. But I need both of them. My requirement screenshots below:


For anything other than simple, straightforward timings I would use the node-red-contrib-cron-plus node.

In fact... What is the purpose of this?
Is it to somehow to add a timestamp to data for a database entry?

This for capturing PLC machine Events. As the events are not getting in regular intervals some are getting in 3 to 4 seconds and most of them getting in 5 seconds. if i configure 5 seconds then 3 to 4 seconds events are missing. if I configure 4 seconds then getting duplicate records. My purpose is avoid duplicate records and get all events like., 5,4,3 seconds. So, I have to combine all events from node red.

What PLC and what PLC node are you using?

Please show us what you are doing (screenshot and explanation) - I suspect there is a better approach.

A Filter (report by exception) node would eliminate duplicate readings.

Purpose of the given node-red flow-> Reading KepwarePLC data and inserting into SQL DB. Events Data is not getting regular intervals from KepwarePLC instead getting randomly like 3 sec,4sec, 5 sec. Hence I am unable to define/configure repeating interval (.As configration screen allows single value only ), but I need multiple values to be defined for 3sec, 4sec,and 5sec. My flow & screenshots are enclosed.

The picture of your flow makes me think you misunderstand Node-red and flow based programming in general.

Do your Kepware sensors spit out readings every few seconds? How - is it put into a file, displayed on a web page, submitted to a messaging application?
Or do you request the latest readings? Via a web page, a messaging application, a C program?

However you interface Node-red and Kepware, neither an inject nor a function node will retrieve the data to put it into a database.

Can you explain what each step in your flow is supposed to achieve?
Why two mysql nodes?

It's probably a good idea to install the mysql nodes and configure them so that you can connect to your database!
The red triangle above one of your function nodes indicates a syntax error.
Once you fix these you can start running the flow, probably essential for understanding the way Node-red works.
Personally I would not use repeated injection until I had the flow working for a single injection.

The only my issue is kepware readings are getting in irregular intervals(through Node-Red fixed intervals only configured) and it unable to configure . Anybody can suggest how to config programmatically for multiple options for configuration. please contact me through gmail-> ts2427579@gmail.com

Hi

My node-red flow is using for Pharma Equipment. When ever Equipment starts it generates varies Alarms & Events. In my case monitoring Events.

Machine will run for specific period as per product requirement. If it Runs 3 Minutes say 21:15:30 Hrs to 21:18:30 Hrs.

The first Event will generates like.,

  1. Machine started 21:15:45
    ( it holds for 5 Sec )
  2. Machine Stopped 21:18:45
    (It holds for 5 second )
    In the Inject node is configured repeating interval as 5 seconds and it working every thing ok.

However, some times Events are holding less than 5 seconds (3 to 4 seconds) than the Events are not capturing.

So, My requirement is how I include/configure 3 seconds repeatation and 4 seconds repeatation along with 5 seconds through the inject node( first node in diagram) of the flow.

As in the inject node configuration only one option is available configuration.

Can you help for programmatically configuration for including 5/4/3 seconds in inject node.

Regards
T SATYANARAYANA

| jbudd
22 August |

  • | - |

The picture of your flow makes me think you misunderstand Node-red and flow based programming in general.

Do your Kepware sensors spit out readings every few seconds? How - is it put into a file, displayed on a web page, submitted to a messaging application?
Or do you request the latest readings? Via a web page, a messaging application, a C program?

However you interface Node-red and Kepware, neither an inject nor a function node will retrieve the data to put it into a database.

Can you explain what each step in your flow is supposed to achieve?
Why two mysql nodes?

It's probably a good idea to install the mysql nodes and configure them so that you can connect to your database!
The red triangle above one of your function nodes indicates a syntax error.
Once you fix these you can start running the flow, probably essential for understanding the way Node-red works.
Personally I would not use repeated injection until I had the flow working for a single injection.

What exactly are these "Events"?
How do you see them?
What does "It holds for 5 seconds" mean?

Above I suggested using a Filter node to avoid duplicate processing.


Do you have a reason to reject this approach?

You can also construct your SQL INSERT statement so that if a record already exists you do not get a duplicate.
Do you have your mysql nodes working yet?

Events nothing but a messages getting from from Kepwere and it flash for 5 seconds (holding) after that it will erase. So, I have configured inject node of node-red flow & it capturing the event ok.

My concern is if the event flashes 3 sec or 4 sec inject node unable read it(because I configured for 5 sec flash).

My requirement is inject node can able read 5sec as well as 4 sec & 3sec (Kepware flashing for 5 seconds and some times it flashing in 3 sec /4sec) without data loss/data duplicate records.

In inject node configuration for repeat interval option available for single value only.

if follow above flow i will get duplicate records 5 times because kepware flash for 5 seconds and repeat interval runs 5 times.
We cannot construct sql insert as vendor does not allow it

Yes sql nodes are working ok

Can we have option of gate node it will take 3 configuration values for 5/4/3 seconds and output only one value as per the kepeware flashing the event like.,
if event flash for 5 seconds ->out must only one record
if event flash for 4 seconds ->out must only one record (it can read 4 seconds )
if event flash for 3seconds ->out must only one record (it can read 3 seconds )
And it avoid the combinations of all values.

I don't have anything more to suggest.
Good luck solving this problem.

You have not explained (or I have missed it) how you get the messages from Kepware into node-red. Also we don't understand what you mean by Kepware flashing. Remember we don't know anything about Kepware (or at least very little).

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