How to remove time gaps between subsequent 'readwrite'?
Show older comments
I would like to generate signals for two channels. These signals should be alternatives. That is, if one signal is on, the another should be off.
To do it, I made the below code.
addoutput(dq, "dev1", 1:2, "voltage")
data = readwrite(dq, scandata1, 'OutputFormat', 'Matrix');
removechannel(dq, 3)
addoutput(dq, "dev1", "ao1", "voltage")
data1 = readwrite(dq, scandata2, 'OutputFormat', 'Matrix');
But, the problem was a time gap due to 'removechannel' and another 'addoutput'.
Could you give some advice on it?
4 Comments
Walter Roberson
on 2 Sep 2020
Is it necessary that the voltage be free-floating during the time of no signal, or could you instead drive it to a particular value (say 0) ? So emit (say) 0 on the channel not in use (and discard any data), and emit appropriate data on the channel that is in use ?
Siwoo Jeong
on 2 Sep 2020
Walter Roberson
on 2 Sep 2020
In the force case, force 0 should work instead of having it free-floating, except in the case where the accutator can detect free-floating.
The length case is less clear to me.
Siwoo Jeong
on 2 Sep 2020
Answers (0)
Categories
Find more on Periodic Waveform Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!