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
0 个评论
采纳的回答
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
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!