Communication port [设置串口号]
Specify the serial port that you will use to receive from. You have to select an available port from the list. By default, the Communication port field contains the text Please select a port… and you must change this to a valid port. If you have not configured a port, the block will prompt you to do so. You can select a port from the available ports and then configure the port using the Serial Configuration block. Each Serial Receive block must have a configured serial port. If you use multiple ports in your simulation, you must configure each port separately
Specify data that marks the beginning of your data block. The header indicates the beginning of a new data block and the simulation will disregard data that occurs before the header. The header data is not sent to the output port. Only data that occurs between the header and the terminator is sent to the output port. By default none or no header is specified.
Specify data that marks the end of your data block. The terminator indicates the end of the data block and the simulation will account for any data that occurs after the terminator as a new data block. The terminator data is not sent to the output port. Only data that occurs between the header and the terminator is sent to the output port. By default or no terminator is specified. Other available terminator formats are:
CR (‘\r’) — Carriage return
LF (‘\n’) — Line feed
Specify the output data size, or the number of values that should be read at every simulation time step. The default size is [1 1].
Data type [解析数据类型设置]
Specify the output data type to receive from the block. You can select from the following values:
Byte order [数据大小端设置]
When you specify a data type other than int8 or uint8, you can specify the byte order of the device for the binary data. Your options are BigEndian or LittleEndian.
Enable blocking mode [是否打开阻塞模式，没有来数据，阻塞]
Specify if you want to block the simulation while receiving data. This option is selected by default. Clear this check box if you do not want the read operation to block the simulation.
If you enable blocking mode, the model will block the simulation while it is waiting for the requested data to be available. When you do not enable blocking mode, the simulation runs continuously. The block has two output ports, Status and Data. The Data port contains the requested set of data at each time step. The Status port contains 0 or 1 based on whether it received new data at the given time step.
Action when data is unavailable [阻塞时，数据的输出情况]
Specify the action the block should take when data is unavailable. Available options are:
Output last received value — Block will return the value it received at the preceding time step when it does not receive data at current time step. This value is selected by default.
Output custom value — Block will return any user–defined value when it does not receive current data. You can define the custom value in the Custom value field.
Error — Block will return an error when it does not receive current data. This option is unavailable if you do not select blocking mode.
Specify a custom value for the block to output when it does not receive current data. The default value is 0. The custom value can be scalar or value equal to the size of Data that it receives (specified by Data size field).
Block sample time
Specify the sample time of the block during the simulation. This is the rate at which the block is executed during simulation. The default value is 1 second.