Home AMX User Forum AMX General Discussion

Controlling a device

Is it possible to control a single device for testing/troubleshooting? I can't get my projector to power on. I'm wondering if there is a way to see if I'm communicating with it, or send a single command, etc.

My equipment:
AXCENT3 PRO
AXT-CV10
Canon REALiS SX7

Thanks,
Tom

Comments

  • drewdbdrewdb Posts: 14
    Have you tried using Hyper Terminal and connecting the Projector directly to your PC? Another program that is great for this is the trial version of Docklight.
  • DHawthorneDHawthorne Posts: 4,584
    You can also use the "control a device" page under Diagnostics. It's limited and quirky, but sometimes sufficient, and you don't have to disconnect your device from the master to use it.
  • tkurshintkurshin Posts: 11
    DHawthorne wrote: »
    You can also use the "control a device" page under Diagnostics. It's limited and quirky, but sometimes sufficient, and you don't have to disconnect your device from the master to use it.


    I tried to use that but it's greyed out and I thought it wouldn't work for my equipment. Might there be something that I'm doing wrong?
  • tkurshintkurshin Posts: 11
    drewdb wrote: »
    Have you tried using Hyper Terminal and connecting the Projector directly to your PC? Another program that is great for this is the trial version of Docklight.

    Thanks, I'll definately check it out.
  • DHawthorneDHawthorne Posts: 4,584
    tkurshin wrote: »
    I tried to use that but it's greyed out and I thought it wouldn't work for my equipment. Might there be something that I'm doing wrong?

    I've never seen that - perhaps the properties for the system were not set and NS doesn't know how to connect to your master for debugging?
  • tkurshintkurshin Posts: 11
    DHawthorne wrote: »
    I've never seen that - perhaps the properties for the system were not set and NS doesn't know how to connect to your master for debugging?


    I can connect the On-line tree and see all the devices. I can send a file to the controller. Any suggestions?

    Thanks
  • DarksideDarkside Posts: 345
    Control a device is for NetLinx systems.

    Depending on the firmware rev in your AXcent3, you can do some things through terminal like pulse relays etc.

    From terminal, type in HELP and you will get a full listing of cmds available to you from the master with that rev of firmware. I can't quite remember if you can do a send_string or not..

    Regardless, I think this method is a bit cumbersome and as you have an AXcess platform dev, the best way to debug will be with your projector plugged into a good terminal app as already suggested.

    HTH
  • KouyaKouya Posts: 60
    Was this projector working then somehow stopped responding?

    Are other controlled devices working?


    brian
  • tkurshintkurshin Posts: 11
    I did download docklight and use it with the projector plugged directly into my serial port, worked great.

    I just can't get the Axcent to talk to it.

    Control a device is for NetLinx systems.

    Depending on the firmware rev in your AXcent3, you can do some things through terminal like pulse relays etc.

    From terminal, type in HELP and you will get a full listing of cmds available to you from the master with that rev of firmware. I can't quite remember if you can do a send_string or not..

    Regardless, I think this method is a bit cumbersome and as you have an AXcess platform dev, the best way to debug will be with your projector plugged into a good terminal app as already suggested.

    HTH
  • jjamesjjames Posts: 2,908
    tkurshin wrote: »
    I did download docklight and use it with the projector plugged directly into my serial port, worked great.

    I just can't get the Axcent to talk to it.

    You did set the baud rate on the port, yes?
  • DarksideDarkside Posts: 345
    tkurshin wrote: »
    I did download docklight and use it with the projector plugged directly into my serial port, worked great.

    I just can't get the Axcent to talk to it.
    I assume you tested the projector on the terminal app with the same cable as you have been using with the Axcent3?

    Is this a pre-made cable? This could be your problem. Make a cable with only pins 2 3 and 5 connected for now and try that.

    If you'd like to post your code we can help determine if you have a software problem or hardware (cabling) problem.

    HTH
  • DHawthorneDHawthorne Posts: 4,584
    I missed the part about it being an Axcent3. The device control page in NS won't work for an Axcent.

    However, AMX makes a tool that will ... find OpenAxcess on the AMX site and connect to your system with that. YOu can individually control any of the Axcent3 ports there.
  • tkurshintkurshin Posts: 11
    First, let me say thanks for all the help. It's very much appreciated.

    I pulled the serial cable off of port 6 (see code below) and hooked it up directly to my PC. Using Docklight I was able to connect to the projector and send commands sucessfully. So wiring is not the problem.
    I assume you tested the projector on the terminal app with the same cable as you have been using with the Axcent3?

    Is this a pre-made cable? This could be your problem. Make a cable with only pins 2 3 and 5 connected for now and try that.

    If you'd like to post your code we can help determine if you have a software problem or hardware (cabling) problem.

    HTH

    I downloaded OpenAxcess. Hooked up the cable back up to port 6. Ran OpenAxcess. Tried to send commands . . . nothing.
    DHawthorne wrote: »
    I missed the part about it being an Axcent3. The device control page in NS won't work for an Axcent.

    However, AMX makes a tool that will ... find OpenAxcess on the AMX site and connect to your system with that. YOu can individually control any of the Axcent3 ports there.

    I've attached instructions from the projector manual:

    Here is my code . . . but no laughing:


    DEFINE_DEVICE

    SW = 3 (* EXTRON SYSTEM 8 *)
    Denon = 4 (* Denon Receiver*)
    PROJ = 6 (* Canon X7 *)
    RELAY = 7 (* LUTRON / SCREEN *)
    VCR = 5 (* SHARP XA-920 VHS VCR *)
    DVD = 8 (* Liteon DVD-2001 *)
    INOUT = 14 (* ONBOARD IIOs*)
    TP = 128 (* AXT-CA10 WIRED TOUCHPANEL *)

    (**********************************************************)
    (*CONSTANT DEFINITIONS GO BELOW*)
    (**********************************************************)

    DEFINE_CONSTANT
    (* {{NSX_DEFINE_CONSTANT *)


    (***********************************************************)

    (*VARIABLE DEFINITIONS GO BELOW*)

    (***********************************************************)

    DEFINE_VARIABLE

    SYS_POWER

    SW_INPUT
    LIGHTS_POPUP

    (*MUTUALLY EXCLUSIVE DEFINITIONS GO BELOW*)

    DEFINE_MUTUALLY_EXCLUSIVE

    ([TP, 120].. [TP, 122])

    (***********************************************************)

    (*SUBROUTINE DEFINITIONS GO BELOW*)

    (***********************************************************)

    DEFINE_CALL 'SYSTEM_OFF'
    {
    OFF [SYS_POWER]
    SEND_COMMAND TP, 'PAGE-POWER WARNING'
    SW_INPUT=0
    PULSE [RELAY, 7]
    SEND_COMMAND TP, '@PPX'
    OFF [LIGHTS_POPUP]
    OFF [SYS_POWER]
    send_command proj, 'power off'
    }


    (***********************************************************)
    (*STARTUP CODE GOES BELOW*)
    (***********************************************************)

    DEFINE_START

    SEND_COMMAND SW, 'SET BAUD 9600,N,8,1 485 DISABLE'
    SEND_COMMAND SW, 'HSOFF'

    SEND_COMMAND PROJ, 'SET BAUD 19200,N,8,2'
    SEND_COMMAND PROJ, 'remote'


    SEND_COMMAND DVD, 'SET MODE IR'

    send_command VCR, 'set mode ir'

    SEND_COMMAND INOUT, 'SET MODE HIGH'


    (***********************************************************)
    (*THE ACTUAL PROGRAM GOES BELOW*)
    (***********************************************************)

    DEFINE_PROGRAM

    SYSTEM_CALL 'DAYLTSAV'

    PUSH[TP,1] (* SYSTEM START *)
    {
    send_command proj, 'Power ON'
    PULSE [RELAY,8]
    SEND_COMMAND TP, '@PPX'

    SW_INPUT=0
    SEND_COMMAND TP, 'PAGE-Mode select'
    }
    [RELAY,5]=SYS_POWER


    (* Computers *)

    [TP, 10] = (SW_INPUT=1)
    [TP, 12] = (SW_INPUT=3)

    PUSH[TP, 10] (*PC*)
    PUSH[TP, 12] (*laptop*)
    {
    SW_INPUT=(PUSH_CHANNEL-9)
    SEND_STRING SW, "ITOA(SW_INPUT), '! '"
    }

    (* Players *)

    [TP,8]=(SW_INPUT=5)
    [TP,9]=(SW_INPUT=7)

    PUSH [TP,8] (* Play VCR *)
    {
    SEND_STRING SW, "ITOA(SW_INPUT), '! '"
    SEND_COMMAND TP, '@PPF-lites'
    OFF [LIGHTS_POPUP]
    send_command proj, 'input=video'
    }
    PUSH [TP,9] (* Play DVD *)
    {
    SEND_STRING SW, "ITOA(SW_INPUT), '! '"
    SEND_COMMAND TP, '@PPF-lites'
    OFF [LIGHTS_POPUP]
    send_command proj, 'input=comp'
    }

    PUSH [TP, 120] (* VIDEO SELECT *)
    PUSH [TP, 121] (* COMP SELECT *)
    {
    SW_INPUT=0
    }

    PUSH [TP, 122] (*EXIT SOURCE BUTTON*)
    {
    ON [TP, PUSH_CHANNEL]
    SW_INPUT=0
    }

    (* LIGHTING PRESETS*)

    PUSH [TP, 90]
    PUSH [TP, 91]
    PUSH [TP, 92]
    PUSH [TP, 93]
    PUSH [TP, 94]
    PUSH [TP, 95]
    {
    SET_PULSE_TIME(15)
    PULSE [RELAY, (PUSH_CHANNEL-89)]
    SET_PULSE_TIME(5)
    }

    [TP,90] = [INOUT,1]
    [TP,91] = [INOUT,2]
    [TP,92] = [INOUT,3]
    [TP,93] = [INOUT,4]
    [TP,94] = [INOUT,5]
    [TP,95] = [INOUT,6]
    [TP,96] = [INOUT,7]
    [TP,97] = [INOUT,8]
    [TP,98] = [INOUT,9]
    [TP,98] = [INOUT,10]
    [TP,100] = [INOUT,11]

    (* END LIGHTING PRESETS*)

    (* SCREEN *)
    SYSTEM_CALL 'SCREEN2' (TP,111,112,113,RELAY,7,8,0,0)


    (* PLAY VCR*)
    PUSH [TP,40] (* VCR PLAY*)
    PUSH [TP,41] (* VCR STOP*)
    PUSH [TP,42] (* VCR PAUSE*)
    PUSH [TP,43] (* VCR FFWD*)
    PUSH [TP,44] (*VCR REWIND*)
    {
    TO[VCR,(PUSH_CHANNEL-39)]
    }


    (* DVD *)

    PUSH [TP, 51] (* DVD PLAY*)
    PUSH [TP, 52] (* DVD STOP*)
    PUSH [TP, 53] (* DVD PAUSE*)
    PUSH [TP, 54] (* DVD NEXT*)
    PUSH [TP, 55] (* DVD PREV*)
    PUSH [TP, 56] (* DVD FFWD*)
    PUSH [TP, 57] (*DVD REW*)
    {
    TO [DVD,(PUSH_CHANNEL-50)]
    }

    PUSH [TP, 58] (* DVD MENU *)
    PUSH [TP, 59] (* DVD UP *)
    PUSH [TP, 60] (* DVD DOWN *)
    PUSH [TP, 61] (* DVD LEFT *)
    PUSH [TP, 62] (* DVD RIGHT *)
    PUSH [TP, 63] (* DVD ENTER *)
    {
    TO [DVD,(PUSH_CHANNEL-14)]
    }
    PUSH [TP, 64] TO [DVD, 53] (* DVD DISPLAY *)
    PUSH [ TP, 65] TO [DVD, 58] (* DVD CLEAR *)


    PUSH[TP,250] (* POWER OFF*)
    {
    CALL 'SYSTEM_OFF'
    }


    IF((PUSH_DEVICE=128) AND (PUSH_CHANNEL>0))
    {
    CANCEL_WAIT 'AUTO SHUTDOWN'
    }

    WAIT 36000 'AUTO SHUTDOWN'
    {
    WAIT 36000 'AUTO SHUTDOWN'
    {
    WAIT 36000 'AUTO SHUTDOWN'
    {
    WAIT 36000 'AUTO SHUTDOWN'
    {
    CALL 'SYSTEM_OFF'
    }
    }
    }
    }

    (***********************************************************)
    (* END OF PROGRAM*)
    (* DO NOT PUT ANY CODE BELOW THIS COMMENT*)
    (***********************************************************)
  • Spire_JeffSpire_Jeff Posts: 1,917
    tkurshin wrote: »
    First, let me say thanks for all the help. It's very much appreciated.

    I pulled the serial cable off of port 6 (see code below) and hooked it up directly to my PC. Using Docklight I was able to connect to the projector and send commands sucessfully. So wiring is not the problem.



    I downloaded OpenAxcess. Hooked up the cable back up to port 6. Ran OpenAxcess. Tried to send commands . . . nothing.

    Is this a pre-made cable, or did you make it yourself? If this is a pre-made cable, this can be the cause of your problem. The reason for this is that the AMX ports support 422/485/232 and your computer only supports 232. The additional wires that are connected can sometimes cause problems with devices because of the signals being sent by the AMX processor on wires that are being used for 422/485 comms.

    As for the code, use SEND_STRING, not SEND_COMMAND to send strings to the projector. SEND_COMMAND talks to the port (the actual port device) and SEND_STRING talks to the device attached to the port.

    Hope this helps,
    Jeff
  • DHawthorneDHawthorne Posts: 4,584
    Yup, a problem is definitely that you are using SEND_COMMAND instead of SEND_STRING . The only thing SEND_COMMAND is for on a serial port is setting up the baud rate, etc.
  • tkurshintkurshin Posts: 11
    I made the cable, only three wires. I checked the wiring several times. I'm baffled and I don't know what else to try. It almost seems like there is an incompatibility between the projector and the controller.
    Spire_Jeff wrote: »
    Is this a pre-made cable, or did you make it yourself? If this is a pre-made cable, this can be the cause of your problem. The reason for this is that the AMX ports support 422/485/232 and your computer only supports 232. The additional wires that are connected can sometimes cause problems with devices because of the signals being sent by the AMX processor on wires that are being used for 422/485 comms.

    As for the code, use SEND_STRING, not SEND_COMMAND to send strings to the projector. SEND_COMMAND talks to the port (the actual port device) and SEND_STRING talks to the device attached to the port.

    Hope this helps,
    Jeff
  • DarksideDarkside Posts: 345
    tkurshin wrote: »
    First, let me say thanks for all the help. It's very much appreciated.

    I pulled the serial cable off of port 6 (see code below) and hooked it up directly to my PC. Using Docklight I was able to connect to the projector and send commands sucessfully. So wiring is not the problem.



    I downloaded OpenAxcess. Hooked up the cable back up to port 6. Ran OpenAxcess. Tried to send commands . . . nothing.



    I've attached instructions from the projector manual:

    Here is my code . . . but no laughing:

    No-one will laugh at you asking for help...

    :-)

    Others have already rightly pointed out to use send_string and not send_command to talk to the projector.

    Also, the protocol tells you to use CR,LF to complete your string.

    Your code issues the command, but no CR,LF. Terminal apps will issue CR,LF when you press enter, so, that's probably why it works from the terminal app and not from the AXcent.

    Also, you must build some kind of command stack controller - in other words, you must make sure you allow time between commands to occur or it is very likely that commands will bump into each other and the unit will not work.

    The simplest and quickest (and dirtiest!) method would be a call routine that has a busy flag in it. The following is not tested.

    define_call 'vp ctl' (char cmd)
    {
    on[vp_busy]
    send_string vp,"cmd,$0D,$0A"
    wait 3 'flow speed' off[vp_busy]
    }

    define_program

    push[tp,1]
    {
    wait_until (!vp_busy) call 'vp ctl' (remote)
    }

    This routine will probably open up a good deal of discussion in this thread about the use of wait_until, but it is usable and will work for you.

    If you don't build a proper handler to stack and execute your serial cmds, and you use something like the above, create a safety net for yourself by issuing a cancel_wait_until and switching off your vp_busy flag in your define_start. Wait_until will not expire until the logic is true and if there is a hiccup with the code and the busy flag does not go to off, you're in deep doo-doos.

    :-)

    HTH
Sign In or Register to comment.