LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulated Device Aliases should behave like other device Aliases

BUG submission:

 

Here is a nasty little problem: do the following:

  1. Replace a USB device neatly:
    1. Assign an Alias to a USB Device  For simplicity use an NI USB 6008 "MFD1"
    2. Remove the device from the system
    3. Plug in a new NI USB 6008
    4. Run the code here with "Device to rename" = MFD1

require no further action.  This is desirable behavior!  user's are happy (And if I went to nirvana and wrote the Devmon hook linked from the abResult: Old 6008 becomes "Dev1" New 6008 is MFD1 and existing applications calling resources for "MFD1" ove the swap happened at PnP device discovery)

 

Similar techniques can be used for a system where one developer delivered a solution using a DMM as "Dev1" and your app call's it "DMM1"  Yup, Application specific hardware configuration has a lot of potential!

Contrast that with this:

 

  1. Replace a Simulated USB device:
    1. Assign an Alias to a Simulated USB Device  For simplicity use an NI USB 6008 "MFD1"
    2. Plug in a new NI USB 6008
    3. Run the code here with "Device to rename" = MFD1
    4. Ignore the runtime error

Result: Simulated 6008 remains "MFG1" New 6008 is "Dev1" and existing applications calling resources for "MFD1" are broken pointing to the simulated device.Smiley Frustrated

 

Simillar problems ocurr when importing a *.nce file (No surprise since, the system configuration API lets LabVIEW act on system configuration methods and properties just the way MAX does)

 

This bug can be a showstopper for high mix test enviornments with staged test releases.


"Should be" isn't "Is" -Jay
0 Kudos
Message 1 of 3
(2,266 Views)
An alias for a usb device is probably intimately linked to the device serial number. If the devices have valid serial numbers (usb spec says its optional) then what you want wont work because windows will only ever recognise that device with pid vid and serial number exactly matching as being the same device.
0 Kudos
Message 2 of 3
(2,258 Views)

@Intaris wrote:
An alias for a usb device is probably intimately linked to the device serial number. If the devices have valid serial numbers (usb spec says its optional) then what you want wont work because windows will only ever recognise that device with pid vid and serial number exactly matching as being the same device.

Which is why I intercept the connection event and configure NI Device monitor to launch the custom exe to re-name the alias via the system configuration API for USB DAQmx devices (and launch a config import from file in a system rollcall sequence for system hardware that doesn't use the DAQmx expert)

 

With an alias I could care less about how the OS identifies the resource- its what they exist forSmiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(2,249 Views)