Skip to main content
1-Visitor
Jan 19, 2018 1:44 AM UTC
Question

increment count when push button pressed

Hi, I am sorry if this sounds like a very simple question. I am new to Thingworx and I couldn't find any information in Google.

My situation is as follows:

I have already set up Thingworx and Kepware to read in external sensor data -- For e.g. if a push button is pressed, the "Value" on my Thingworx mashup will show "True", otherwise it will show "False".

My next task is:

Every time the push button is pressed (or equivalently, whenever value changes from False to True), I would like to increment a "Count".

I would appreciate any help from you, or any advice on where to refer to for an answer.

Thank you very much!

Best wishes

Chow

2 replies

1-Visitor
Jan 19, 2018 7:03 AM UTC

You can subscribe the DataChange-Event for your "value"-property. Everytime "value" is changed you can check if "value" is true increase "count".

Translate
1-Visitor
Jan 19, 2018 8:54 AM UTC

Hi David,

Thank you so much for your fast reply! I will give it a try as soon as possible.

Best wishes

Chow

Translate