Wait Until Ready

Several users have reported problems with programs that are configured to start immediately on boot-up and which use National Instruments data acquisition devices. If the program starts too quickly, the operating system may not have finished initializing the drivers and devices. In such a case, it may be necessary to unplug or reboot before the device becomes functional. A typical solution to this issue is to add a delay in the boot process so as to ensure that the drivers are initialized properly before the program starts. However, this delay is inherently inefficient, since it must be made longer than the longest observed necessary time in order to ensure that it works.

The Wait Until Ready program is a more elegant solution to this problem. Installation of this program will put a shortcut to this program in the startup folder, so that it runs automatically on boot-up. Configuration parameters then define how the program will operate. After the program has determined that the NI devices are ready to be used, it will then launch the desired user's program.

The configuration parameters are stored in the file "Wait Until Ready.ini" which is located in the same directory as the compiled program. (Note that this program can also be run from within the LabVIEW environment if the required startup shortcut is created properly and the .ini file is located in the same directory as the "Wait Until Ready.vi".)

The available parameters and their default values are:

Time Out (s) = 60
NI Devices 0 = 1
Program to Launch = ""
Launch on Timeout? = True

Time Out (s) = x determines the maximum amount of time in seconds that this program will wait for the NI hardware to become ready. If the hardware is not detected as ready after this time expires, the program will finish anyway. NI Devices n = x is a list that defines all the NI Devices that must be ready before this program finishes. Multiple NI Devices can be defined by adding additional parameters with n increasing sequentially. The value x is the Device Number as defined in MAX. Note that this program assumes that the Device names within MAX use the default naming convention of Devx. Program to Launch = "xxx" defines the user program that will be started after the Devices are found to be ready. Enclose the full path and program name in quotes, and use double-backslashes between directories. E.g. "C:\\Program Files\\My DAQ Program\\My DAQ Program.exe"

Launch on Timeout? = True/False determines how the program behaves if the Devices are not found to be ready within the specified time-out. If this is True, the Program to Launch will be started anyways. If this is False, the Program to Launch will not be started.

Please report any problems or suggestions to: support@originalcode.com.