xPC Target | ![]() ![]() |
RS-232 Setup
The Block Parameters dialog box for the RS-232 Setup block contains the following fields.
Port - From the list, choose COM1, COM2, COM3, or COM4.
Baudrate - From the list, choose 115200, 57600, 38400, 19200, 9600, 4800, 2400, 1200, 300, or 110.
Number of Databits - From the list, choose either 7, or 8.
Number of Stopbits - From the list, choose 1 or 2.
Parity - From the list, choose None, Odd, or Even.
Protocol - From the list, choose None, or XOnXOff.
Sendbuffer Size - Enter the size, in bytes, of the send buffer.
Receivebuffer Size - Enter the size, in bytes, of the receive buffer.
The Sendbuffer Size
and Receivebuffer Size must be large enough to hold at least the data to be sent or received during each model step. It is important to be aware that the buffers must be large enough to also store old data from a prior model step in the event that the entire data transmission was not completed during the prior step.
Initialization Structure - Enter the name of the structure containing the initialization messages and expected acknowledgements when the model is initialized. If you are not using initialization messages, enter two single quotes in this box. For information on creating this structure, see Creating RS-232 Message Structures for Synchronous Mode and Creating RS-232 Message Structures for Asynchronous Mode.
Termination Structure - Enter the name of the structure containing the termination messages expected acknowledgements when the model is terminated. If you are not using initialization messages, enter two single quotes in this box.
![]() | RS-232 Driver Blocks | RS-232 Send & Receive (Synchronous Mode) | ![]() |