Stacking buttons : AMX vs. ********
Stewart
Posts: 37
The college I work at has both AMX and ******** controlled "smart rooms". The powers that be want all rooms to have identical functionality( or close). ******** uses that wonderful logic " OR" to allow one touch on panel doing a variety of things. Choosing any medis source( dvd/vcr/LD) will cause the system to power up /projector to power up /lights down /screen down etc. The AMX programs I have written to also accomplish this require me to stack buttons up as below:
PUSH[TP,13]
PUSH[TP,15]
PUSH[TP,14]
PUSH[TP,18]
PUSH[TP,71] (*RACK/PROJECTOR POWER ON FROM CHOOSING ANY SOURCE*)
{
ON[RELAY1,RACK_PWR]
CALL 'SONY ON'
STATUS=1
PULSE[RELAY1,SCREEN_DN]
}
I am not a great programmer by any stretch and it is a small part of my job so you may laugh at this but is not there a better way to turn everything on? The Powers that be would like the Amx to run like the ********. So upon any source choice the rack/proj fire up. I have written code that can accomplish this upon an initial push at the main page but am hoping to do this upon a button choice without having to stack these buttons one atop another.
Any ideas are more than welcome . Thanks in advance.
Stewart Lane
PUSH[TP,13]
PUSH[TP,15]
PUSH[TP,14]
PUSH[TP,18]
PUSH[TP,71] (*RACK/PROJECTOR POWER ON FROM CHOOSING ANY SOURCE*)
{
ON[RELAY1,RACK_PWR]
CALL 'SONY ON'
STATUS=1
PULSE[RELAY1,SCREEN_DN]
}
I am not a great programmer by any stretch and it is a small part of my job so you may laugh at this but is not there a better way to turn everything on? The Powers that be would like the Amx to run like the ********. So upon any source choice the rack/proj fire up. I have written code that can accomplish this upon an initial push at the main page but am hoping to do this upon a button choice without having to stack these buttons one atop another.
Any ideas are more than welcome . Thanks in advance.
Stewart Lane
0
Comments
Is this system an Axcess system or Netlinx. that'll help with the answer
e
I think it's a general rule, if not it should be, to make a call or function if something is used more than once in code. Keeps it clean and simple in my opinion.
Here's my source select button I use in Netlinx. It basically consists of assigning variables and calling a function that everything is in.
AMX does OR also...
if ((push_channel = 13) or
(push_channel = 15) or
(push_channel = 14) or
(push_channel = 18) or
(push_channel = 71))
{
call 'Stuff to Run'
}
I wouldn't write it this way. Only making a point...
Indded it is Access programming
we have not moved to Netlinx and instead went with ********
Thanks for the replies
Any other suggestions are very welcome
This is not meant to be snarky...
but Netlinx is much better at handling this kind of stuff. It's too bad you couldn't have switched over.
I think you'd have been quite happy with the Netlinx environment.
I agree . We decided to move to ********/Roomview and never linked the Access to the net so no Netlinx programming
Now we have roughly 100 " smartrooms" with AMX/******** and for small spaces Extron
Back to the question. I wrote the push channel and it compiles fine and I am confident this has a future , Thanks everyone!!!!. One more question
Can I use a variable and not write the Push_Channel over and over?
Again I am doing this perhaps once a month and am very rusty.....
PUSH_CHANNEL *is* a variable. It's a global variable automatically populated by the last channel event.
When i place PUSH_CHANNEL in the DEFINE VARIABLE field it changes to blue instead of red
Man I am out of practice.
IF ((PUSH_CHANNEL =13) OR
(PUSH_CHANNEL =14) OR
(PUSH_CHANNEL =15) OR
(PUSH_CHANNEL =7) OR
(PUSH_CHANNEL =8)) (*POWER ON*)
{
ON[TP,40]
OFF[TP,43]
ON[RELAY1,RACK_PWR]
CALL 'SONY ON'
STATUS=1
OFF[TP,19]
ON[TP,20]
PULSE[RELAY1,SCREEN_DN]
}
Help please . This code seems to work well for the Tp 7 and TP 8 button presses ) comp and Aux inputs)
That is I can get the Projector to fire along with rack and screen etc. However any button press of 13, 14, 15, will not turn the projector on. tp 7 and 8 have page flips, Th e 13,14, 15 are for the dvd/vcr/ld and there is also a need ( vcr for example) to switch the Extron see below:
PUSH[TP,13] (*SELECT VHS*)
{
VIDEO_INPUT=1
VIDEO_OUTPUT=3
AUDIO_INPUT=1
AUDIO_OUTPUT=1
CALL 'DO SWITCH'
CALL 'SONY VIDEO'
ON[TP,13]
}
I have tried waits /tried placing another system call for 'sony on' in the above snippet . I am very puzzled.
I have been at this for 5 hrs now and cannot figure what is going on .
I can send any snippets needed just cannot figure this out
I responded saying that AMX has OR statments. Because it was Stacked pushes I made the assumption that it was Axcess. I suggested push_channel as a way to avoid stacked pulses. But it seems there was more to the question originally asked.
If you have different Tps with different buttons and this is for one specific TP, there is a system variable called push_device. So just do..
Of course this is in the DEFINE_PROGRAM section of your code.
I hope this is what you're asking...
If (push_device = TP)
{
if (push_channel.........._
{
}
}
Sorry i am a bit frazzled
The push_channel seems to work but I am wondering why the 3 tp channels ( 13,14,15) will not turn projector on
Further down in mainline is the code to switch sources ( this is tp,13 for the vcr)
PUSH[TP,13] (*SELECT VHS*)
{
VIDEO_INPUT=1
VIDEO_OUTPUT=3
AUDIO_INPUT=1
AUDIO_OUTPUT=1
CALL 'DO SWITCH'
CALL 'SONY VIDEO'
WAIT 4 CALL 'SONY UNMUTE'
ON[TP,13]
}
So , as you can see whenever i push the vcr button i am trying to do several things . along with after everything fires up doing some switching
DVd LD and the vcr code above is all similiar and it it this code that i thought might be interfering with proj powering up as the button pushs tp, 7 and 8 do turn on the projector and have no other ancilliary switching as they do a page flip and then you can choose buttons to make the switching work.
Could you possibly go me on stage further and elaborate on the code snippet you sent?
Axcess has integer arrays, but not DevChans.
--D