AK,
You can't really sleep in the VBScript module as that would stop processing. As the pipeline is essentially an infinite loop (i.e. grab an image, process it, then grab another, etc) adding a sleep would cease all execution which is usually not desired. So instead you can use the SetTimedVariable to cause the variable to change value after X number of milliseconds. Your script would look something like:
period = 2000
step = GetVariable("step")
if step = 0 then
SetVariable "data", 2
SetVariable "step", 1
SetTimedVariable "step", 2, period
else
if step = 2 then
SetVariable "data", 4
SetVariable "step", 3
SetTimedVariable "step", 0, period
end if
end if
which would case data to oscillate between 2 and 4 with a period of 2000 seconds. Note that usage of step and setting it to 1 and 3 which are dummy steps where nothing is done.
STeven.
|
|