Home AMX User Forum NetLinx Studio

Hold and REPEAT in AXCENT3

Hi everybody, how i can use HOLD and REPEAT in Axcent3 for example i am using in netlinx


BUTTON_EVENT[MVP3,293] //PAN RIGHT
{
PUSH:
{
SEND_STRING CAMERA,"CAMID,$01,$82"
}
HOLD[5,REPEAT]:
{
SEND_STRING CAMERA,"CAMID,$01,$84"
}
}

or any other idea i want repeat my send string every 5 mic_sec if my push is hold in Axcess Program for Axcent3

Comments

  • A HOLD and/or REPEAT must be programmed manually in AXcess:
    DEFINE_DEVICE
    
    dvPANEL = 128
    dvSER		= 1
    
    (***********************************************************)
    DEFINE_VARIABLE
    nButton  (* which button is pressed *)
    
    (***********************************************************)
    DEFINE_PROGRAM
    
    (* add buttons who need to do a repeat *)
    PUSH[dvPanel,1]
    PUSH[dvPanel,2]
    {
    	nButton = PUSH_CHANNEL
    }
    RELEASE[dvPanel,1]
    RELEASE[dvPanel,2]
    {
    	CANCEL_WAIT 'DO_REPEAT'
    	nButton = 0
    }
    
    IF(nButton) (* a button is pressed *)
    {
    	Wait 3 'DO_REPEAT'
    	{
    		(* do something every 300ms *)
    		SELECT
    		{
    			ACTIVE(nButton = 1):
    			{
    			}
    			ACTIVE(nButton = 2):
    			{
    			}
    			(* etc. *)
    		}
    	}
    }
    
    
    If you need action at the PUSH time (and not just after 300ms the first time), add the corresponding statements also into the PUSH[].
  • Thanks marc up to this issue I am able to do this. One thing I did not understand witch protocol I am using in netlinx for camera these code are sending different string in Access. I expend long time to search code in Access I play with different code luckily I found what I want like in netlinx for zoom in I use send_string dvCAM, ? ? $01,$10,$80? ?
    But same this code was not working in Access. In Access what I found send_string dvCAM, ? ? $01,$16,$80? ? for zoom in.
  • In general, the SEND_STRING syntax is the same in Axcess and NetLinx. But the AXcess compiler is a liltte bit lazy in several details, where the NetLinx COmpiler would create an syntax error.

    I think the correct string would be "$01,$16,$80"
Sign In or Register to comment.