xPC Target | ![]() ![]() |
RS-232 Send & Receive (Synchronous Mode)
The Block Parameters dialog box for the Synchronous Send & Receive block contains the following fields.
Port - From the list, choose COM1, COM2, COM3, or COM4. This list allows you to define which COM port is used to send and receive the data. The model must contain one Setup block for the same COM port used to send and receive data otherwise an error message is displayed. Note that data is sent and received on the same COM port.
Message Structure Name - Enter the name of the structure this block uses to send and receive messages and data. For information to create this structure, see Creating RS-232 Message Structures for Synchronous Mode.
Sample Time - This entry allows you to define the sample time (update rate) of the block. Since the block waits for data to be received from the external device before the block is finished executing, small sample times are not suitable with Synchronous Mode. You must allow sufficient time for both the RS232 Send and the RS232 Receive operations to be completed. The smallest sample time depends on the following.
![]() | RS-232 Setup | RS232 Send Block (Asynchronous Mode) | ![]() |