Reading Serial data through Simulink Input Packet is work in RealTime?
显示 更早的评论
I'm using [Packet Input], [Packet output] Block in RealTime Window Target toolbox
tested both serial port, and UDP, with my Embedded board every 0.02 sec, I want to read new data from my board, and update state, but [Packet output]block missed alot of packet , and kill my labtop at last with blue screen
i guess that i need some script or funtion in init funtion which manage com port buffer or UDP buffer.
here is my environment what am I doing wrong?
matlab 2009b period 20ms packet size 36 bytes 1. C# UDP UDP = simulink through local network 2. Embedded board usb2uart = simulink
//----------------------------------------------------------------------// // Real TImw Windw Target descripstion //----------------------------------------------------------------------//
Real-time closed-loop execution of Simulink models on Microsoft Windows ▪ Signal visualization and parameter tuning while model is running ▪ Execution control directly from Simulink, creating a PC-in-the-loop prototyping environment ▪ Real-time performance approaching 500 Hz in normal execution mode ▪ Real-time performance approaching 20 kHz in external execution mode (with Simulink Coder) ▪ Blocks supporting more than 250 I/O modules (including analog I/O, digital I/O, counters, encoders, and frequency output) and communication protocols (including UDP, serial, and CAN)
1 个评论
Jan Houska
2013-3-11
I'm not aware of any such bug. 20ms of sampling period should work fine. Are you able to try a newer version of the software to see if you are getting the same problems?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 System Configuration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!