From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I reset a USB drive in a VI?

Andrew,

 

Why not actually disconnect the device?  Have your test engineering people make a special USB cable with a relay which disconnects the power conductors when you need to do a reset.  Maybe disconnect all wires.  This should act like an unplug-plug cycle.  You could control the relay from LabVIEW of course.  Then you only rely on the OS to detect the reconnection, not to perform it.  You would probably need to experiment with the timing or look up the USB specification to determine how long to leave it disconnected.

 

I have not tried this, so I cannot say that it would definitely work. 

 

Lynn 

0 Kudos
Message 11 of 28
(4,063 Views)
I am working on a Labview program with 5 USB devices (NI and MCC). I thinking about utilizing a PCI-6520 for disconnect the +5 VDC on the USB cable (for each device). Someone tried something like this?

Jean-Marc
0 Kudos
Message 12 of 28
(4,009 Views)
Yesterday I done a fast test. I modified a USB cable (cut the +5VDC, weld a wire at each end and connect those wires to a electromechanical relay). I utilized the electromechanical relay that I have in hand (USB-ERB24 from MCC) to open/close the +5VDC. I tested a USB-6218 and a USB-TC (MCC) with the modified cable and it seems to work properly.

Jean-Marc
0 Kudos
Message 13 of 28
(3,961 Views)

Are you guys still around?

I'm trying to do the same, I want to reset the usb port.

Mlahar's vis have som evis missing and are password protected as somebody else also pointed out so if he can provide the complete set with password, we wpuld appreciate much.

Best Regards,

Ro

0 Kudos
Message 14 of 28
(3,576 Views)

@Malhar wrote:

Hi Andrew,                                                                                                                                                                                                                                                                                                                                                                                                                                        Find the attached content.. It is used to remove any hardware from your compuer.... I hope you'll enjoy lot..

Regards : 
Malhar


Your solution is good, but are you aware that redistributing the Microsoft tool "Devcon" is violating Micrisift's licensing terms?  It is forbidden to redistribute Devcon.

 

Why I don't know.  I would love to be aboe to simply pop devcon with every piece of USB software I use but it's actually not allowed.  You're supposed to download it from source every time you install...... which is stupid.

 

Shane.

0 Kudos
Message 15 of 28
(3,559 Views)

Shane, where did you find this terms about distributing DevCon? Could you provide the source?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 16 of 28
(2,623 Views)

Shane's material is at least 6 years old.  Call MS.  This is not a LabVIEW problem.  And, please don't hesitate to post your own threads.


"Should be" isn't "Is" -Jay
0 Kudos
Message 17 of 28
(2,611 Views)

Even if it is an old post it doesn't necessarily mean that he cannot reply to it 😉

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 18 of 28
(2,593 Views)

Yeah DevCon is probably the way to go.  I've had good success with flaky wireless cards that wouldn't stay connected, and disabling then reenabling them was helpful.  I posted that code here:

 

http://forums.ni.com/t5/LabVIEW/disable-wireless-card/m-p/3297564#M964373

 

But if you are looking to remove a device I think the code is probably something like this, however I got errors on trying to remove my CD/DVD drive so I might be doing something wrong.

 

Example_VI_BD.png

 

I also couldn't find anything definitive on the distribution licenses, but I'd still assume that there is a license somewhere, stating you aren't allowed to distribute it as a stand alone binary.

Message 19 of 28
(2,570 Views)

Hi 

The file you attach is pretty good. However, I cannot use becuase I do not have some blocks that are included. I cannot open block diagram. Would you provide the password? or a new file?

0 Kudos
Message 20 of 28
(2,514 Views)