Home AMX User Forum AMX Technical Discussion

IR/Serial

This seem a rookie question, but how do you set up an IR/Serial port to be used as serial (trasmit only) instead of IR? Need this function because an ni3100 has run out of serial ports. My current code (to test the system) looks like this:

DEFINE_DEVICE

//dvNI700 = 5001:0:0
dvIR = 05001:3:0 //IR port out
dvTOUCHPANEL = 3201:1:0 //TOUCH PANEL


DEFINE_EVENT

data_event[dvIR]
{
online:
{
SEND_COMMAND dvIR,"'SET MODE SERIAL'"
SEND_COMMAND dvIR,"'CAROFF'"
SEND_COMMAND dvIR,"'SET BAUD 9600,N,8,1 485 DISABLE'"
}
}

button_event[dvTOUCHPANEL,1]
{
push:
{
send_string dvIR,"$01"
}
}

Is there anything fundamental or otherwise that would be causing a problem with this?

*firmware is up to date
*tested on an ni700 (destined for an ni3100)

Comments

  • Replace SEND_COMMAND dvIR,'SET MODE SERIAL' with SEND_COMMAND dvIR,'SET MODE DATA' to get this to work correctly. CAROFF command is not necessary.
  • jweatherjweather Posts: 320
    Keep in mind that the voltage will be lower than a normal 232 port, so AMX does not recommend baud rates over 9600 and distances over 10 feet or something like that. I try to avoid using 1-way 232 whenever possible with AMX.
  • ur-lyingur-lying Posts: 23
    Fantastic! Much appreciated, thank you!
  • HedbergHedberg Posts: 671
    jweather wrote: »
    Keep in mind that the voltage will be lower than a normal 232 port, so AMX does not recommend baud rates over 9600 and distances over 10 feet or something like that. I try to avoid using 1-way 232 whenever possible with AMX.

    We've had to do the IR/serial thing with some tiny little Extron media link audio switchers and have had perfect results so far. They are 9600 baud and less than 10', to be sure. I'd rather use normal serial ports too, but the Extron stuff seems to work fine.
  • John NagyJohn Nagy Posts: 1,742
    There are lots of choices at or under $100 to add a serial port via IP, discussed in depth recently on this forum. DIGI-ONE SP, Global Cache, many others. The IRS4 is more valuable for IR. And more costly than the network-to-serial adapters.
  • AuserAuser Posts: 506
    John Nagy wrote: »
    The IRS4 is more valuable for IR. And more costly than the network-to-serial adapters.

    Umm, IRS4? Who mentioned an IRS4? Not sure the OP was after a comparison of other solutions, he just seems to want to use existing hardware (onboard IR ports as far as I can tell) to solve a problem. As such his solution is cheaper for the client than an IP-RS232 adaptor too.

    While using IR ports as one way serial is definitely not best practice, it's perfectly adequate in many scenarios where devices need to be added to existing installs, or where a client's budget doesn't lend itself to a more elegant solution.

    IR ports are only valuable for IR transmission if they are needed to control devices via IR; if not they're redundant hardware that's begging to be used.

    For the record, I've never had any dramas controlling devices via one way serial off an IR port (remembering the limitations already noted by other posters). IP-RS232 devices are far less reliable as the Ethernet network between the NetLinx and peripheral device introduces multiple points of failure.
  • John NagyJohn Nagy Posts: 1,742
    Whoops. Never mind. Reading my own recent issues into his post where they aren't.
  • ur-lyingur-lying Posts: 23
    Luckily the use will fit into all those requirements, so it will hopefully work when testing it today.
  • RaphayoRaphayo Posts: 111
    Is This can be done with an axcent2 or axcent3?

    Thanks.
  • Joe HebertJoe Hebert Posts: 2,159
    Raphayo wrote: »
    Is This can be done with an axcent2 or axcent3?

    Axcent 2, no.
    Axcent 3 (Pro), yes.

    See Tech Note 394 for more info.
  • KmclaneKmclane Posts: 33
    Data strings can not be too long!

    I have just run into an interesting limitation while testing an IR port for 1-way rs232 use. The data string seems to be limited to 64 characters in length. Sending a message with 65 characters turns the string into random garbage.
    Tested by routing the output of the IR port into an empty rs-232 port.
    Has anyone seen documentation that supports this?
  • Joe HebertJoe Hebert Posts: 2,159
    Kmclane wrote: »
    I have just run into an interesting limitation while testing an IR port for 1-way rs232 use. The data string seems to be limited to 64 characters in length. Sending a message with 65 characters turns the string into random garbage.
    Tested by routing the output of the IR port into an empty rs-232 port.
    Has anyone seen documentation that supports this?

    The 64 character limit sounds right. Check out TN 156.
    You’ll need to break up your data into 64 character chunks and do multiple send_strings.
  • KmclaneKmclane Posts: 33
    Thanks for pointing out the TN. It is always helpful to see the parameters.
Sign In or Register to comment.