Skip to main content
Aug 29, 2019 5:04 AM UTC
Question

Can any one help me to write java script for this concept

Once the machine gets started, after 30 minutes it has to check the pressure value weather it is less than 100. If not it has to trigger the alarm (the value of pressure decreasing constantly)

Variables:

1. machine start - boolean (1&0)

2. pressure - number

3. alarm- boolean (1&0)

2 replies

Aug 29, 2019 2:56 PM UTC

In Thingworx there are Timers and Schedulers that you could utilize for this.

Let's say you set a one minute timer, that runs and checks if 30 minutes have passed.

if 30 have passed then do the evaluation you need.

Aug 29, 2019 4:21 PM UTC

Depending on how many machines they have, an alternative solution would be to create a dedicated 30-minute Timer per machine, which starts together with the machine, and stops once it fires.