Online data display and aquisition
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165094/image.png)
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 commentaires
Réponses (1)
Rajiv Ghosh-Roy
le 2 Juil 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 commentaires
Voir également
Catégories
En savoir plus sur Target Computer Setup dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!