1
votes

The Instrument Control Toolbox in MATLAB/Simulink contains two blocks that can send data to a device on a serial port:

It looks like the To Instrument block is more general-purpose than Serial Send. To Instrument allows you to select the underlying interface, with one option being "Serial".

What is the difference between To Instrument (when configured with Interface=Serial) and Serial Send? Is there any reason to prefer either one for sending, say, 4 bytes of numeric data to the device? Are there any other situations where only one of them would work?

1

1 Answers

3
votes

One difference:

The "To Instrument" and "Query Instrument" blocks are older blocks and were hardcoded to only be used for ports COM1-COM4. For a device that's on a different serial port, please try the "Serial Send" and "Serial Receive" blocks to achieve the same functionality. The block parameters dialog for these blocks should auto-populate the list of available COM ports to communicate with so that you can select the proper port for your device.