Wait_until ???
REBUILD_EVENT
Junior Member
I have a Comm problem that I should communicate with a device in a well defined sequence. I started sending one msg after another with setting flags in the function and reading them in the data_event, then calling another function setting another flag and so on.
I suppose that I could use one function with WAIT_UNTIL instead, but was told not to do so. what do I have to consider using WAIT_UNTIL ???
thanks
I suppose that I could use one function with WAIT_UNTIL instead, but was told not to do so. what do I have to consider using WAIT_UNTIL ???
thanks
Comments
-
Wait_Until
Wait_Until makes the master waits until a condition come true... but you gotta know that...
From AMX Programmers BlackBookWait instructions allow delayed execution of one or more program statements.
When a wait statement is executed, it is added to a stack of currently active wait and the program continues running.
All variables inside the wait are evaluated at the time the wait is executed, not when it is added to the stack.
so handling of maths and numericals during this wait will be hard somehow... but it may work, try it and use a watch window to monitor your Vars and see if it is doing well or not....i don't know what exactly you wanna do to tell you how to work arround
Good Luck -
One of the things I use WAIT_UNTIL for is projector commands when the projector has a warmup and cooldown period. I'll make a status variable showing whether the projector is full on, for example, or just warming, and then use the WAIT_UNTIL to hold source and mode change commands until it's full on. I am always, however, very careful that my condition absolutely resolve before using it. I also tend not to use variable inside one at all, only static commands.
-
DHawthorne wrote:One of the things I use WAIT_UNTIL for is projector commands when the projector has a warmup and cooldown period. I'll make a status variable showing whether the projector is full on, for example, or just warming, and then use the WAIT_UNTIL to hold source and mode change commands until it's full on. I am always, however, very careful that my condition absolutely resolve before using it. I also tend not to use variable inside one at all, only static commands.
You could do that using a timeline. It's nicer and has more functionality
-
yuri wrote:You could do that using a timeline. It's nicer and has more functionality

Actually, I may use a timeline for the actual projector timeout, but it's not practical for the way I am using WAIT_UNTIL. Let me elaborate. Every time a source is changed, I have a segment that was a WAIT_UNTIL(cTV_Status == TV_ON). Inside that block is the code that changes the projector input, aspect ration, and whatever else need to be switched for that source. If it's already on, it fires right away; if not, it will as soon as the warmup is complete. It's just not necessary to create a new timeline for every source the way I am doing it.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums