LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vb6 activex control not working in labview 8.5

Solved!
Go to solution

I'm currently trying to get off of VB6 and into Laview for some automated test applications for secondary (rechargable) battery packs.

 

We use Texas Instruments fuel gauges at my company, and communication with them requires an EV2300 USB box.  I have the drivers installed for the box, and it works without issue in VB6.  I need to get Labview to talk to the box the same way.

 

I'm using 8.5 for the time being, and I thought I had the right idea going for using the BQ80xRW.dll file that's already installed on my machines for the VB6 application.  The only problem is I don't have the source code for the DLL, only the dll and ocx files in my win32 directory.  Here's what I did:

 

1) Import activeX control to palette (bq80xRW.dll)

2) Place the bq80xRW activex control onto my VI

3) Place invoke nodes for the functions I want to test (GetFreeBoards --> OpenDevice --> ReadSMBWord)

4) Wire up the nodes with appropriate controls (integers, strings, etc)

5) Run the VI

 

I've included the VI that I developed with this post.  Nword should, I believe, be set to 16 while Cmd needs to be set to 1C (to read the serial number of the part)

 

When I run the program while the USB module is connected, the GetFreeBoards node returns the following string:

 

\\?\usb#vid_0451&pid_0035#5&1c93b2c6&0&2#{8eb0fa22-a67c-4a27-9913-df9ab307d886},

 

If I run the program without the USB module attached, the string is empty.  No spaces, or characters at all.

 

So the activeX control is doing something.  It's just not doing what I want it to.  And since I don't have the source code for the dll, I don't know why.

--

Ro ma wa ichi ni chi ni shi te na ra zu
0 Kudos
Message 1 of 3
(3,073 Views)

Anyone? Anyone? Bueller?

--

Ro ma wa ichi ni chi ni shi te na ra zu
0 Kudos
Message 2 of 3
(3,055 Views)
Solution
Accepted by topic author gdecker

That big long string that starts with \\?\usb is the name of the board.  Get rid of the trailing comma and pass that as your board name into opendevice().

0 Kudos
Message 3 of 3
(3,046 Views)