Thread Sleep

Thread Sleep

I am finding that if I do:

context.VariableCollection["PLC!G_HMI.Recipes.WorkHmi"].SetValue(0, true);
Thread.Sleep(10000);

The variable goes true past the 10 secs and not before. Is there anyway I can do this before?
I need to wait the 10 Secs for a timeout response of the PLC.

Thnks

This is a migrated post! Originally posted on 10.05.2022 by user MSahun. Please be aware that information can be outdated.