Home AMX User Forum NetLinx Studio

A question about baud rates...

When I started with AMX stuff, almost everything I ran into was set to 9600 baud. But after my experiences with BiAmps and Polycoms, I'm thinking that I want to crank up baud rates as high as I can.

How do others approach baud rate settings?

Comments

  • vincenvincen Posts: 526
    Well you just add in your program in the online of a DATA_EVENT for each serial device the command as is:

    SEND_COMMAND DATA.DEVICE,'SET BAUD 9600,N,8,1 485 DISABLE'

    You just adjust accordingly to device controled speed, parity, length and stop bit and everything is same in program ;)

    Hope it helps
  • GSLogicGSLogic Posts: 562
    When I started with AMX stuff, almost everything I ran into was set to 9600 baud. But after my experiences with BiAmps and Polycoms, I'm thinking that I want to crank up baud rates as high as I can.
    How do others approach baud rate settings?
    You can only set the baud rate as high as the device will allow. If there are different setting for the device's baud rate, keep in mind faster is not always better. Some device need time to process commands, so if you increase the baud rate you'll have to use a que to hold the commands until the device has processed them before receiving the next command.
  • Most devices, technically, support up to 115200 baud. I've also discovered that many devices have no flow control and no buffering, so I've got to implement a command/response flow control anyway. Over the last couple of weeks, I've ended up testing a wide range of baud rates (from 2400 to 115200) on several different devices, and I've found that slower baud rates do NOT equate to fewer dropped commands, nor do higher baud rates cause more problems. The only real "fix" for serial devices dropping commands has been to implement a command/response flow control.

    Longer serial cables force lower baud rates, of course. I've left all my projectors at 9600 baud since they are usually a fair distance from the controller. Projectors just don't get a barrage of commands that could be dropped, either. But for devices in the same rack as the controller, cable length isn't an issue, and sometimes I have to send several commands in a row to the device. So I've been upping the baud to 115200 (or at least 57600) on these devices, and it seems like it makes the whole system just a bit "snappier".

    Does anyone know whether slower baud rates actually slow down the controller? It seems like the faster I can get commands in and out of the controller, the more time the controller has to chew away on the program and be more "responsive". Then again, maybe each serial port is buffered from the CPU itself, and the actual data sending is handled by a separate serial controller. Any comments on that?
  • jweatherjweather Posts: 320
    PCs, and presumably AMX controllers, offload the serial encoding/decoding process to a chip called a UART (http://en.wikipedia.org/wiki/UART). The amount of buffering done depends on the chip, but I doubt that changing baud rates affects your CPU usage very much at all.

    Jeremy
  • ericmedleyericmedley Posts: 4,177
    Another consideration...

    I tend to leave all serial devices controlled at their factory or default baud settings. I find that it's a little more fool proof. If the device somehow gets zapped or someone comes along and resets it, it comes up in factory settings. If you work with the factory settings, you tend not to get into trouble in that regard.

    I typically don't find most device's serial communication to be so slow that it's unusable. Even home security systems which are painfully slow. (1200 baud) seem to do alright for most applications.
  • NMarkRobertsNMarkRoberts Posts: 455
    Keep it safe

    I can't see any reason to change the factory setting. I can think of reasons not to - like confusing the next guy to work on the system, or making it impossible to replace a faulty unit without looking at the code.
  • DHawthorneDHawthorne Posts: 4,584
    I don't change baud rates anymore either, unless the default really is unacceptably slow. For most controlled devices, the amount of stuff going back and forth doesn't require a higher speed anyway. For me, it's just not worth the hassle when a box needs to be replaced or swapped out, going through with the techs how to change the baud rate, and what to change it to ... to say nothing of something happening that resets it to default. It's just simpler all around to leave it alone.

    That said, if there is a lot of traffic, a slow baud rate just won't cut it. A media server, for example, like an Escient Fireball, would really populate a panel slowly at 9600. That you would want to bump up.

    Most devices, I consider 57600 to be the practical upper limit. 115200 seems to generate errors, especially with longer wire runs.
  • Chip MoodyChip Moody Posts: 727
    The only devices I currently change from factory defaults are NEC projectors. We had a run of projectors some time ago that were flaky at best at the default of 38.4. After some investigation, the consensus - from tech support folks, no less - was to set the projectors to 9600. Ever since then, that's been SOP. Not taking any chances that NEC cleaned up their projector com ports since then or not, y'know? Why not just be safe...

    - Chip
  • Thread Wrap-Up

    OK, I think I get the gist:

    1. Leave baud rates at factory defaults, unless you have a REALLY good reason not to.

    2. If you do change it, your documentation had better be good. Really good.

    Simple enough?

    Thanks for the input everyone!
  • NX-2200 default baud rate is 9600?

  • John NagyJohn Nagy Posts: 1,734

    Read the docs... really, an NX has no "default baud rate"... You need to specify the rate you want to use to talk to external devices. Which do have default speeds per their manufacturers. Which are stated in their documentation.

    The only "default baud rate" in an NX/NI might be in the terminal support, 38400 per the view in NetLinx Studio. But that's not i/o...

  • CarlosRoninCarlosRonin Posts: 8
    edited September 2019

    Thank's for replay @John Nagy
    Sorry my ignorance. I'm noob on AMX,

    I want to set the AMX baud rate on a rs-232 port on an NX-2200. Would the correct code be this?

    DEFINE_DEVICE

    dvIPServer1 = 0:1:0 (AMX)

    DEFINE_EVENT

    data_event[dvIPServer1]
    {
    online:
    {
    send_command 5001:1:0,'SET BAUD 9600,N,8,1'
    send_command 5001:2:0,'SET BAUD 9600,N,8,1'
    }
    }

  • richardhermanrichardherman Posts: 387
    edited September 2019

    Please don't double post. Most of us browse 'Recent discussions' , not separate categories.
    One of your post will likely stay unanswered or the answers will be spread among your two posts. That won't be helpful.

    Just as an advice :)

    I answered your other post, BTW.

    EDIT: Mhh, now saw you posted the same thing 3 times. So it's in one of the other threads. Again, please don't do that ...

  • Sorry @richardherman. And thank you! You saved my life!

Sign In or Register to comment.