04-22-2015 07:55 AM
Hello,
I need to insert a timeout on a while loop to exit this loop in the case of the device isn't able to answer.
How can I do ?
Best regards
Solved! Go to Solution.
04-22-2015 10:12 AM
Create a Local Variable:
Locals.StartTime
In an expression step before you start the while loop set Locals.StartTime = Seconds()
As part of the condition for the While Loop use: (Seconds() - Locals.StartTime) < X
where X is your timeout in seconds.
Hope this helps,
04-23-2015 03:07 AM
Thank you it works very well.