-
Notifications
You must be signed in to change notification settings - Fork 6
The SPparams substructure
aortega255 edited this page Jul 22, 2020
·
2 revisions
Its fields are simply numeric or string variables that set the parameters for the serial communication. This substructure will be sent to the MATLAB serialport command by the GUI during the initialization of the device. MATLAB will use the fields of the structure to set the serial port parameters. Not all fields are specified for all the devices, in which case MATLAB will simply select the default value for that parameter. The script only specifies the following fields (depending on the device):
- byteorder: bigendian, etc
- DataBits: the size of the words in bits
- StopBits: the number of stop bits in the communication
- Parity
- FlowControl
- InputBufferSize: determines the size in bytes of the input buffer. This buffer collects the bits received by the instrument until they are read by the GUI. It needs to be selected large enough so it does not overflow if the GUI is reading data at a slower rate than the device is producing it, otherwise that will lead to data read errors.
- OutputBufferSize: determines the buffer size in bytes for writing operations
- BaudRate
- Timeout: how many seconds we want to allow the serial device to respond