필터 지우기
필터 지우기

Try to access time-stamped Data from an HostScope with Microsoft .Net Framework functions using VB

조회 수: 1 (최근 30일)
Hey everybody,
I'm working on a GUI to access an application running on a xpc-target pc. I'm using VS2010 and I'm programming in VB. For the implementaion of signal monitoring I'm using Hostscope objects and ScopeSignal objects with Microsoft .Net Framework functions.
At the moment I'm able to recieve the logged Data for any signal I've added to the Scope, but only the Data and no Time. I get an Array of the zerobased rank 1, but I'm only able to read-out an Array of rank 0.
Example:
Private real_sig As MathWorks.xPCTarget.FrameWork.xPCHostScopeSignal
Private hscope As MathWorks.xPCTarget.FrameWork.xPCHostScope
Private hscope_sig As MathWorks.xPCTarget.FrameWork.xPCHostScopeSignalCollection
hscope_sig = hscope.Signals
real_sig = hscope_sig.Add(aout_real)
Dim l As Integer = (hscope.NumSamples - 1)
Dim Daten_real(l) As Double
Daten_real = real_sig.HostScopeSignalDataObject.GetData
I'm pretty sure you also can get the Time of a scope object, at least it is possible with C Api, Com Api and MATLAB.
Does anyone of you know how to get the Time to the Data of an HostScope object?
thanks for your answers
Svenja

채택된 답변

Shiva Arun Kumar
Shiva Arun Kumar 2012년 2월 7일
Hi Svenja,
You can get the Time Data using the DataTimeObject of the xPCHostScope class. For example (C# code):
xPCHostScopeCollection hscopes = tgscopes.HostScopes;
xPCHostScope hscope = hscopes[3];
xPCDataHostScSignalObject dHostObj = hscope.DataTimeObject;
double[] timeinfo = dHostObj.GetData();
Hope that helps,
Shiva

추가 답변 (1개)

Svenja
Svenja 2012년 2월 7일
Hey Shiva,
thanks a lot, this way it works.
Svenja

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by