Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
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

Respuesta aceptada

Shiva Arun Kumar
Shiva Arun Kumar el 7 de Feb. de 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

Más respuestas (1)

Svenja
Svenja el 7 de Feb. de 2012
Hey Shiva,
thanks a lot, this way it works.
Svenja

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by