Application Note AN-D2-002
Under normal conditions, all the communication port parameters are configured using the AUX functions of the handheld programmer or with the Secondary Port Setup in DirectSoft32 V4.0. Some customers have the port configuration done by the ladder code. By configuring it in ladder, you will know that the port is configured correctly anytime the PLC is placed into RUN mode.
For K Sequence, DirectNet, and Modbus RTU protocols, all the PLCs have
the same type of configuration, but the V memory locations are a little
different between families.
To see an example of how this is done with a 450 CPU, please see the ladder example.