Home AMX User Forum NetLinx Studio

I need integrate met-6n and radia eclipse

I need integrate MET-6N for controll ligthing radia ECLIPSE,how programming for navigation whell buttons for control ligths, only when button ligths is on and when button tunner is on navigation whell buttons control the tunner. the code in netlinx is the following but not working fine.

PROGRAM_NAME='luces'


DEFINE_DEVICE
keypad=00001:1:0
keypad2=00008:1:0
dvIO = 5001:5:1
dvTp = 10001:1:0
dvRadia = 00004:1:0 //RADIA LIGHTING CONTROLER 1
dvRadia2 = 0003:1:0 //RADIA LIGHTING CONTROLER 2


DEFINE_EVENT
BUTTON_EVENT[keypad2,7]//on
{

push:{
//if button_event = true
//on[keypad2,5]



//off[keypad2,6]
SEND_STRING dvRadia,'3U'
}

HOLD[30]: // IF BUTTON HELD FOR 2 SECONDS
{
SEND_STRING dvRadia,'3D'
}
}

BUTTON_EVENT[keypad2,8]//on
{
push:{
//if button_event = true
//on[keypad2,5]

//off[keypad2,6]
SEND_STRING dvRadia,'5U'
}
HOLD[30]: // IF BUTTON HELD FOR 2 SECONDS
{
SEND_STRING dvRadia,'5D'
}
}

//MET-6N TECLADO SALA

BUTTON_EVENT[keypad,7]//on
{
push:{
//if button_event = true
//on[keypad2,5]

//off[keypad2,6]
SEND_STRING dvRadia2,'5U'
}
HOLD[30]: // IF BUTTON HELD FOR 2 SECONDS
{
SEND_STRING dvRadia2,'5D'
}
}

BUTTON_EVENT[keypad,8]//on
{
push:{
//if button_event = true
//on[keypad2,5]

//off[keypad2,6]
SEND_STRING dvRadia2,'3U'
}
HOLD[30]: // IF BUTTON HELD FOR 2 SECONDS
{
SEND_STRING dvRadia2,'3D'
}
}

BUTTON_EVENT[keypad,9]//on
{
push:{
//if button_event = true
//on[keypad2,5]

//off[keypad2,6]
SEND_STRING dvRadia2,'2U'
}
HOLD[30]: // IF BUTTON HELD FOR 2 SECONDS
{
SEND_STRING dvRadia2,'2D'
}
}

BUTTON_EVENT[keypad,10]//on
{
push:{
//if button_event = true
//on[keypad2,5]

//off[keypad2,6]
SEND_STRING dvRadia2,'4U'
}
HOLD[30]: // IF BUTTON HELD FOR 2 SECONDS
{
SEND_STRING dvRadia2,'4D'
}
}

BUTTON_EVENT[keypad,11]//on
{

push:{
//if button_event = true
//on[keypad2,5]

//off[keypad2,6]
SEND_STRING dvRadia2,'6U'
}
HOLD[30]: // IF BUTTON HELD FOR 2 SECONDS
{
SEND_STRING dvRadia2,'6D'
}
}

DEFINE_PROGRAM

Comments

  • ericmedleyericmedley Posts: 4,177
    In you're example there are many cases like this:
    BUTTON_EVENT[keypad,11]//on
    {
    
    push:{
    //if button_event = true
    //on[keypad2,5]
    
    //off[keypad2,6]
    SEND_STRING dvRadia2,'6U'
    }
    HOLD[30]: // IF BUTTON HELD FOR 2 SECONDS
    {
    SEND_STRING dvRadia2,'6D'
    }
    }
    
    

    I'm curious why you have the IF and ON and OFF statements commented out?
  • I'm curious why you have the IF and ON and OFF statements commented out?


    i was wondering the same thing.
Sign In or Register to comment.