Why Must Multiple Modules Be Defined Together?
nicholasjames
Posts: 154
I pointed out to someone today that multiple instances of a module must be defined together. But when asked, "Why?", I was stymied for a good explanation. The best answer I could offer was "Because it causes problems." Can anyone elucidate on the reason?
Thanks.
Thanks.
0
Comments
Now I don't necessarily want to declare a module inside another module but, like most people that come up against this problem, it'd make thinks a bit easier and neater to group related code together. For example, in the past I've used modules that allowed users to edit the text displayed when certain options were changed. So the user chooses "Input 1" for the display, but they can decide it should say "Laptop", and the lighting "Scene 1" now says "Meeting". This code was modularized, and if you wanted to add labeling functionality to a device, you just passed in the parameters for the touchpanel and button array for that particular device, and viola.
What would save some time is if this code could be grouped into an Include to keep everything nice and neat. However, if you have a Display Include, and a Lighting Include, and there's a Labeling module in each one, then you have the same problem TN 527 talks about.
Though I've never seen this issue myself, this thread discusses it.
Reading that link Alexanbo confirmed the problem in 2006 post #16 but in 2007 nMarkRoberts wrote: I think we need someone to intentionally try and break a system to see if this TN is still valid.
Edit: That reminds me, is there an email address I can hit tech support at instead of using the "Contact AMX" form? Sometimes I have a question that would be best answered by someone at AMX with technical expertise, but it certainly doesn't necessitate filling out the official form. I don't have a "problem" that needs to go in the official duty list. I'm just curious.
NI-4000
Master Firmware - v3.60.453
Device Firmware - v1.30.8
Main Program:
Blank_A.axs
Blank_B.axs
Results:
Each module has had modules within and often multiple rooms will have the same devices hence the same modules.
This would have meant multiple identical projector modules (and others) were defined in different sections of the code.
I don't recall having any issues which weren't standard programming issues when doing this.