필터 지우기
필터 지우기

Online data display and aquisition

조회 수: 1 (최근 30일)
Stefan
Stefan 2014년 7월 1일
답변: Rajiv Ghosh-Roy 2014년 7월 2일
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

답변 (1개)

Rajiv Ghosh-Roy
Rajiv Ghosh-Roy 2014년 7월 2일
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.

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by