Analog Input/Output Single Sample blocks in Simulink
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am new with data acquisition anf I ned help to understand the difference between the Analog Input/Output blocks and Analog Input/Output (Single sample) blocks in Simulink.
I use a NI myDAQ device for data acquistion and use the blocks with equivalent configurations, i.e Sample time = 1/ sample rate and I choose Synchronous acquisition mode for the Analog Input block. I expected to obtain same results but I do not. What is the difference between the two blocks, i.e. with and without Single Sample?
0 Kommentare
Akzeptierte Antwort
Aabha
am 14 Feb. 2025
There is a difference in the way in which the "Analog Input" and the "Analog Input (Single Sample)" blocks acquire and process data from the hardware device, which might lead to some discrepancies in their results, even while using the same sample rate.
The “Analog Input” block waits for a data sample to be available at each time step, in the synchronous mode. However, the “Analog Input (Single Sample)” block reads only one sample per execution cycle, which is directly queried from the hardware without relying on buffering. If the hardware has minor timing variations or jitters, it might not match exactly with the readings from the “Analog Input” block.
Since the “Analog Input (Single Sample)” block directly samples data from the device at each step, without accounting for buffering, it may introduce some timing deviations as compared to the ”Analog Input” block. These variations can become more noticeable at higher data acquisition rates or in cases where the device itself has internal processing delays.
You can refer to the following documentation of the blocks for more details:
I hope this is helpful to you.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Acquisition Toolbox Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!