Try to access time-stamped Data from an HostScope with Microsoft .Net Framework functions using VB
1 view (last 30 days)
Show older comments
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
0 Comments
Accepted Answer
Shiva Arun Kumar
on 7 Feb 2012
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
0 Comments
More Answers (1)
See Also
Categories
Find more on Ordinary Differential Equations 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!