Author Topic: setting baud rate  (Read 13102 times)

gillecaluim

  • Newbie
  • Posts: 13
  • I'm a llama!
    • View Profile
setting baud rate
« on: October 06, 2013, 05:39:06 PM »
how can I change the serial port settings. I connected to a F1616 with default settings of 38400 @ 8/1/n but sending a command string via FServer serial port setup SETBAUD 3,&HC4 returns ER*

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:setting baud rate
« Reply #1 on: October 06, 2013, 08:03:59 PM »
You can only change the serial port baud rate of the PLC by executing the SETBAUD command INSIDE the PLC program


E.g. use an input to trigger a custom function and inside the custom function you enter the SETBAUD command. Once the input is triggered and the function is run the baud rate will change.

SETBAUD command is NOT to be entered from the TLServer (I assume that is what you mean although you said "Fserver" in your quesiton). If after the PLC executed the SETBAUD command and you want to use TLServer to talk to the PLC using the new baud rate, then you need to change the baud rate, data bit, stop bit etc on the TLServer serial port setup.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

gillecaluim

  • Newbie
  • Posts: 13
  • I'm a llama!
    • View Profile
Re:setting baud rate
« Reply #2 on: October 07, 2013, 07:51:46 AM »
I'm new to programming the plc...do I have to trigger this or can I put it as an initialization sequence when the plc powers up?
Is there a way to automatically run an initialization sequence when the plc powers up, the default baudrate, etc won't work with the other equipment daisy chained on the modbus
« Last Edit: October 07, 2013, 10:15:50 AM by gillecaluim »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:setting baud rate
« Reply #3 on: October 07, 2013, 04:20:37 PM »
Yes, you can use the 1st.Scan bit  (under the Special Bit table) to automatically run a custom function once during the initialization.

Note that if you use 1st.Scan bit the COMM port settings will be changed every time the PLC is powered up. If you forget the COMM port settings you will not be able to use TLServer to talk to the COMM port.  You can override this behavior by turning on DIP switch #4 and power cycle the PLC. This will put the PLC in PAUSE mode immediately upon power on so that the default settings will again be in effect.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS