Skip to main content
1-Visitor
January 19, 2018
Question

increment count when push button pressed

  • January 19, 2018
  • 1 reply
  • 1949 views

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

1 reply

1-Visitor
January 19, 2018

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

1-Visitor
January 19, 2018

Hi David,

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

Best wishes

Chow