cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Calculate M/C Running & M/C Idle Time using JS

Swapnil_More
14-Alexandrite

Calculate M/C Running & M/C Idle Time using JS

I am using Proportional Chart to show Machine Running & Machine Idle time. It's working correctly  but when i am going to show it on value display it's shown wrong. Can anyone help me with any short script to differentiate time and show it on different value display like (Machine Running & Machine Idle).

Regards,
Swapnil More
1 ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:Swapnil_More)

Hi @Swapnil_More.

 

Without a better understanding of your intent, it sounds like you could write a service to calculate these values.  We would recommend that if you are pulling these values from a connected device, that you calculate these values before pulling to the platform to conserve on resources.

 

If this does not help, please provide more information.

 

Regards.

 

--Sharon

View solution in original post

3 REPLIES 3

The ValueDisplay can only show one Value at a time.

I suppose you have two individual values for Running and Idle times, right?

Then you would need 2 Value Displays to display the time...

 

or one ValueDisplay to show the percentage for running times, e.g.

 

runningPercent = (running / (running + idle)) * 100;

I hope this helps...

 

Cheers,

Michael

Swapnil_More
14-Alexandrite
(To:mneumann)

Yes, I have 2 value display.

I want solution for calculation of M/C Running & Idle condition

Regards,
Swapnil More
slangley
23-Emerald II
(To:Swapnil_More)

Hi @Swapnil_More.

 

Without a better understanding of your intent, it sounds like you could write a service to calculate these values.  We would recommend that if you are pulling these values from a connected device, that you calculate these values before pulling to the platform to conserve on resources.

 

If this does not help, please provide more information.

 

Regards.

 

--Sharon

Top Tags