Online data display and aquisition
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear Mathworks-Team,
we want to monitor xPC on-line data with our own GUI and plot() function. We gather chunks of data (a vector of 50 doubles) with the SigIn-Block and try to read them out (at the moment we access the "Out" block.
The Matlab-Code does the following:
ids='Piezosteuerung/SigIxi/Out'
id = getsignalid(tg, ids)
variable = tg.getsignal(id)
What happens now is that we do not get the entire vector, but only the first element. So we made some construction like
for (i = 1:bufsize)
variable(i) = tg.getsignal(i+id)
end
It works, however, but I cannot imagine that this is the way to solve the problem. How can we get a vector with the last bufsize elements into Matlab to display them?
Thanks for your help,
Stefan
0 Kommentare
Antworten (1)
Rajiv Ghosh-Roy
am 2 Jul. 2014
If you are looking to get time histories of data, you will need to use a host scope block. This can store a buffer of data. When the buffer is full, you can upload the buffer and then restart the scope.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Target Computer Setup finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!