Home AMX User Forum NetLinx Studio
Options

Command for baud rate

Hi guys

Sorry if my question seem stupid but I need to know

If when I set baud rate for a device, if I have to do it only one time in my prgm or I have to set before each command

Denis

Comments

  • Options
    Joe HebertJoe Hebert Posts: 2,159
    Hi Denis,

    Just set it in the ONLINE event for the device and you'll be good to go.
  • Options
    Here is an example for a NEC MT-1075

    DATA_EVENT [PROJ]
    {
    ONLINE:
    {
    SEND_COMMAND PROJ , "'SET BAUD 9600,N,8,1'"
    }
    }
  • Options
    DenisDenis Posts: 163
    Tanks

    Tanks guys!

    It's very appreciate.
  • Options
    Its a good habit to set the baud rate using an ONLINE event, for in the event that you need to swap or upgrade masters at some point in the future you won't have to dig around for the correct baud rate for each of your devices... it happens automagically.
  • Options
    is this the correct way to set an even parity?

    SEND_COMMAND DATA.DEVICE, 'SET BAUD 38400,EVEN,8,1 135 DISABLE'
  • Options
    Joe HebertJoe Hebert Posts: 2,159
    Jarrette wrote:
    is this the correct way to set an even parity?
    SEND_COMMAND DATA.DEVICE, 'SET BAUD 38400,EVEN,8,1 135 DISABLE'
    Nope, not according to Software History. Try this:
    SEND_COMMAND DATA.DEVICE, 'SET BAUD 38400,E,8,1 485 DISABLE'
  • Options
    as far as i know using any SET command makes a setting permanent. so in a way it only has to be done once, as it's written to the processor memory.

    so, like veraview says, if the controller gets swapped/zapped, you would need to ensure the SET commands are run again. which is fine, that's what we are doing with these ONLINE examples.

    the point i'm getting to is to use TSET instead of SET. T is temporary i suppose. do this for any online event, or whenever. and use it often.

    because apparently TSET doesn't write to memory, which can only be done so many x thousand times with SET. not sure on x, someone might know.

    so TSET is valid, but doesn't remain permanent. which is okay cos the program should setup the ports when it boots.

    i've replaced all SETs with TSETs in my programs.
Sign In or Register to comment.