LabVIEW Real-Time Idea Exchange

About LabVIEW Real-Time Idea Exchange

Have a LabVIEW Real-Time Idea?

  1. Does your idea apply to LabVIEW in general? Get the best feedback by posting it on the original LabVIEW Idea Exchange.
  2. Browse by label or search in the LabVIEW Real-Time Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  3. If your idea has not been submitted click New Idea to submit a product idea to the LabVIEW Real-Time Idea Exchange. Be sure to submit a separate post for each idea.
  4. Watch as the community gives your idea kudos and adds their input.
  5. As NI R&D considers the idea, they will change the idea status.
  6. Give kudos to other ideas that you would like to see in a future version of LabVIEW Real-Time!
Top Authors
Showing results for 
Search instead for 
Did you mean: 

"USB mount" programatic event on RT

Status: New

It would be nice if attaching a thumbdrive to a cRIO / RT usb port triggered a "mounted" event or interrupt in the RT OS. Currently the only way to discover if a thumbdrive has been connected is to periodically run a file/folder info VI and see if one is present. It would be nicer if we could register a dynamic event and wait for it using an event structure, or similarily register for an interrupt event would work as well.


In my case, the use-scenario is a field maintenance person going out and manually plugging in a thumb-drive about once every 4 weeks to get the stored log files off of the controller. (No, we cannot use remote access in this case due to customer network restrictions.) So, in my case, I can easily use the polling solution, but if there is one thing I don't like to do, its to write polling code of any sort. It seems so wasteful. Other possible use cases could be to detect the presence of a thumb-drive and check for patch/updates, copy over new configuration files, etc.

CLD LabVIEW 7.1 to 2016
Active Participant

Because of the way USB works (*), if we did provide this type of event, the implementation internally would still be a polling loop, it would just be one that we write instead of one that you write.  Depending on the reason for your preference to avoid polling code, this might not be an improvement and could even be worse, since it would be hard for us to know when you want to poll and when you don't care.


As a side note, in real-time software, polling usually gives better determinism than interrupts (because you can schedule your polling to happen at a convenient time for your RT application, as opposed to relying on an interrupt which may arrive in the middle of a time critical operation), at the cost of higher CPU usage (the "wasteful" aspect you noted).  Be sure to consider this tradeoff before dismissing the "wasteful" polling option.


(*) See for example -- "with all transfers over USB the host must initiate the interrupt transfer."

Active Participant

Scot, I see your point. I was thinking that the enumeration event on the USB controller on the host could somehow be accessed as an event/interrupt. Is enumeration of new devices on the bus also handled by the OS/system polling then? If thats the case, this idea can just be killed as at that point I agree with you,  better I do my own polling when and if I need than have NI do polling in the background for me out of my control.


Thanks for the link and your comment! 

CLD LabVIEW 7.1 to 2016