Multiple ICSNet commands
George Krietsepis
Posts: 284
Dear Friends,
I'm using the netlinx module for the old phast PLB-AS16 audio switcher. This module has been working pretty well for the last 10 years.
Now, I need to re-program some new features based on some changes made on that site. The major change is the connection of some areas in more than audio outputs. For example, garden area speakers are connected to PLB-AS16 stereo outputs #5,#6,#7.
What I'd like to do is to raise the volume up/down of these audio outputs simultaneously or at least as more reliable it can be.
As the volume command for an independent output is like "S2L50%" - output 2 set to 50%, I thought something like the below:
Define_Variable
SInteger GardenVolume
Define_Event
Button_event[ Tp,1] //volume up
{
Push:
{
GardenVolume = GardenVolume + 5
SEND_COMMAND myAS16,"'S5L’,itoa(GardenVolume ),’%'"
wait 5 { SEND_COMMAND myAS16,"'S6L’,itoa(GardenVolume ),’%'"
wait 5 { SEND_COMMAND myAS16,"'S7L’,itoa(GardenVolume ),’%'"
}}
}
Hold[1,repeat]:
{
Wait 1 ‘volume ramp’
{
GardenVolume = GardenVolume + 5
SEND_COMMAND myAS16,"'S5L’,itoa(GardenVolume ),’%'"
wait 5 { SEND_COMMAND myAS16,"'S6L’,itoa(GardenVolume ),’%'"
wait 5 { SEND_COMMAND myAS16,"'S7L’,itoa(GardenVolume ),’%'"
}}
}
}
Release : cancel_wait ‘volume ramp’
}
What about the delay times between the commands ? Is the “wait 5” sufficient time between them or it can flood the switcher ?
Especially, how can the “hold” statement handle the audio commands ? On my example, “wait 1” is the delay between the whole packet ( zones 5,6,7 ). But inside the “wait 1” delay, there are the separate delays between each volume commands which are “wait 5” – longer than the whole packet delay.
The “release” statement just cancels the volume ramping commands. But something is going wrong here, I think !!! I could set a longer whole packet delay but it will not have a good sense when ramping the volume up by holding the button.
Any idea of how can I make this work reliable please?
Thanks,
George
I'm using the netlinx module for the old phast PLB-AS16 audio switcher. This module has been working pretty well for the last 10 years.
Now, I need to re-program some new features based on some changes made on that site. The major change is the connection of some areas in more than audio outputs. For example, garden area speakers are connected to PLB-AS16 stereo outputs #5,#6,#7.
What I'd like to do is to raise the volume up/down of these audio outputs simultaneously or at least as more reliable it can be.
As the volume command for an independent output is like "S2L50%" - output 2 set to 50%, I thought something like the below:
Define_Variable
SInteger GardenVolume
Define_Event
Button_event[ Tp,1] //volume up
{
Push:
{
GardenVolume = GardenVolume + 5
SEND_COMMAND myAS16,"'S5L’,itoa(GardenVolume ),’%'"
wait 5 { SEND_COMMAND myAS16,"'S6L’,itoa(GardenVolume ),’%'"
wait 5 { SEND_COMMAND myAS16,"'S7L’,itoa(GardenVolume ),’%'"
}}
}
Hold[1,repeat]:
{
Wait 1 ‘volume ramp’
{
GardenVolume = GardenVolume + 5
SEND_COMMAND myAS16,"'S5L’,itoa(GardenVolume ),’%'"
wait 5 { SEND_COMMAND myAS16,"'S6L’,itoa(GardenVolume ),’%'"
wait 5 { SEND_COMMAND myAS16,"'S7L’,itoa(GardenVolume ),’%'"
}}
}
}
Release : cancel_wait ‘volume ramp’
}
What about the delay times between the commands ? Is the “wait 5” sufficient time between them or it can flood the switcher ?
Especially, how can the “hold” statement handle the audio commands ? On my example, “wait 1” is the delay between the whole packet ( zones 5,6,7 ). But inside the “wait 1” delay, there are the separate delays between each volume commands which are “wait 5” – longer than the whole packet delay.
The “release” statement just cancels the volume ramping commands. But something is going wrong here, I think !!! I could set a longer whole packet delay but it will not have a good sense when ramping the volume up by holding the button.
Any idea of how can I make this work reliable please?
Thanks,
George
0
Comments
Joe, has these "TO" commands ever flood your switcher ?
I have an AS8 running in my house system. I remember back when using these AS8/16 along with the old phast/AMX keypads, I was doing some sort of combine_level, so the level from the keypads would combine with the virtual level of the module for ramping the volume. You could probably combine the levels from virtual device 5, with 6 and 7, so changing it on 5 would automatically update 6 and 7, since they are combined.