Command for baud rate
Denis
Posts: 163
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
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
0
Comments
Just set it in the ONLINE event for the device and you'll be good to go.
DATA_EVENT [PROJ]
{
ONLINE:
{
SEND_COMMAND PROJ , "'SET BAUD 9600,N,8,1'"
}
}
Tanks guys!
It's very appreciate.
SEND_COMMAND DATA.DEVICE, 'SET BAUD 38400,EVEN,8,1 135 DISABLE'
SEND_COMMAND DATA.DEVICE, 'SET BAUD 38400,E,8,1 485 DISABLE'
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.