Timed change detector

hi,

we are currently configuring a tulip workbench to display vision detectors (pick by light) to our clients.

One interesting ask was would it be possible to configure a timed change detector?

Im looking to configure a region that when a change is detected, it forces the change to stay for 5 seconds in the region, then go to next step.

current process is :
the operator gets its product,
puts one end in liquid,
counts to 5,
takes it out
does the same to the other end
then connects the ends of the tube that is now wet into another product

I know we can configure tulip to detect the change in the region when the tube is put in the liquid, but can it also notify the user when the 5 seconds are complete? and if the operator leaves the region before/after 5 seconds, you cannot go to the next step?

thank you

Hi @knowlec, this is a great question. Here’s what I would try:

Try downloading the stopwatch library app here, and using a “change detected” trigger to start the stopwatch (updating the STOP FLAG boolean variable. When the operators pulls their hand out, set the STOP FLAG to true and reset the timer.

Let me know if this gets you started!

hi @John thank you for your reply.

I took a look at the stopwatch app and I think that can work to give the operator a automatic count of how long the tube has been in the liquid, which is great.

is there any way to get the timed trigger to move to the next step once the stopwatch hits 5seconds? I’ve got it working however there’s a limit that the timed trigger must be at least 30 seconds. It also needs the operator to move their hand away from the region at exactly 5 seconds.

is it possible to have it where once the “stopwatch” hits 5 seconds, the app automatically goes to the next step? without having to get the user to move their hand way and without waiting 30 seconds for the timed trigger?

I’m just trying to automate the process above as much as possible

thanks

I think there should be. I would add a second trigger beneath the one that initiates the stopwatch. In this trigger I would have the following logic:

  • When [interval variable from stopwatch] >= 5 seconds
  • Transition - go to step [whereever you want it to go]

let me know if this works!

@John the trigger logic works, but there still needs to be an event that fires that logic i.e a stop button being pressed or the change detector widget finding a change

the stopwatch is a custom widget that automatically starts once the step is entered.
Would your logic need to be implemented in the custom widget code to work dynamically?

I can get it to work but not dynamically (without a user input of a button etc for the trigger to fire…)

thanks

I got it working by adding in a event to the custom widget that will fire the trigger to go to next step once it goes to 5 seconds, thanks for your ideas John it was greatly appreciated! :slight_smile:

@knowlec that’s a great solution, glad you got it working!