Use parameterized 'Delay' and 'Repetition' in Sequencer

  • Software
  • Use parameterized 'Delay' and 'Repetition' in Sequencer
Daniel Shaffer

Posted on 24.08.2020 16:52

When building a sequence recently, I came across a need to allow the user to customize the delay between iterations before a test started. I've attached a picture below of a simple example. For instance, we pressurize a container, delay for some time, and then empty the container. Before each test, the user should be able to change this 'Delay' without editing the sequence. We would also like them to be able to adjust the number of iterations of the test. I've made the iterations work in the past using an 'If' statement block rather than the 'Repetition' block, but it seems like the 'Repetition' block was made for this sort of thing.


Is there an option to use a parameter instead of hardcoding a number for the 'Delay' block as well as the 'Repetition' block? I'd like to be able to prompt the user with a 'Form' and then use the value they provide in the test.

Eva Kalšek
Customer Support Engineer
Posted on 25.08.2020 08:43

Dear Danile,


you can enter a Variable in the Delay block, but unfortunately this is not supported for the Repetition block. But we have this on the wish list, so we can inform you when also the Repetition block will support the variables.


When using a Variable that you define in the Form block you need to add one "Sequencer" variable under Settings -> Sequencer variables. Be careful that you choose the Float data type for the variable.


You need to assign this variable in the Form block and in the Delay block.


For the workaround of the repetition block you can use IF statement and a counter, that you also create with an additional Sequencer variable. You can see how to create a counter solution in the following Article.


Regards

Daniel Shaffer

Posted on 25.08.2020 17:47

Thank you Eva, that worked great. While I'm thinking about it, a parameterized timeout on the 'Wait' block would be great as well.

Eva Kalšek
Customer Support Engineer
Posted on 26.08.2020 08:01

Dear Daniel,


we also created another wish for ability to use Variable for timeout in the Wait for user block. We will inform you when there will be any change on this topic.


Regards

Eva Kalšek
Customer Support Engineer
Posted on 01.10.2020 15:23

Dear Daniele,



we would like to inform you that the issue Ability to use variables for Timeout in Wait for User block has been resolved in the new DewesoftX 2020.2 Release candidate version.


Daniel Shaffer

Posted on 01.10.2020 20:06

Thank you Eva.


Can I make another suggestion? It would be great if when the Wait block exited due to a Timeout, it would exit on a different path than if it exited due to a successful Wait for Value event. This would act similar to an If statement, and allow for a user to break out of a Wait block on two different paths.

Eva Kalšek
Customer Support Engineer
Posted on 02.10.2020 12:09

Dear Daniel,


when the Wait block end the process due to a Timeout, you can just add an If block after and check the "Error state" . If the Timeout will be exceeded then the IF state will continue as Correct state and if not, the If state will continue as a not-correct state.


You can test the following sequence on the picture and you will quickly understand the functionality, if it is not understanding from the description.


Regards


Attached files:
Daniel Shaffer

Posted on 02.10.2020 15:03

Perfect, thank you!

Eva Kalšek
Customer Support Engineer
Posted on 10.11.2020 15:16

Dear Daniel,


we would like to inform you that with the 2020.2 RC version you can now use the variables in the Repetition block.


Regards

Login to reply to this topic. If you don't have account yet, you can signup for free account .