Home AMX User Forum NetLinx Studio

Serial command

Hi

I tried a small test with netlink studio, and I tink as it's correct but when I send command trought the TX led on port one dosen't lit why?
PROGRAM_NAME='SNH2009'
(***********************************************************)
(*          DEVICE NUMBER DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_DEVICE

dv_MATRIX	= 5001:1:0
dv_TP		= 10001:1:0


(***********************************************************)
(*                THE EVENTS GO BELOW                      *)
(***********************************************************)
DEFINE_EVENT

DATA_EVENT[dv_MATRIX]	
{
    ONLINE:
	{
	SEND_COMMAND dv_MATRIX, "'SET BAUD 9600,N,8,1 485 DISABLE'"
	}
}

BUTTON_EVENT [dv_TP,1]
{
    PUSH:
    {
    SEND_COMMAND dv_MATRIX, "'INPUT- INTERNAL TUNER,1'"
    }
}

BUTTON_EVENT [dv_TP,2]
{
    PUSH:
    {
    SEND_COMMAND dv_MATRIX, "'INPUT-INTERNAL TUNER,0'"
    }
}


If the command are no good, the TX pilot should lit ?

Comments

  • AMXJeffAMXJeff Posts: 450
    Denis wrote: »
    Hi

    I tried a small test with netlink studio, and I tink as it's correct but when I send command trought the TX led on port one dosen't lit why? ... If the command are no good, the TX pilot should lit ?

    use send_string instead of send_command...

    // try this
    SEND_STRING dv_MATRIX, "'INPUT- INTERNAL TUNER,1'"
  • DarksideDarkside Posts: 345
    You need to change your button_events to send_string not send_command.

    send_command speaks to the AMX device - therefore your online_event is fine.
  • DenisDenis Posts: 163
    Thanks, now the pilot lit..

    But I'm sure as I tried before my post .... sorry, I'm confuse with the doc in module, they spoke about "send_command" and since Matrix is a product of AMX I tried send command too and I dont know why my first (send_string) test has don't work
  • DHawthorneDHawthorne Posts: 4,584
    SEND_COMMAND is for sending instructions to the device itself; setup parameters, special functions, etc. SEND_STRING tells the device to pass that string through its port.
  • DenisDenis Posts: 163
    Thank for your help

    Only one thing, after many hr of labour, I was confused ( lack experience). The real problem was my "Matser" controler!

    It's run any program who use ip protocol to communicate with interface, (ie: Modero intercom) but when I asked for external command such as serial, relay or IR out the master never send thoses commands. I use a new master and now all work nice!
Sign In or Register to comment.