How to hold the button?
winstonma
Junior Member
I am looking for the button event that hold the event, so they can send out continuously
for example
button_event[TouchPanel, 1]
{
hold[1, REPEAT]:
{
send_string ....
}
}
this one will send one RS-232 command every 0.1 second. But I want AMX to send the RS-232 command continuously, once I hold the button.
Thanks for the help
for example
button_event[TouchPanel, 1]
{
hold[1, REPEAT]:
{
send_string ....
}
}
this one will send one RS-232 command every 0.1 second. But I want AMX to send the RS-232 command continuously, once I hold the button.
Thanks for the help
Comments
-
winstonma wrote:I am looking for the button event that hold the event, so they can send out continuously
for example
button_event[TouchPanel, 1]
{
hold[1, REPEAT]:
{
send_string ....
}
}
this one will send one RS-232 command every 0.1 second. But I want AMX to send the RS-232 command continuously, once I hold the button.
Thanks for the help
This would probably work (I haven't tested it)Button_Event[dvTp,1] { Hold[1]: { While([dvTp,1]) { Send_String.... } } }
However, I would caution against continuously sending serial data. This could quite easily cause system problems due to the master sending data to the port much faster than the port can deal with it. You may want to reevaluate why you need to send data continuously. Can you provide for information on what you're trying to accomplish?
--D -
Do you mean "touch the button" instead of "hold the button"?winstonma wrote:I want AMX to send the RS-232 command continuously, once I hold the button.
If so, use a timeline to repeat as many times as you want and you'll have control of the speed and numbers of the repeated command. -
Just Curious
Why would you want to send a string out continuously or faster then 1 ten of a second? Most RS232 devices can not handle that speed and you could end up locking up the equipment... What are you trying to do, there maybe other ways to handle the problem? -
Since I'm handling a Tandberg Video Conference device. And the remote control movement is like that... when you hold the camera movement button you'll end up moving the camera smoothly. But when I repeat the movement button every 0.1 second, the camera will move a little bit, and stop, and move a little bit, and stop... which is not a smooth movement.
Actually I wonder if I need to do that using IR instead of using RS-232 -
winstonma wrote:
Actually I wonder if I need to do that using IR instead of using RS-232
Bingo! Good idea. -
Tandberg codecs let you control the near camera with separate "press" and "release" messages. So you can tell the camera to "start moving left", then when the button is released, say "stop moving". This will result in the smooth motion you get from using the remote control. Look up "xcommand CameraMove" in the API manual: http://www.tandberg.com/collateral/documentation/Application_Programmer_Interfaces/TANDBERG_MXP_API.pdf
The far end camera can only be controlled in steps, using fecc or xcommand FECCMove.
Jeremy -
I was actually going to suggest that too. But I am unfamiliar with the Tandberg commands and didn't want to give information from ignorance. I work mainly with Polycom. the cams on the Polycom do the same thing. I also know the Sony cams also work similarly. Start Pan Left, Stop pan left. The IR will get you there too. either way will work.jweather wrote:Tandberg codecs let you control the near camera with separate "press" and "release" messages. So you can tell the camera to "start moving left", then when the button is released, say "stop moving". This will result in the smooth motion you get from using the remote control. Look up "xcommand CameraMove" in the API manual: http://www.tandberg.com/collateral/documentation/Application_Programmer_Interfaces/TANDBERG_MXP_API.pdf
The far end camera can only be controlled in steps, using fecc or xcommand FECCMove.
Jeremy -
Tandberg Camera
Although the new Tandberg codec?s have the Start, Stop movement process. The older codecs did not. The trick is timing, going faster with these cameras tends to make the cameras work more irratic. If I remember correctly, the camera moves for a half a second before stoping everytime you issue the string. So you should send the next message just before the camera stops. Although this still makes the camera jerk, it is the best you can do. The newer codec fixed this, so look for the newer commands. -
The older codecs also have the camera movement command.
I cannot remember the exact software release it was introduced but if I remember it was E4 and B9
The commands are cammove <camera> <direction> -
Many of the systems I've done have required a single set of cursor keys, which were needed to behave like those on the remote - doing both menu and camera control. Since there is no way for the AMX program to determine whether the Tandberg UI is in a state where IR commands would move the camera vs. navigate a menu, I've always run IR just for pan/tilt/zoom...
- Chip -
Couldn't you have a menu button pop up the cursor buttons with the programming for the menu state and a Pan or Camera button pop up the same pages with the programming for camera movement?
I have not used either system, but just thought this might be an easy solution. -
Chip Moody wrote:Many of the systems I've done have required a single set of cursor keys, which were needed to behave like those on the remote - doing both menu and camera control. Since there is no way for the AMX program to determine whether the Tandberg UI is in a state where IR commands would move the camera vs. navigate a menu, I've always run IR just for pan/tilt/zoom...
We used to do this, but got too many complaints about jerky camera movement resulting from IR emulation. Now we use "mode" buttons next to the arrow keys with Menu, Near Cam, and Far Cam. That way the program can send appropriate press/release messages for camera movement or IR emulation for menu nav. Modes are bad, I know (see Raskin et. al), but this one seems to work out pretty well.
Jeremy -
Ah, but I didn't say anything about IR emulation.
I was putting in a "second" for using regular IR for camera controls, 232 for everything else...
- Chipjweather wrote:We used to do this, but got too many complaints about jerky camera movement resulting from IR emulation. -
Possibly, but the client base I'm used to would complain. "The remote doesn't make me do that! Why can't you do the same thing on the touch panel?!"
- Chipthe8thst wrote:Couldn't you have a menu button pop up the cursor buttons with the programming for the menu state and a Pan or Camera button pop up the same pages with the programming for camera movement?
I have not used either system, but just thought this might be an easy solution. -
Try my code. its working on mine.
BUTTON_EVENT [dvTP,5]
BUTTON_EVENT [dvTP,6]
BUTTON_EVENT [dvTP,7]
BUTTON_EVENT [dvTP,8]
{
PUSH:
{
SWITCH(BUTTON.INPUT.CHANNEL)
{
CASE 5:
{
SEND_STRING dvVTC, "'xCommand Key Click Key: Up',$0D"
}
CASE 6:
{
SEND_STRING dvVTC, "'xCommand Key Click Key: Left',$0D"
}
CASE 7:
{
SEND_STRING dvVTC, "'xCommand Key Click Key: Down',$0D"
}
CASE 8:
{
SEND_STRING dvVTC, "'xCommand Key Click Key: Right',$0D"
}
}
}
HOLD [10,REPEAT]:
{
SWITCH(BUTTON.INPUT.CHANNEL)
{
CASE 5:
{
SEND_STRING dvVTC, "'xCommand Key Press Key: Up',$0D"
}
CASE 6:
{
SEND_STRING dvVTC, "'xCommand Key Press Key: Left',$0D"
}
CASE 7:
{
SEND_STRING dvVTC, "'xCommand Key Press Key: Down',$0D"
}
CASE 8:
{
SEND_STRING dvVTC, "'xCommand Key Press Key: Right',$0D"
}
}
}
RELEASE:
{
SWITCH(BUTTON.INPUT.CHANNEL)
{
CASE 5:
{
SEND_STRING dvVTC, "'xCommand Key Release Key: Up',$0D"
}
CASE 6:
{
SEND_STRING dvVTC, "'xCommand Key Release Key: Left',$0D"
}
CASE 7:
{
SEND_STRING dvVTC, "'xCommand Key Release Key: Down',$0D"
}
CASE 8:
{
SEND_STRING dvVTC, "'xCommand Key Release Key: Right',$0D"
}
}
}
}
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums