Robot task with random() function?

Hi all,

I wonder whether is possible to implement in 3DExperience a robot task with an if-then condition where the test is based on the result of a random() function. The main idea is to perform a given set of instructions randomly, i.e. only one over N times, as it occurs e.g. in case of quality checks: products are randomly picked and sent to a quality check bench.

I checked the math functions implemented in the Sequencing Editor, but unfortunately I didn't find anything similar to what I was looking for (R2018x). Any suggestions about how to implement such behavior?

Thank you and best regards,

Alessandro