- "mSec refers to the fractional data in seconds, not milliseconds". Does the data you showed mean time at 37.4, 37.5, 37.6 and 37.3 second?
- "I faced the problem of logging more than 60 times faster". How does the data you showed indicate it is 60 times faster?
- "This sensor operates at 10Hz and logs data every 0.1 seconds when logging through an external program." How does Simulink connect to or receive this sensor data? Might it be that the sensor measurement is executed in almost real-time like every 0.1 second, while your Simulink simulation is running much faster, like it runs 60 iterations within 0.1 second? You know Simulink simulation is not in real time. It could be faster or slower than real time. In most cases, it is faster.
to workspace block logging in real time?
2 views (last 30 days)
Show older comments
Hello
I made a block that logs actual sensor (GPS, IMU) data with Simulink using To workspace.
This sensor operates at 10Hz and logs data every 0.1 seconds when logging through an external program.
(Sensor data value logged by an external program, mSec refers to the fractional data in seconds, not milliseconds.)
To workspace block was used to record sensor data. Simulink settings were set to discrete time settings.
However, when looking at the recorded data through the To workspace block, it was confirmed that logging proceeded at least 60 times faster.
(The recorded data is UTC data of the GPS sensor, and the value corresponding to seconds has been logged more than 60 times.)
Since the sampling time of the To workspace block was set to 0.1s, I thought that I would log data every 10 Hz, which is the actual operation of the GPS sensor, but I faced the problem of logging more than 60 times faster.
I would like to know how to set the To workspace to record data every 10 Hz, which is the actual GPS operation Hz.
2 Comments
Fangjun Jiang
on 11 Aug 2020
Answers (1)
Fangjun Jiang
on 11 Aug 2020
In that case, you need this toolbox Simulink Desktop Real-Time. It can slows down your simulation to try to match real time.
0 Comments
See Also
Categories
Find more on Signal Logging in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!