Error "The board 'Standard Devices Serial Port' has no Analog Input channels." occurs when I run a Desktop Real Time model in kernel mode

46 次查看(过去 30 天)
I want to obtain data using Analog Input block (Simulink Desktop Real-Time library) from self made data acqusition device though serial port. But everytime I run the model, error "The board 'Standard Devices Serial Port' has no Analog Input channels." occurs. Even as the test of the serial port has passed. The same question appears when I use the Analog Output Black with the same configuration. The configuration of the Analog Input block is shown below.
what should I do to connect my self made data acqusition device with the Simulink Desktop Real-Time?

回答(1 个)

Dhruv
Dhruv 2024-7-17,11:24
Hi Haotian,
To connect your self-made data acquisition device with Simulink Desktop Real-Time, I would recommend you to use the "Stream Input" block from the Simulink Desktop Real-Time library. This block allows you to configure your serial connection and acquire data from your device. You can set it up by selecting "Install new board > Standard Devices > Serial Port" from the block's mask. For detailed options, refer to the following documentation for details:
If your serial data follows a specific communication protocol, use the "Packet Input" block to separate individual data packets based on the header. This simplifies parsing and post-processing. Refer to the below “Packet Input” documentation for further details:
You can also use a MATLAB Function block for additional parsing or data manipulation as needed.
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Real-Time Simulation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by