Home AMX User Forum NetLinx Studio

Maximum number of pages limit

adysadys Posts: 395
I have reached the maximum number of popup pages in my panel file!

That is a huge huge problem, I have a lot more to add.

What is the max number? can't find it in the forum or in the help file, and generate report don't give info about it too.

Any way to solve it beside changing concept and removing pages?

This is very very bad...
«1

Comments

  • Jimweir192Jimweir192 Posts: 502
    Out of curiosity - exactly how many pages do you have and how does the limit present itself?
  • adysadys Posts: 395
    The TPdesign don't let me add more popup pages...

    I don't know how many, I don't know how to get this information.

    Few hundred I guess. I am working on a huge complex house, 14 TP, 10 masters, and the customer wants everything highend graphics.
    He can control every room from every Tp, that create more popups but I am holding only one TP file for all.

    I can't even try to explain what a problem this limit create for us.
  • Are you creating multiple pages per room?

    If so you may want to think about handling more on the programming end there mate.
  • ericmedleyericmedley Posts: 4,177
    adys wrote: »
    I have reached the maximum number of popup pages in my panel file!

    That is a huge huge problem, I have a lot more to add.

    What is the max number? can't find it in the forum or in the help file, and generate report don't give info about it too.

    Any way to solve it beside changing concept and removing pages?

    This is very very bad...

    I have some TP files with around 150 popups.
    These are for some pretty big systems (over $500K)
    how many popups are you at right now?
  • jjamesjjames Posts: 2,908
    Time to start thinking about coding your page-flips and using variable text if you're not already.

    If you are well . . . I'm interested in the answer too! :D
  • Jimweir192Jimweir192 Posts: 502
    I can understand why your tempted to maintain a single file for all the TP's, but seriously if you run system of any type close to its limits you WILL get wierd and unreliable operation...

    If your project is that complex, and I'll be honest it shouldn't be unless it is growing without being planned ahead, and you really want a single file your going to have to experiment:
    Make a couple of copies to test with...
    I'd try removing some of the fatter graphics in Resource Manager and then see if you can add more popups?
    Can you add more Pages when not allowed to add Popups?

    Jason is right, you should be offloading a lot of the work onto the code anyway.

    To find out how many Popups your using, generate a programmers report in CSV format, open in excel and delete all the general info until you just have the first popup name in Column A, then sort by Column A and read off your row totals.

    Is this always the same job you post about?
  • adysadys Posts: 395
    Sure I am

    I need to control audio video hvac light security and more from every tp from every place from map view and from room view.

    The best way is to use different ports, this way I am talking with each system and not only with the central system. I have local stereo/video systems in each system, so I preffer doing it this way.
  • ericmedleyericmedley Posts: 4,177
    Jimweir192 wrote: »
    I can understand why your tempted to maintain a single file for all the TP's, but seriously if you run system of any type close to its limits you WILL get wierd and unreliable operation...

    If your project is that complex, and I'll be honest it shouldn't be unless it is growing without being planned ahead, and you really want a single file your going to have to experiment:
    Make a couple of copies to test with...
    I'd try removing some of the fatter graphics in Resource Manager and then see if you can add more popups?
    Can you add more Pages when not allowed to add Popups?

    Jason is right, you should be offloading a lot of the work onto the code anyway.

    To find out how many Popups your using, generate a programmers report in CSV format, open in excel and delete all the general info until you just have the first popup name in Column A, then sort by Column A and read off your row totals.

    Is this always the same job you post about?

    We've had this discussion many time on this forum. I'm a big advocate of having only one TP file. In large systems where you have 20+ TPs, file management would be a nightmare.

    In all my systems, I create one master file that contains all things needed for any touch panel in the system. Then the program controls what the user sees. I'm dying for the day that I can use something like RFID to determine which space a TP is in currently. Then I won't even have to label each panel for the rooms.
  • adysadys Posts: 395
    Jimweir192 wrote: »
    I can understand why your tempted to maintain a single file for all the TP's, but seriously if you run system of any type close to its limits you WILL get wierd and unreliable operation...

    If your project is that complex, and I'll be honest it shouldn't be unless it is growing without being planned ahead, and you really want a single file your going to have to experiment:
    Make a couple of copies to test with...
    I'd try removing some of the fatter graphics in Resource Manager and then see if you can add more popups?
    Can you add more Pages when not allowed to add Popups?

    Jason is right, you should be offloading a lot of the work onto the code anyway.

    To find out how many Popups your using, generate a programmers report in CSV format, open in excel and delete all the general info until you just have the first popup name in Column A, then sort by Column A and read off your row totals.

    Is this always the same job you post about?



    Thanks

    Yes , this is same job. The client and the engineer is bringing new equipment all the time, and there are no specifications.
    Beside that , the engineer ignore my warning all the time, and we have full full full of graphics, animations, statuses, high end graphics I have never seen before at any smart home system.

    Not ideal, but that's the way they want to work, and I am only the programmer working as freelance.

    They drive me crazy, but what can I say, they pay for my time.

    Just to be clear, the system is running very good and well organized, I have a 15 year experience in programming big systems, much more complex that this one, and I worked at Superna systems that developed a smart home solution software+hardware.

    But there are limits and things I am not aware of in AMX, I am working only 2 years with it, and most what I know I learn from the forum.
  • Jimweir192Jimweir192 Posts: 502
    adys wrote: »
    They drive me crazy, but what can I say, they pay for my time.

    Thats customers for you;-)

    Are your graphics all png format? There are some good optimisation routines out there that might squeeze you some extra breathing space without making a noticable difference to the client - which panels are you using?
  • jjamesjjames Posts: 2,908
    I think the question should be - is the panel running out of memory because of the graphics? It sort of sounds like it is.

    How large is your TPD4 file?
  • adysadys Posts: 395
    most of the are 8400, some are NXT1200V

    The graphics are not a problem now, I solved some and the system is running smooth.
    All of them are PNG 24, believe me, there is no place to talk about it, its not my choice...

    They don't want to hear about it :)


    But we will have to remove duplicate behave popups that diff only in the way the look (small diff), and even that he don't want to do .

    He have 2 choices:

    To agree to remove some of the extra popup
    Pay me to rewrite the mechanism

    Both are cool with me :)

    Well, I am joking , I want to solve it with 1 tp file and multiple port, that the most elegant way to work I think.

    I am with the support on the line one, I hope I will have good news soon (at list I will know the limits...)
  • adysadys Posts: 395
    jjames wrote: »
    I think the question should be - is the panel running out of memory because of the graphics? It sort of sounds like it is.

    How large is your TPD4 file?


    18+ meg

    Not its not.

    The TPDesign is blocking me from adding more popup pages.
    I can add images and pages, but not popup pages.
  • DHawthorneDHawthorne Posts: 4,584
    You have to find ways to re-use your existing pop-ups, which means you have to do a lot more tracking in your code instead of having one page per device. If, for example, you have six DVD players, you really should only need one pop-up to control all of them as long as your program knows whgich is being used at the moment.

    I've done multi-million dollar full-house systems, and have not run into this particular problem. You are just going to have to re-think your design. And if you really can't make it work the way your contractor wants, you have to put your foot down ... in the end, no one is going to be happy with the job if the system is trying to work in ways it was never designed to. You will wind up with compromise stacked on compromise, spaghetti code to support it, and hacks that will prove impossible to maintain. You can soup up a Volkswagon a great deal, but you'll never turn it into a Ferrari.
  • adysadys Posts: 395
    The house is working very good, no spagetti and not probomes... :)

    I done user interface for a lot of years.
    The solution to have complex code just to use the same popup in N diffrerent rooms is a BAD solution in any aspect of user interface design, in any programming language.

    You create a resource page for every module you need, and give its buttons unique id, and try to avoid resource reuse just to save popup page (or dialog pages in MFC)
    In .NET you don't use the same form for multy tasks, right?

    The only reason to do so is that AMX have limits, and not any other reaon.

    This is a bad programming way, and must not be as a thumb rule.

    AMX has limits (why? I have plenty of memory availble in the TP) so I will have to write ugly code instead of simple elegant solution, and my contractor will have to give up some popups that look a bit different and behave the same (as much as he hates it) , but that is a weak point for AMX.

    I worked with Superna systems TP and didn't have any TP screens limit, only memory limit.
  • DHawthorneDHawthorne Posts: 4,584
    adys wrote: »
    The house is working very good, no spagetti and not probomes... :)

    I done user interface for a lot of years.
    The solution to have complex code just to use the same popup in N diffrerent rooms is a BAD solution in any aspect of user interface design, in any programming language.

    You create a resource page for every module you need, and give its buttons unique id, and try to avoid resource reuse just to save popup page (or dialog pages in MFC)
    In .NET you don't use the same form for multy tasks, right?

    The only reason to do so is that AMX have limits, and not any other reaon.

    This is a bad programming way, and must not be as a thumb rule.

    AMX has limits (why? I have plenty of memory availble in the TP) so I will have to write ugly code instead of simple elegant solution, and my contractor will have to give up some popups that look a bit different and behave the same (as much as he hates it) , but that is a weak point for AMX.

    I worked with Superna systems TP and didn't have any TP screens limit, only memory limit.

    I respectfully disagree. As you have discovered, AMX does have limits ... and even if it did not, there is little point in having half a dozen nearly identical pages using up resources when you don't need to. It will eventually impact performance ... the master needs to allocate memory and handles for all those channels and levels. If you re-use a page, it makes the system more efficient. I'm not saying use the same page for every device, but if they have the same functions, there is no strong reason not to. And I strongly disagree that re-using pages is "bad programming;" if you said you preferred not to, or that was just your choice, I would accept it. But it is certainly not "bad," just a different way of doing it.
  • mpullinmpullin Posts: 949
    If good programming includes disregard for efficiency and resources, I'd hate to see what bad programming would be like!
  • ericmedleyericmedley Posts: 4,177
    DHawthorne wrote: »
    I respectfully disagree. As you have discovered, AMX does have limits ... and even if it did not, there is little point in having half a dozen nearly identical pages using up resources when you don't need to. It will eventually impact performance ... the master needs to allocate memory and handles for all those channels and levels. If you re-use a page, it makes the system more efficient. I'm not saying use the same page for every device, but if they have the same functions, there is no strong reason not to. And I strongly disagree that re-using pages is "bad programming;" if you said you preferred not to, or that was just your choice, I would accept it. But it is certainly not "bad," just a different way of doing it.


    I would add to this statement that efficiency of you - the programmer's time is also at issue. Managing the complexities of page/popup navigation would be insane if we had only TP4 to do it. There is almost no logig to deal with things if you navigate from the panel. I can do it so much more efficiently and elegantly in code.

    I've had to do it both ways. I've done some independent programming where the company was developing the TP interface. I couldn't convince them that running the panel navigation from code was a far superior way to go. Not only did their panels constantly get lost down rabbit trails where the user would find an orphaned popup they couldn't close but I had to write an enormous amount of code to correct for things. I remember one particule routine that I had to track button presses and if the client hit a sequence of 5 buttons one way, I'd have to close an orphaned popup but if they hit the same set of buttons in another order I'd have to close another.

    They finally saw the light when the programming bill for the first project was something like 165 hours.

    On the next project I threatened to bow out if they wouldn't reconsider the way they did their interface. They did in the end. The almost exact same looking/feeling/working interface running from code was billed out at 11 hours.(and it worked flawlessly, I might add)

    I do have a few things that run from the panel's navigation but that is fairly rare.
  • adysadys Posts: 395
    Guys, I respect you all very much, but I disagree in this case.
    I have never seen resource reuse like this in MFC or .NET.

    If AMX is limited system, its not saying that this a good way to write user interface.

    Lets have a look:

    What more simple than having 2 screens with the same buttons that diff only in port channel, and each system take care of the action (lets say a volume command on a local stereo device) ?
    Its no matter what TP you are using, no need to trace, no need to create complex code.
    Simple code is much better than complex code, always was, always will be.

    Instead, I have to take care for all the stereo commands in one central system, for every TP to trace where the user currently is (what page), to catch the command in the central system , send a command to the specific system that hold the device, parse it, execute command, and send feedback back to the central system to update the screen...

    In the port way - just listen to the command, execute, update screen, goodbye...

    I agree that I am working on AMX and I have to use it under it limits, but if I can, I will always choose the port way over one screen for 20 rooms, I just think it a better design, and much easier to maintain.




    * Eric, its not about navigation, the navigation is in the code in this case.
    The programming time is zero time compare to code handling. Just duplicate the screen, select all buttons, and change port channel.
    Thats all.
  • viningvining Posts: 4,368
    adys wrote:
    I agree that I am working on AMX and I have to use it under it limits, but if I can, I will always choose the port way over one screen for 20 rooms, I just think it a better design, and much easier to maintain.
    Don't think of it as 1 TP page or pop-up for 20 rooms but 1 TP page or pop-up per room or TP.

    I don't hink I could bring myself to create 20 pages or pop-ups for the same device or the same device in another room. It's pretty simple to determine which dev to send to when you open a page either by direct assignment or by which TP you're on.

    Are you using AMX modules? They oftern expect you to create multiple pages using different ports and then limiting the amount of pages you can have is a little sadistic. I recently did a major re-writte of the iPod module because of this. I had 5 iPods and each iPod would have required its own pages and port which I couldn't deal with since I was already using ports #s in the 30's & virtuals ports #s near 70. Having seperate pages/ports does make determining which panels requires feedback a little easier and I must admint it was nice to see that they even attempted this but still I think the proper way is one device = 1 port and handle the tracking in code.

    A few for loops, a few tracking variables and few get_last's and you're half way there.
  • jjamesjjames Posts: 2,908
    adys wrote: »
    I have never seen resource reuse like this in MFC or .NET.
    Okay, great. But we're dealing with AMX, not .NET. You're comparing apples to oranges.

    And as far as using one page, and "trying" to track it in code is complex statement: it's not hard at all. Please, someone tell me what's so difficult with this layout (again - this is just my way of using device pages, there are PLENTY other ways of doing it.)
    BUTTON_EVENT[dv_TP,MISC_BTNS]
    {
    	PUSH:
    	{
    		STACK_VAR INTEGER nBTN;
    		STACK_VAR INTEGER iSRC;
    		STACK_VAR INTEGER nPANEL;
    		
    		nPANEL = GET_LAST(dv_TP);						// Get Panel
    		nBTN = BUTTON.INPUT.CHANNEL;					// Get button
    		iSRC = nAV_ZONE_SOURCE[nPNL_AV[nPANEL]]; 	// Get source
    		
    		// MANAGE DEVICE CONTROL
    		SWITCH(iSRC)
    		{
    			// MANAGE IR DEVICES
    			CASE nSRC_VCR:
    			CASE nSRC_SAT:
    			CASE nSRC_CABLE:
    			CASE nSRC_CBL_MUSIC:
    				TO[IR_DEVICE[nPANEL],nBTN];
    			
    			// DVD
    			CASE nSRC_DVD:
    				SEND_STRING dv_DVD[nDVD_MAP[nPNL_AV[nPANEL]]],"DVD_COMMANDS[nBTN],CR";
    			
    			// CD 
    			CASE nSRC_CD:
    				SEND_STRING dv_CDC[nCD_MAP[nPNL_AV[nPANEL]]],"CD_COMMANDS[nBTN],CR";
    			
    			// AM/FM
    			CASE nSRC_TUNER1:
    				fnSEND_TUNER("'T',cTUNER_A,RADIO_COMMANDS[nBTN]");
    			
    			CASE nSRC_DTR_RADIO:
    				SEND_STRING dv_RCVR[nRCVR_MAP[nPNL_AV[nPANEL]]],"DTR_TUNER[nBTN],CR";
    			
    			// XM
    			CASE nSRC_TUNER2:
    				fnSEND_TUNER("'T',cTUNER_B,XM_COMMANDS[nBTN]");
    				
    			// SIRIUS
    			CASE nSRC_SIRIUS:
    				fnSEND_SIRIUS(SIRIUS_COMMANDS[nBTN]);
    		}
    	}
    }
    
    Explanation:
    - IR_DEVICE is set in source selection
    - nPNL_AV is what zone the panel is controlling
    - nAV_ZONE_SOURCE is the source of the zone.
    - Device maps (i.e. nDVD_DEV_MAP) show which device is designated to that zone. Sometimes it's a multi-dimensional array for multiple devices in one zone.

    Now, I use this code with my VCR, DVD, cable, satellite, etc. (see listed above) pages, and there's one page for each device. Unless it's cable or satellite, which I do make two pages - one for DVR type devices, one for standard ones. And in fact, on each device page - button 1 is play, 2 is stop, 3 is pause, etc., etc. Every single touch panel in the system uses this code for device control. It doesn't matter if I have only two panels or 72 panels, and it doesn't matter if half of them are MVP-8400s, and the other half are CV12, it doesn't matter which room a particular panel is controlling (each panel can control multiple rooms), there is one page, one code block for everything.

    So if I follow your theory correctly, then if I have 13 cable boxes in a system, there would be 13 different popups for cable? And if you made a mistake on each of the pages, such as spelling "Guide" incorrectly due to quick fingers, you have to change them all?

    "Simple" code is "Gorilla code." 9 times out of 10, "complex" code is flexible. In fact, let me show some code I've had to fix and compare it to what what I did above:
    BUTTON_EVENT[dvTP,51]
    {
        PUSH:
        {
            SELECT
            {
                ACTIVE(CUR_SRC=12):       (***** DVD COMMANDS *****)
                {
                    PULSE [DVD,51]        (* Clear *)
                }
                
                ACTIVE(CUR_SRC=14):       (***** CD COMMANDS *****)
                {
                    SEND_STRING CDS,"'!4DSC01',$0D"  (*** DISC 1 ***)
                }
                
                ACTIVE(CUR_SRC=9):       (***** DSS COMMANDS *****)
                {
                   SEND_COMMAND DSS1,"'SP',51"    // DISPLAY/INFO
                }
                
                ACTIVE(CUR_SRC=10):       (***** DSS COMMANDS *****)
                {
                   SEND_COMMAND DSS2,"'SP',51"    // DISPLAY/INFO
                }
                
                ACTIVE(CUR_SRC=11):       (***** VCR COMMANDS *****)
                {
                    TO [VCR,122]                     (* CURSOR UP *)
                }
                
            }
        }
    }
    
    This is just for button number 51, and it continues for every single dev-control-button (1-100.) Now, multiply that by the number of panels in a given system. THAT is "gorilla code." Quick and dirty, but not very flexible. Can you imagine going through and fixing a mistake? Think about how many times you'd have to do it for 10 panels.

    AMX is limited, sure, but so it everything else out there. You gotta learn to work with the limitations. I go as far as using variable text on buttons and then showing/hiding certain buttons based on what zone they're controlling, which panel they're using or even the time of day!

    I would love to see the code that manages your different ports.

    (P.S. - my code is NOT the spread apart, nor is it exactly laid out that way. The CODE tags seem to not format my tabs correctly.)
  • Spire_JeffSpire_Jeff Posts: 1,917
    adys wrote: »
    In the port way - just listen to the command, execute, update screen, goodbye...

    I am going to skip past the multiple popups idea as it seems to be getting enough attention. I am just wondering... Are you tracking which devices are active on each panel at all? If not, how are you tracking which devices should be receiving information updates?

    Jeff
  • Chip MoodyChip Moody Posts: 727
    Have you sent your TP file to AMX tech support and asked them what the limitation on pop ups is and how you can work around it? I'd be interested in what they may have said...

    - Chip
  • adysadys Posts: 395
    vining wrote: »
    adys wrote:

    Don't think of it as 1 TP page or pop-up for 20 rooms but 1 TP page or pop-up per room or TP.

    I don't hink I could bring myself to create 20 pages or pop-ups for the same device or the same device in another room. It's pretty simple to determine which dev to send to when you open a page either by direct assignment or by which TP you're on.

    Are you using AMX modules? They oftern expect you to create multiple pages using different ports and then limiting the amount of pages you can have is a little sadistic. I recently did a major re-writte of the iPod module because of this. I had 5 iPods and each iPod would have required its own pages and port which I couldn't deal with since I was already using ports #s in the 30's & virtuals ports #s near 70. Having seperate pages/ports does make determining which panels requires feedback a little easier and I must admint it was nice to see that they even attempted this but still I think the proper way is one device = 1 port and handle the tracking in code.

    A few for loops, a few tracking variables and few get_last's and you're half way there.


    So what the difference?

    If I have 20 rooms, and I have 20 popups, or I have 15 TP and I have 15 popup...
    The first way is much easier to handle, so saving only 5 popup will not help.


    The worst thing is that every time that the user enter a page I have to update it, and in the multi popup way its free.
    The TP can do it, let him do it.

    I still think that if there is not a crazy user interface with huge house, the port way is the best way.
  • adysadys Posts: 395
    Spire_Jeff wrote: »
    I am going to skip past the multiple popups idea as it seems to be getting enough attention. I am just wondering... Are you tracking which devices are active on each panel at all? If not, how are you tracking which devices should be receiving information updates?

    Jeff


    That is perhaps the best thing.

    You don't have to update when the user enter the room, the screens are allready updated for you.

    Sending volume update commnad (simple text command in my case) is low cost.

    I am sending full update to the current tp, and when the button release I am updating all the other TPs.



    *To answer you question, I have central system that know what room is selected in every tp (the system that manage the house map to select your room and enter it) and I know what device is active , but this is from Netcira audio distribution reasons, and not for manging GUI.
  • adysadys Posts: 395
    Chip Moody wrote: »
    Have you sent your TP file to AMX tech support and asked them what the limitation on pop ups is and how you can work around it? I'd be interested in what they may have said...

    - Chip

    Yes

    They didn't know, and was not sure if 250 or 500, finally they sent me mail that the limit is 500.
    I am not sure, I don't think I have 500, I will check it out on sunday.

    I ask what can I do to pass this limit and still waiting for answer.
  • adysadys Posts: 395
    jjames wrote: »
    Okay, great. But we're dealing with AMX, not .NET. You're comparing apples to oranges.

    And as far as using one page, and "trying" to track it in code is complex statement: it's not hard at all. Please, someone tell me what's so difficult with this layout (again - this is just my way of using device pages, there are PLENTY other ways of doing it.)
    BUTTON_EVENT[dv_TP,MISC_BTNS]
    {
    	PUSH:
    	{
    		STACK_VAR INTEGER nBTN;
    		STACK_VAR INTEGER iSRC;
    		STACK_VAR INTEGER nPANEL;
    		
    		nPANEL = GET_LAST(dv_TP);						// Get Panel
    		nBTN = BUTTON.INPUT.CHANNEL;					// Get button
    		iSRC = nAV_ZONE_SOURCE[nPNL_AV[nPANEL]]; 	// Get source
    		
    		// MANAGE DEVICE CONTROL
    		SWITCH(iSRC)
    		{
    			// MANAGE IR DEVICES
    			CASE nSRC_VCR:
    			CASE nSRC_SAT:
    			CASE nSRC_CABLE:
    			CASE nSRC_CBL_MUSIC:
    				TO[IR_DEVICE[nPANEL],nBTN];
    			
    			// DVD
    			CASE nSRC_DVD:
    				SEND_STRING dv_DVD[nDVD_MAP[nPNL_AV[nPANEL]]],"DVD_COMMANDS[nBTN],CR";
    			
    			// CD 
    			CASE nSRC_CD:
    				SEND_STRING dv_CDC[nCD_MAP[nPNL_AV[nPANEL]]],"CD_COMMANDS[nBTN],CR";
    			
    			// AM/FM
    			CASE nSRC_TUNER1:
    				fnSEND_TUNER("'T',cTUNER_A,RADIO_COMMANDS[nBTN]");
    			
    			CASE nSRC_DTR_RADIO:
    				SEND_STRING dv_RCVR[nRCVR_MAP[nPNL_AV[nPANEL]]],"DTR_TUNER[nBTN],CR";
    			
    			// XM
    			CASE nSRC_TUNER2:
    				fnSEND_TUNER("'T',cTUNER_B,XM_COMMANDS[nBTN]");
    				
    			// SIRIUS
    			CASE nSRC_SIRIUS:
    				fnSEND_SIRIUS(SIRIUS_COMMANDS[nBTN]);
    		}
    	}
    }
    
    Explanation:
    - IR_DEVICE is set in source selection
    - nPNL_AV is what zone the panel is controlling
    - nAV_ZONE_SOURCE is the source of the zone.
    - Device maps (i.e. nDVD_DEV_MAP) show which device is designated to that zone. Sometimes it's a multi-dimensional array for multiple devices in one zone.

    Now, I use this code with my VCR, DVD, cable, satellite, etc. (see listed above) pages, and there's one page for each device. Unless it's cable or satellite, which I do make two pages - one for DVR type devices, one for standard ones. And in fact, on each device page - button 1 is play, 2 is stop, 3 is pause, etc., etc. Every single touch panel in the system uses this code for device control. It doesn't matter if I have only two panels or 72 panels, and it doesn't matter if half of them are MVP-8400s, and the other half are CV12, it doesn't matter which room a particular panel is controlling (each panel can control multiple rooms), there is one page, one code block for everything.

    So if I follow your theory correctly, then if I have 13 cable boxes in a system, there would be 13 different popups for cable? And if you made a mistake on each of the pages, such as spelling "Guide" incorrectly due to quick fingers, you have to change them all?

    "Simple" code is "Gorilla code." 9 times out of 10, "complex" code is flexible. In fact, let me show some code I've had to fix and compare it to what what I did above:
    BUTTON_EVENT[dvTP,51]
    {
        PUSH:
        {
            SELECT
            {
                ACTIVE(CUR_SRC=12):       (***** DVD COMMANDS *****)
                {
                    PULSE [DVD,51]        (* Clear *)
                }
                
                ACTIVE(CUR_SRC=14):       (***** CD COMMANDS *****)
                {
                    SEND_STRING CDS,"'!4DSC01',$0D"  (*** DISC 1 ***)
                }
                
                ACTIVE(CUR_SRC=9):       (***** DSS COMMANDS *****)
                {
                   SEND_COMMAND DSS1,"'SP',51"    // DISPLAY/INFO
                }
                
                ACTIVE(CUR_SRC=10):       (***** DSS COMMANDS *****)
                {
                   SEND_COMMAND DSS2,"'SP',51"    // DISPLAY/INFO
                }
                
                ACTIVE(CUR_SRC=11):       (***** VCR COMMANDS *****)
                {
                    TO [VCR,122]                     (* CURSOR UP *)
                }
                
            }
        }
    }
    
    This is just for button number 51, and it continues for every single dev-control-button (1-100.) Now, multiply that by the number of panels in a given system. THAT is "gorilla code." Quick and dirty, but not very flexible. Can you imagine going through and fixing a mistake? Think about how many times you'd have to do it for 10 panels.

    AMX is limited, sure, but so it everything else out there. You gotta learn to work with the limitations. I go as far as using variable text on buttons and then showing/hiding certain buttons based on what zone they're controlling, which panel they're using or even the time of day!

    I would love to see the code that manages your different ports.

    (P.S. - my code is NOT the spread apart, nor is it exactly laid out that way. The CODE tags seem to not format my tabs correctly.)



    Thanks James for your code.

    Few things:

    The project is almost done, I have one last task.
    The solution working fine, so if I can choose to remove few popups, so I will and leave it this way.

    Every room have different equipment, so the code is not so simple as in your sample.


    Most of all, in "your" solution, you have to update each time the user enter a specific page and to pull the data.
    That is the hard thing to do, not to speard the command.
    Specialy when every room have different device type, and different sets of devices.

    And beside that , this is not distributed system.
    In "my" solution, every system is independed.

    If a master is down, and it happened to us few times, electricity problem bla bla, every other system is working local with not problem.
    This way you get a full distributed system.
  • jjamesjjames Posts: 2,908
    adys wrote: »
    Thanks James for you code.

    Few things:

    The project is almost done, I have one last task.
    The solution working fine, so if I can choose to remove few popups, so I will and leave it this way.
    No problem, I just wanted to share the way I do things.

    adys wrote: »
    Every room have different equipment, so the code is not so simple as in your sample.
    Yeah, each room in our systems have different equipment too. Some may only have satellite and cable, some may have all those sources.

    adys wrote: »
    Most of all, in "your" solution, you have to update each time the user enter a specific page and to pull the data.
    That is the hard thing to do, not to speard the command.
    Specialy when every room have different device type, and different sets of devices.
    Maybe I don't follow. I "update" the variable once, and that is with source selection. This code just looks up the variable and does whatever its source is. Now, let's say you've got 1 IR controlled DVD player, and 3 RS-232 controlled DVD players, and each of those have different RS-232 protocols. I would simply substitute the current command with a function that would look up which device it needs to send.
    adys wrote: »
    And beside that , this is not distributed system.
    In "my" solution, every system is independed.
    I use this for distributed and independent systems. Like I said, with this way of thinking, it's not "dependent" on what type of system it is. It just works. Period.


    Best of luck, and it appears you've found your answer - 250 or 500. :D
  • adysadys Posts: 395
    :)

    I will count them and let you know

    What I ment is, that if I hold one popup for all rooms, when the user enter this room from a specific panel, I have to update the button states and the text fileds.

    Lots of work.
  • viningvining Posts: 4,368
    adys wrote:
    What I ment is, that if I hold one popup for all rooms, when the user enter this room from a specific panel, I have to update the button states and the text fileds.

    Lots of work
    If you're near the end of a job and all the modules are written in a manner that doesn't allow this then yes it is a fair amount of work and I wouldn't consider it at this point either. The idea to to gradually change modules as you go and when you start writing a new module try to incorporate these techniques since in the end it will definitely enhance your systems performance.

    If all 20 rooms are being used and all rooms are using a different TP page/port for each rooms own seperate devices and each room is using a DVD, Projector and an AVR your updating 1200 pages (20 * 20 pages for the DVD + 20 * 20 pages for the AVR + 20 * 20 pages for the Projector when the system only really needs to update 60 pages (20 rooms * 3 devices per room). Some of these devices are chatty like the DVD players that constantly spit out track lenght/time info which require SEND_COMMAND to update variable text. Alot of these AMX modules also do alot of polling. It's going to impact your system and it may cause you problems at some point when you least expect it. I would test the system and try to run all the rooms at the same time or at least in manner similair to the way they will most likely be used.
Sign In or Register to comment.