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

Login:
Pass:
 
 

Page 1 of 2
Topic:
Test Flag Issue?
This thread has 26 replies. Displaying posts 1 through 15.
Post 1 made on Thursday September 20, 2007 at 23:35
tgrugett
Select Member
Joined:
Posts:
August 2004
1,850
I encountered a problem today...

I tried to simplify a few macros to reduce the time it takes me to adapt my processor templates to new jobs.

I tested for a "system on" flag... if set nothing, else a delay of 4 seconds. The delay was ignored every time despite the fact that the system on flag was not set. The overall system macro was this...

*CD Power On Macro
*If zone1 flag is set then.. no action
else... *Zone1 Power on Macro
*If system on flag is set then... no action
else... 4 second delay
*Zone1 Start Volume Macro
Zone1 Stereo Mode Macro
Zone1 CD Input Macro

The idea was to turn on the CD, turn on the Main Zone if off, provide a delay if the system was not already on (to allow for power up sequence) or skip the delay if it was on (delay not required), set the start volume if the zone just turned on, set the listening mode and set the proper input.

The delay was ignored unless I had other macros nested in with the delay. It worked fine when I had the power macro nested in both the then and else portions of the system on flag test but once the delay was alone in the test it was not recognized.

Anyone else run across this before?
Post 2 made on Friday September 21, 2007 at 05:33
Springs
Super Member
Joined:
Posts:
May 2002
3,238
send it over and tell me where in the file it is.
Post 3 made on Friday September 21, 2007 at 05:58
Oz AVI
Senior Member
Joined:
Posts:
November 2004
1,151
Troy, I'm also happy to have a look at it if you like. I also use a delay when powering on, I know you mainly use Denon as I do, I've found 3 seconds to be enough of a delay though.
The other difference is that I set the flag when powering down (doesn't really matter which way you go about it as long as it works for you!), and I also put the Power On command within the flag, I know we're only talking about .3 of a second but I figure once it's on, it's on!
Why it's missing the delay, the $64 question!!!
Post 4 made on Friday September 21, 2007 at 11:41
nardo1
Active Member
Joined:
Posts:
April 2005
628
Control processor or remote? Possible firm issue if it’s a remote.
I'll let you know tomorrow..
OP | Post 5 made on Friday September 21, 2007 at 20:51
tgrugett
Select Member
Joined:
Posts:
August 2004
1,850
Here is a better representation of the Macro. It is a system macro that calls other macros.

In my mind there can only be two issues... the system on flag did not get cleared when the system was shut down or the delay is not recognized without something else associated with it. I made ABSOLUTELY sure that I cleared the system on flag properly.

The idea here is that I do not have to edit multiple items in the macro when adapting it for other sources (quick copy-paste edit). This is ideal because there is no duplication of any called system macro which makes adapting large files much quicker (...and saves my click hand!). Change the commands in the root macros and you are most of the way there!


Photobucket - Video and Image Hosting



I have moved on and reconfigured the macro to select either "zone 1 on' or "zone 1 on" with a delay rather than just testing for the delay insertion so I do not have a file to send any longer. I plan on mocking this up in another way to see if I get the same results with an "unassociated" delay.
Post 6 made on Saturday September 22, 2007 at 02:49
Proggieus
Long Time Member
Joined:
Posts:
October 2005
434
If you are setting the flags in the system macros the remote will never see them. Remember that the RP6 and the remote both have thier own flags so you need to make sure that you are setting the flag on the correct device.
Post 7 made on Saturday September 22, 2007 at 08:23
Springs
Super Member
Joined:
Posts:
May 2002
3,238
IS the button stand alone?
OP | Post 8 made on Saturday September 22, 2007 at 11:26
tgrugett
Select Member
Joined:
Posts:
August 2004
1,850
This is a system macro.... processor only.... flag on the processor...

when a command or system macro is placed in the flag test along with the delay, the delay is recognized. If the delay is by itself it is not.

To eliminate any potential errors I shutdown the system with an all off macro containing a clear "system on" flag. The delay was ignored every time upon startup of zone 1 from a system off state.

The button that triggers this zone 1 CD activity system macro (and buttons triggering all of the zone activity system macros) is in standalone because of the page flips required. The clear "system on" flag on the processor is contained within the all off system macro and in a "system on" flag test system macro that is contained within every zone off system macro (testing for any zone on flag and clearing the system on flag if all zone on flags are clear).

Last edited by tgrugett on September 22, 2007 11:34.
Post 9 made on Saturday September 22, 2007 at 11:27
estech
Active Member
Joined:
Posts:
August 2002
584
I ran into something similar recently, when I was trying to extend the length of a macro to keep a button in "pressed" state until it was complete.
The time delay by itself was ignored every time.
It seems the delay needs some kind of "anchor", ie. a command to delay.
Pay no attention to that man behind the curtain.
Post 10 made on Saturday September 22, 2007 at 12:46
brandenpro
Select Member
Joined:
Posts:
May 2005
1,651
Could you not add a command that is not in the system, after the pause. If you dont have any Sony gear add a stop command from a sony VCR from 1987.
Post 11 made on Saturday September 22, 2007 at 23:11
imt
Long Time Member
Joined:
Posts:
June 2007
466
Why not just add the "System:Zone 1 Start Volume" to both sides of the System On Test Flag. That way you have

If System ON Flag is set then
System: Zone 1 Start Voume
Else
Pause 4 Seconds
System: Zone 1 Start Volume
End

This way there is something contained on both sides on the IF statement.

Only other thing I can think of is that the flag is somehow being set somewhere else within the code.

This also brings up an idea for the theatertouch software. What about adding a debugger so that you can visually see the status of your flags, both system & device, as you test the device in the emulator.
OP | Post 12 made on Sunday September 23, 2007 at 03:09
tgrugett
Select Member
Joined:
Posts:
August 2004
1,850
On September 22, 2007 at 23:11, imt said...
Why not just add the "System:Zone 1 Start Volume" to both
sides of the System On Test Flag. That way you have

If System ON Flag is set then
System: Zone 1 Start Voume
Else
Pause 4 Seconds
System: Zone 1 Start Volume
End


The start volume should only be applied if the zone was previously off regarless of the system on status. I have a working macro now... I just reconfigured it to select between zone 1 on and zone 1 on with delay depending on the system on status. The real goal here was to keep the system macros very simple to view, troubleshoot and adapt to additional input activities in other zones by simple copy-paste-minimal edit methods when creating very large unique files from a template. All required specific commands, flags and applicable specialized macros are contained within other called "root" macros. This way if you change a specific command for a new piece of gear (say... power on or discrete input) you do not have to edit much in the larger activity macros.

This way there is something contained on both sides on
the IF statement.

Only other thing I can think of is that the flag is somehow
being set somewhere else within the code.

I know I should never speak in absolutes, however, this is not the case. There could be a glitch but my flag tracking was flawless.

This also brings up an idea for the theatertouch software.
What about adding a debugger so that you can visually
see the status of your flags, both system & device, as
you test the device in the emulator.

Fantastic idea... this could be a window outside of the simulator that displays both processor and remote flag status. I would dig on this this because I often use many standalone flags for source page tracking and page flips when one controller is used for multiple zones. Currently it is such a pain because you can not create standalone saved macros (like bulk clearing of flags and large test flag sequences) for use within otherwise unique macros.
Post 13 made on Sunday September 23, 2007 at 17:22
Ernie Bornn-Gilman
Yes, That Ernie!
Joined:
Posts:
December 2001
30,104
I ran into something that didn't work, just like this, the first time I did flags. I hope it's not the problem here.

Before the line saying what to do if the flag is set, a line has to be put in that tests the flag; the response to that test tells the next lines what to do. Without the "test the flag" command, the IF commands will have no confirmation that the flag is set, so will act as though it isn't.
A good answer is easier with a clear question giving the make and model of everything.
"The biggest problem in communication is the illusion that it has taken place." -- G. “Bernie” Shaw
OP | Post 14 made on Monday September 24, 2007 at 10:51
tgrugett
Select Member
Joined:
Posts:
August 2004
1,850
On September 23, 2007 at 17:22, Ernie Bornn-Gilman said...
Before the line saying what to do if the flag is set,
a line has to be put in that tests the flag; the response
to that test tells the next lines what to do. Without
the "test the flag" command, the IF commands will have
no confirmation that the flag is set, so will act as though
it isn't.

I am not clear on this. The line that says what to do if the flag is set IS the first line of a flag test?

You can not have a line asking what to do if the flag is set unless you have a flag test inserted.
Post 15 made on Monday September 24, 2007 at 20:53
imt
Long Time Member
Joined:
Posts:
June 2007
466
I know that this has been mentioned in the future enhanement requests thread but ...

What you really need are variables, constants, and functions/modules. This would allow you to do what you really want and create pieces that can easily be used over and over. Basically you could write modules/functions for all specific devices and call the ones you need. You would then only have to set one variable to then use the code you want.

THisk about the dreaded please wait. One could create one set of pages, maybe even 1 page if there were animated gifs or flash, that can be called whenever a please wait routine is needed.

Think of how smaller the amount of pages and programming could be. This is all similar to using a program like visual basic.


Also, with the intro of 2 way devices, I hope that you then don't have to worry about "Standalone" macro's. With 2 way, you should then be able to store all macro's device and system on the processor and the procesors could send page flips commands to the device.
Page 1 of 2


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