Your Universal Remote Control Center
RemoteCentral.com
Complete Control by URC Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
MX-IOS variables
This thread has 3 replies. Displaying all posts.
Post 1 made on Thursday November 27, 2014 at 11:27
sorapp
Long Time Member
Joined:
Posts:
March 2009
49
I am programming the MX-IOS for my iPad Air. Everything works great except for one thing. When the user selects an action requiring that the TV and receiver be turned on, I want to build in a delay to allow them to warm up before issuing setup commands to each. Since they both require a long warm up I set up a variable which I set to true when either one is turned on, then the delay can serve both simultaneously. My problem is that the variable seems to not turn on immediately. When I test it later in the macro it is still off. I have set up some temporary displays to show me the state of the variable and it clearly does not turn on immediately. I have tried delays, but it seems to wait until after the delay expires to set the variable. Has anyone experienced this kind of behavior? I am at a loss how to get this to work. By the way I use the same technique in my MX-5000 and it works perfectly.
Post 2 made on Thursday November 27, 2014 at 16:45
goldenzrule
Loyal Member
Joined:
Posts:
July 2007
8,470
You mention a variable with a delay, but the explanation sounds like you always want the delay. Is that the case? If so you don't need the delay.

I can't go into too much detail since I'm on my phone at the in-laws. You have to set your variable value on each macro, as well as for the off macro.
OP | Post 3 made on Friday November 28, 2014 at 05:16
sorapp
Long Time Member
Joined:
Posts:
March 2009
49
Here's the macro...
(I added the dashes to indicate indentation because the editor removed the spaces)

JUMP (Info/Please wait)
VAR (Wait = False
If (Variable(TVon), False
---VAR (Wait = TRUE)
---ALIAS (TV/Power/poweron)
ELSE
---{do nothing}
If (Variable(AVon), False
---VAR (Wait = TRUE)
---ALIAS (Yamaha/Power/poweron)
ELSE
---{do nothing}
If (Variable(Wait), True
---DELAY (10.0 Second
ELSE
---{do nothing}
continue with macro...

It never executes the 10 second delay. As a test I have inserted a SET Wait=true, immediately before the IF and it does perform the delay. My problem is, I want the delay conditional so it will only do the delay if either device is not already on. I hope this clarifies.
OP | Post 4 made on Friday November 28, 2014 at 21:46
sorapp
Long Time Member
Joined:
Posts:
March 2009
49
I believe I have found the problem. The macro segment shown above was placed in a button so I could reference it from multiple devices which require the same setup. It appears that when you execute an alias which contais "IF" statements, the variable tetting in the true leg of the "IF" is not completed before the macro moves on. So if there is a subsequent test of a variable later in the host macro it will fail because the variable has not yet been set. A work-around is to place all the contents of the macro in stream with the original device button. This meant I had to duplicate the entire contents of the macro in every device. This is less convenient but it did solve the problem.

If anyone sees something wrong with the way I resolved this please feel free to let me know.


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse