nxc-com2 problems
locknar
Posts: 30
I have a netlink master connected to a ncx.com2, and an epson projector, when you push the TP the status lights light, the transmit to the ethernet lights, the nxc-com2 blinks green showing connection to the master, when you push the TP the transmit light on the nxc-com2 lights up, but the receive does not light up(and projector does not power on). I have check my RS-232 cabling and even reversed pins 2and 3, this setup serial string works from com1 of the master. The nxc-com2 shows up in the online tree as device 5002, is there another definition or what am I missing to make this work?
DEFINE_DEVICE
epson1 = 5002:2:0 //Epson
dvTP1a = 10001:1:0 //NXT-CV10
dvTP1b = 10001:2:0
dvTP1c = 10001:3:0
dvTP1d = 10001:4:0
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
DEV dvTP1[ ] = {dvTP1a, dvTPWa}
DEV dvTP2[ ] = {dvTP1b, dvTPWb}
DEV dvTP3[ ] = {dvTP1c, dvTPWc}
DEV dvTP4[ ] = {dvTP1d, dvTPWd}
(* THE EVENTS GO BELOW *)
(***********************************************************)
DEFINE_EVENT
data_event [epson1]
{
online:
{
send_command data.device,"'SET baud 9600,n,8,1'"
send_command data.device,"'HSOFF'"
send_command data.device, "'xoff'"
}
}
button_event[dvTP1d,10]
{
push:
{
send_string epson1,"'pwr off',$0D"
}
}
button_event[dvTP1d,41]//projector off
{
push:
{
send_string epson1, "'PWR OFF',$0D"
}
(***********************************************************)
(* THE ACTUAL PROGRAM GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
push[dvtp4,14]
{
send_string epson1, "'PWR ON',$0D"
}
DEFINE_DEVICE
epson1 = 5002:2:0 //Epson
dvTP1a = 10001:1:0 //NXT-CV10
dvTP1b = 10001:2:0
dvTP1c = 10001:3:0
dvTP1d = 10001:4:0
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
DEV dvTP1[ ] = {dvTP1a, dvTPWa}
DEV dvTP2[ ] = {dvTP1b, dvTPWb}
DEV dvTP3[ ] = {dvTP1c, dvTPWc}
DEV dvTP4[ ] = {dvTP1d, dvTPWd}
(* THE EVENTS GO BELOW *)
(***********************************************************)
DEFINE_EVENT
data_event [epson1]
{
online:
{
send_command data.device,"'SET baud 9600,n,8,1'"
send_command data.device,"'HSOFF'"
send_command data.device, "'xoff'"
}
}
button_event[dvTP1d,10]
{
push:
{
send_string epson1,"'pwr off',$0D"
}
}
button_event[dvTP1d,41]//projector off
{
push:
{
send_string epson1, "'PWR OFF',$0D"
}
(***********************************************************)
(* THE ACTUAL PROGRAM GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
push[dvtp4,14]
{
send_string epson1, "'PWR ON',$0D"
}
0
Comments