Home AMX User Forum AMX General Discussion

Send_Command Response From a MAX-CSE

Hi All,

i'm currently trying to get response from a MAX-CSE.

SEND_COMMAND ENCODER, 'GET STREAM STATUS'

The unit is set has

ENCODER 32001:1:0

i have create a buffer

CREATE_BUFFER ENCODER, ENCODER_TBUF

The ENCODER_TBUF is set to 100

char ENCODER_TBUF[100]

i'm currently using the com port of the MAX-CSE ENCODERS232 32001:2:0 and the command and response works perfectly for the comport.

but someone can help me to figure out why i can't receive any response from the unit when i'm trying to get information from the Port 1 of the MAX-CSE.

Thanks.

Comments

  • ijedijed Posts: 28
    What is the physical device number?

    It should be set in a range 5001-5999

    Then port 2 is used for serial commands/strings.

    So if it's set to 32001 then 32001:2:0 is the serial port
  • ericmedleyericmedley Posts: 4,177
    If the serial ports are up at 32,000s then they are in the dynamic device range. They should be set back down. 5001 is the standard but anything below 9999 should be okay.
  • RaphayoRaphayo Posts: 111
    ijed wrote: »
    What is the physical device number?

    It should be set in a range 5001-5999

    Then port 2 is used for serial commands/strings.

    So if it's set to 32001 then 32001:2:0 is the serial port

    The Serial Port works fine, i'm able to send/receive command from the serial port of the MAX-CSE.

    The problem is i sent a command to the Port 1 (Streaming Command) of MAX-CSE. The command is working when i set parameter

    SEND_COMMAND ENCODER,"'PLAY'"
    SEND_COMMAND ENCODER,"'SET ASOURCE MIC'"

    but the port didn't return feedback when i sent a get command. those get command are supposed to return a response of the actual status.

    SEND_COMMAND ENCODER,"'GET VSOURCE'" should return VSOURCE = COMP


    Does it mean i need to set the the MAX-CSE to and address between 5000-5999 to be able to get response from port 1

    Thanks
  • ijedijed Posts: 28
    Looking at the manual
    http://www.amx.com//assets/manuals/MAX-CSE.CSD.OperationReferenceGuide.pdf
    port 1 is for stream commands
    port 2 is for 232 commands

    can you post some code? It might help figure out what you're trying to do

    command responses should come back on port 1 - how are you capturing them?
    you should have:
    data_event[ENCODER]
    {
      command:
      {
        send_string 0, "'Command Received: ', data.text"
        //process response here
      }
    }
    

    then for your 232 responses:
    data_event[ENCODERS232]
    {
      string:
      {
        send_string 0, "'String Received: ', data.text"
        //process response here
      }
    }
    
  • RaphayoRaphayo Posts: 111
    Problem Solved

    Thanks ijed,

    i was using String: instead of Command:

    now it's working.

    by using data.text i don't need to use create_buffer anymore?
  • mpullinmpullin Posts: 949
    Raphayo wrote: »
    by using data.text i don't need to use create_buffer anymore?
    It depends on the type of device that is talking to you. Any kind of an external device, you want to use a buffer because it is not guaranteed you will get an entire command in one packet. (Hence if you are only using DATA.TEXT you'll lose information) If we are talking about another AMX device, like a touchpanel or anything on the Axlink bus, then DATA.TEXT is sufficient.
  • ericmedleyericmedley Posts: 4,177
    mpullin wrote: »
    It depends on the type of device that is talking to you. Any kind of an external device, you want to use a buffer because it is not guaranteed you will get an entire command in one packet. (Hence if you are only using DATA.TEXT you'll lose information) If we are talking about another AMX device, like a touchpanel or anything on the Axlink bus, then DATA.TEXT is sufficient.

    Also, just so you know... Data.text has a 2K size limit. With Create_Buffer you can go well beyond that size. So, for things like web page interfacing, large XML files and so forth you will need to go with C_B to avoid truncated messages.
Sign In or Register to comment.