LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-8451 Device Reference and Device Attached

Solved!
Go to solution

I have 2 PC test systems using NI USB-8451 for I2C communication.

One has Device Reference ...33B.. and the other has ..33D... , so I can't use fixed defaults.

Also, I may need to roll out a complied exe for others to use.

 

Issues:

1. It's not VISA.No open or close VISA.

2. Nothing in the compare pallete validates this Device Reference.

3. No USB Device attached validation (Are You There).

 

So far

1. A succesful simple I/O operation can verify "Are You There". I choose Dig I/O Read one bit.

2. #1 above also validates Device Reference.

Isn't there a slicker, faster way to do this? Doesn't Windows OS register USB stuff etc...?

 

TODO:

Get the USB-8451 Device Reference from MAX.

 

This link might be the fix, I will know tomorrow. I just did not expect a VISA VI to be helpful.

http://forums.ni.com/t5/LabVIEW/How-to-ask-the-I2C-device-alias-name-from-the-MAX/td-p/1231439/highl...

 

 

0 Kudos
Message 1 of 10
(5,466 Views)
So is there a question?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 10
(5,457 Views)

best practices?

0 Kudos
Message 3 of 10
(5,441 Views)
Best practices for what? I don't see any code and from your description haveno clear idea of what is going on and where you need guidance.

Clearly the system needs to be configurable -- but what system doesn't?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 10
(5,430 Views)

Finally I got back to it.

 

This FGV holds and refreshes the references. Checking for valid device reference and USB Device Attached.

If Device Reference input is EMPTY it will Auto default to USB0.

 

The 2nd file shows how to extract the device name.

Download All
0 Kudos
Message 5 of 10
(5,396 Views)

Look into the system configuration API.

 

A simple hardware filter by Device Type (NI USB 8451) and the "Is Present?" and Aliases properties should help a lot. 


"Should be" isn't "Is" -Jay
Message 6 of 10
(5,388 Views)
Solution
Accepted by topic author Pappion

Jeff

That looks good.

Thank-You

0 Kudos
Message 7 of 10
(5,383 Views)

USB0::0x3923::0x7166::00E3133D::RAW

 The NI MAX device string looked familar, like USB VID + PID + Handle? + Mode (Instrument or Raw).

 

So my simple USB0?* search could be tripped up by other VISA USB devices.

Vendor ID googled: 3923  National Instruments Corp.

So USB?::0x3923?* seach would trip up on other NI VISA USB devices.

 

0x7166 should be NI-8451 PID. What is 8452 PID? Is it different for OEM versions?

I don't have them to check it out. I don't want to exclude them either.

 

Oh well, instead of parsing a string  I can do this with VIs, loops, and property nodes.

 

 

 

0 Kudos
Message 8 of 10
(5,377 Views)

USB0::0x3923::0x7166::00E3133D::RAW

Parses to:

USB[controller? #]

VID  (Vendor ID)

PID (Product ID)

Serial#  

Mode (Instrument or Raw)

 

Serial # is best guess after moving Two USB-8451 around to Two PCs and using NI MAX.

NI Max can save an Alias that is tied to this serial number.

Important to know IF using more than one USB-8451.

 

Better ignored if using just one.

It makes setting up a new system easier. Especially for those off shore.

It makes swapping out USB-8451 easier. Ex. No blinking? Galvonic USB Isolator, USB cable, or 8451?

 

 

 

 

0 Kudos
Message 9 of 10
(5,348 Views)

Cleaned Up version attached after validation.

 

The FGV holds and refreshes the references.

Checking for valid device reference and USB Device Attached.

If Device Reference input is EMPTY the SubVI will Auto Find NI-845? with lowest serial #.

 

BTW: Saved as LV2012 for your convienance.

0 Kudos
Message 10 of 10
(5,343 Views)