Emulate button press for 3 seconds?
bob
Independent Programmer
Hi there,
I need to emulate a button press for 3 seconds within Netlinx. DO_PUSH doesn't take a duration option for the button press itself and if the button is not pressed and holded for 3 seconds it has a different function... Anybody has an idea? I have player with SET_PULSE_TIME and PULSE but without luck!
thanks much
I need to emulate a button press for 3 seconds within Netlinx. DO_PUSH doesn't take a duration option for the button press itself and if the button is not pressed and holded for 3 seconds it has a different function... Anybody has an idea? I have player with SET_PULSE_TIME and PULSE but without luck!
thanks much
Comments
-
You could create another button with the function you want to execute just for use with this Do_Push.
-
I also thought about creating a second button, but how do I send a push that is 3 seconds long when this second button is pressed once (single press)?
-
I thought your current button has one function when pressed and a 2nd function when held for 3 seconds? If you create another button (just in code not on the TP) with just the second function you can use the Do_Push for that and leave the button with two function for use on the TP only. When ever code you need to initiate the 2nd function in code Do_Push the new button.
A Do_Push doesn't actually push a button on the TP but initiates a button_event for that device and channel number in the code. -
Absolutely, but this is interpreted at the controlled device. In Netlinx it is still one button which sends the same IR code. Depending on pulse duration (single press or 3s-press), the conrolled device does two different things. I am looking how to emulate the 3s-press with a single button press for instance from a 2nd button on the TP (which I also want to DO_PUSH in the code).I thought your current button has one function when pressed and a 2nd function when held for 3 seconds?
Thanks again! -
DO_PUSH_TIMED
Though I am not sure why you want to do this (providing more info may help us give you a best fit solution), But how about Do_Push_Timed ??NetLinx Keywords Help wrote:DO_PUSH_TIMED
Similar to DO_PUSHexcept this one lets you specify the timeout. DO_PUSH defaults to a 0.5s push on a channel before issuing a DO_RELEASE for you (unless another DO_PUSH is executed for the same channel). DO_PUSH_TIMED lets you control the length of time that will pass before the automatic DO_RELEASE is generated. The syntax:
DO_PUSH_TIMED(DEV Device, INTEGER Channel, LONG Timeout)
Parameters:
Device - the device to PUSH.
Channel - the channel to PUSH.
Timeout - the time (in 1/10ths of seconds) that the PUSH shall remain active. If zero is specified as the timeout then the timeout is 0.5s. If DO_PUSH_TIMED_INFINITE is specified as the timeout then the push never times out.
Returns: None
Example:
DO_PUSH_TIMED (dvTouchPanel, 5, 10) // push button 5 for 1.0S -
Wow, didn't knew about the DO_PUSH_TIMED function! Thanks much!
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
