7 Replies Latest reply on Jan 17, 2017 4:07 AM by tjason RSS
    tjason Newbie

    How to create a counter

    Hi All,

     

    I'm new in Thingworx, i facing a problem below:

     

    I want to create a Thing/Services that contain the information below

    1. Input parameter named "machine_Run", base type "Boolean"

    2. A variable named "total_Qty", is integer/long

    3. With the condition machine_Run = 1, "total_Qty" will keep on increase (total_Qty = total_Qty +1; every sec +1 if possible)

    4. When machine_Run changed from 1 to 0, will insert a single record into SQL (DateTime and total_Qty)

    5. Is it possible to make the Thing/Services to run in background?