Home AMX User Forum NetLinx Studio
Options

Sending Strings to AMX via rs232

Application:

Customer has AMX for Screen & Drape control via relay closure.
Also RS232 for Projectors and DVD players and other related eq.

We just installed Peavey Nion system with IP via web. Nion can
send strings via a 232 port so we were considering using Nion to
access the AMX device and have a page with 50+ presets in Nion
to send the needed strings for the device to control.

While we can control almost any 232 devices via AMX, we never
used another device to send strings to AMX to activate a push or
like function in AMX.

Our idea was to use Nion to send string to do several pushes or commands
that will close drapes, drop screen, or even send other 232 commands
or IR codes from AMX to turn on projectors and such.

Any thoughts.. We are also looking to do the same with a Symetrix
Symnet device which also will send 232 strings to AMX..

Thanks

Comments

  • Options
    sending strings

    Hi there,
    It isn't as difficult as it looks.
    First of all if your are using netlinx is to make a virtual device and a real device for the Yamaha.
    Something like this:

    DEFINE_DEVICE
    dv_YAMAHA=5001:1:0
    vdv_YAMAHA=33001:1:0

    To keep things simpel i just create a data event of the real device port
    and watch the data who comes in (this is the data from the yamaha device.
    If data = equal to what is needed then give a do_push on the virtual device.
    DATA_EVENT[dv_YAMAHA]
    {
    STRING:
    {
    STACK_VAR CHAR YAM_DATA[length of the array]
    IF (FIND_STRING(DATA.TEXT,find something,1))
    {
    DO_PUSH[vdv_YAMAHA,channelx]
    }
    }
    }

    In the mainprogram you can do something like this:
    PUSH[vdv_YAMAHA,channelx] ON[RELAY,SCREEN_DWN]

    Hopes this wil help you to write your program
  • Options
    Thanks

    I'll give it a try this weekend and see how it works..

    Never used the virtual device in AMX...

    Now to select the strings I'll send..

    I belive AA,BB,CC would work as AMX can not get
    confused seeing 260 as 26 also.. Oh yeh, got to
    do the checksum also from what I have gotten so
    far.. Maybe not..
  • Options
    DHawthorneDHawthorne Posts: 4,584
    I wouldn't worry about a checksum unless you have problems with the communications. You can always add them later if you do. My take on checksums is that they came into use back when serial chips were a lot flakier than they are now, and modem links common - where you has lots of potential for data corruption. With two new devices connected directly with a wire between them, I doubt you are going to have a data corruption problem.
  • Options
    Spire_JeffSpire_Jeff Posts: 1,917
    DHawthorne wrote:
    With two new devices connected directly with a wire between them, I doubt you are going to have a data corruption problem.

    You might experience such problems on longer runs (25-50ish feet), but this is normally only when you are trying to use the high speed serial transfer rates (like 115200). This is normally easy to fix tho.... just lower communications to 9600 or 38400.

    9600 still allows 960 characters per second (depending on settings) and on unsheilded 24 gauge wire, you can expect 100 feet if the electrical interferance in the area is low (avoid running the comm wire near fluorescent lights and the such). Most devices out there aren't sending novels, so 9600 should be plenty (IMHO)

    Jeff
  • Options
    Virtual device working.. Thanks

    Virtual device worked for me.. Since the distance for the
    cable was less than 6' I just sent raw strings and all worked
    well..

    Thanks for the replys..
Sign In or Register to comment.