LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access an instance of an object through activex

Solved!
Go to solution

I'm attempting to retrieve real time data from a FSA pressure mapping system and am using LabVIEW's activex tools to connect.  I have interfaced with the hardware (can retrieve serials and such), but haven't been able to read any of the actual data.  The programmers from the company use Javascript for their programs and know nothing about LabVIEW.  Below is the info I have gotten from them so far.  I'm trying to read an instance of an object through it's activex reference.  I have been able to pull out Readings, but am stuck trying to read an individual Reading.  Thanks

The InterfaceModule.Read method returns a Frame object.  The Frame 
object contains a collection of one or more readings (Frame.Readings). 
There is one reading for each sensor array connected to the IM.  If 
they're using just one mat then the Reading will be in 
Frame.Readings(0).  A sensor's pressure value is contained in the 
reading's Value property (Reading.Value(column, row)).

So to take a reading and retrieve the pressure reading for sensor A1 
(column = 0, row = 0):
...
frame = im.Read();
pressureA1 = frame.Readings(0).Value(0, 0);

0 Kudos
Message 1 of 4
(2,770 Views)
Solution
Accepted by topic author Jarad

Hard to say without actually having the ActiveX library, but there's probably an "Item" method that will allow you to access a specific element from the collection. For example, with the Excel ActiveX library you can get to a specific sheet from a workbook's Sheets collection using the Item method, as shown in attached picture. Note that you may need to cast the returned object to the appropriate type, depending on what's returned. For the Excel library the "Item" method returns a variant.

0 Kudos
Message 2 of 4
(2,764 Views)

Thanks for the tip.  After figuring out the variant data type it worked and started to output data.  Again thanks for the help.

0 Kudos
Message 3 of 4
(2,755 Views)

Hi Jarad:
Can you show how you got this working?  Just need a start...

Thanks

Rick

 

0 Kudos
Message 4 of 4
(2,560 Views)