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:
MSC 400 and If/Then logic
This thread has 5 replies. Displaying all posts.
Post 1 made on Thursday January 6, 2011 at 09:36
gfridland
Long Time Member
Joined:
Posts:
November 2009
19
I have been re-programming my msc-400 and was looking to simplify some code by consolidating some if/then statement into one macro.

It appears that when more than on If/Then statement is made within one smart macro, my macro doesn't evaluate either If/Then statement. Is this typical? Can only one If/Then statement be used within one smat macro?

I have been able to work around this by nesting multiple macros, each containing a single If/Then statement, but was just trying to understand why I was having issues with my original approach.

Also...can if/then stements be made within other if/then statements? In other words, can I make a SINGLE smart macro that is something like:

If variable 1=true AND variable 2=true AND variable 3=true AND variable 4=true...then power on reciever?

Thanks for the input...
Post 2 made on Thursday January 6, 2011 at 09:55
kgossen
Super Member
Joined:
Posts:
March 2008
3,026
On January 6, 2011 at 09:36, gfridland said...
I have been re-programming my msc-400 and was looking to simplify some code by consolidating some if/then statement into one macro.

It appears that when more than on If/Then statement is made within one smart macro, my macro doesn't evaluate either If/Then statement. Is this typical? Can only one If/Then statement be used within one smat macro?

I use multiple if/then's in single MSC400 macro's all the time without issue

I have been able to work around this by nesting multiple macros, each containing a single If/Then statement, but was just trying to understand why I was having issues with my original approach.

Also...can if/then stements be made within other if/then statements? In other words, can I make a SINGLE smart macro that is something like:

If variable 1=true AND variable 2=true AND variable 3=true AND variable 4=true...then power on reciever?

Yes again. You can have it check for multiple conditions.
"Quality isn't expensive, it's Priceless!"
OP | Post 3 made on Thursday January 6, 2011 at 10:03
gfridland
Long Time Member
Joined:
Posts:
November 2009
19
Thanks for the quick reply...do you use delays between the If/Then statements? I would think that the MSC would be able to manage the delays based on how long it takes to execute the commands.

It is strange that I cannot get accurate evaluation whith multiple If/Then within a single smart macro. I am evaluating a sensor status in the IF....
OP | Post 4 made on Thursday January 6, 2011 at 12:19
gfridland
Long Time Member
Joined:
Posts:
November 2009
19
One more question...

Are sensor states evaluated when "testing" macros through the USB hookup or does the trigger have to be initiated through the RF via remote? In my case MX-900.

It appears that the If/Then logic works when using the Remote and does not when testing (play macro) using the USB directly connected to the MSC.
Post 5 made on Thursday January 6, 2011 at 12:59
vbova27
Super Member
Joined:
Posts:
July 2006
2,987
You do NOT need delays in between if/else. You should break you if/else into single statements and test them individually before lumping them all together. Chances are a sensor is not working for the application you are using. As far as testing goes, as long as the sensor is connected to the component it should effectively give you the live results.

It would help if you provided a better description of what your doing and the components your using and what you are trying to accomplish. That will help us rule out anything exceptional.

Vincent
OP | Post 6 made on Thursday January 6, 2011 at 13:43
gfridland
Long Time Member
Joined:
Posts:
November 2009
19
Thanks...for your help!

I am using If/Then logic to control a Denon 5600 that does not have discreet power options. I am using a video sensor feedback from the Denon and sensing it on the MSC 400. The green led accurately displays the state of the reciever and instantly changes when the reciever is powered up.

I am also usnig a voltage sensor for the cable box to determine on/off via switched outlet. The sensor works accurately here as well...

Im Using RS232 for the Audio Authority Matrix switch.

In the if/then statement I am looking at the sensor states

I have the smart macro linked to a hard button on the MX-900 so that if I want to watch my cable, then the denon is powered up, the cable box is powered up, and the source changes on my matrix switch...So it goes like this...

Press Power-ON Hard key on the MX-900:
Macro in MX-900 remote:
IR power-ON to Samsung LCD
Smart Macro "System On-Watch Cable"
Jump to Cable Page 1

Smart Macro in MSC: "System ON-Watch Cable"
If denon power sensor=OFF
--------->power-ON Denon
Else-Blank

If Cable box power sensor=OFF
--------->power-ON Cable box
Else-Blank

RS232 Audio Authority source select living room Cable

The problem is the power on/off IF/Then commands for the equipment...all other commands work well and the source is selected properly, but the power to the denon and the cable box is only applied if I separate the If/Then into separate Smart Macros and nest them in a "combined System Power On" macro.

It makes no sense to me why the statements aren't properly evaluated unless they are separated.


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