Using some lesser known tricks, you can begin acquiring data as soon as you PC boots up. No shortcuts to click on, no buttons to push, just power up your PC and you’re off and running!
In order to begin acquisition on boot up, you’ll need to create a command line, paste the command line into a batch file, and use the Scheduled Tasks utility in Windows to launch the batch file. The command line defines the file path of the WinDaq executable, the name and location of the file into which data will be stored, in addition to the name and location of a setup file. The setup (reference) file, created using WinDaq, is a file from which parameters such as the number of channels to record, sample rate and scaling are ported to the newly created file. If a setup file isn’t specified, the default setup is used.
DI-14x, 155 and 71x-USB Series Instruments
The command line structure for DI-14x, 155 and 71x-USB series instruments looks like this:
START /D[d:path]yyyyyyyy [d:path]di100ant.exe -Ddi1xxnt.dll [d:path]targetfilename [record time] [-F[d:path]setupfile] [-A]
Where xx is the COM port number that the unit was installed on, and yyyyyyyy is a folder in the directory where WinDaq was installed, named for the serial number of the data acquisition device.
START /D[d:path]yyyyyyyy specifies the starting director (or subdirectory) where the instruments default settings are stored (in a file called codaspar.bin).
[d:path] is the drive and directory where the WinDaq executable resides (di100ant.exe in this case).
[d:path]targetfilename is the name of the data file (including the drive and path) to which WinDaq Acquisition is to store data.
[record time] is the period of time that you would like WinDaq to record (hh:mm:ss).
[-F[d:path]setupfile] is an data file (including drive and path) from which parameters such as the number of channels, sample rate and scaling are ported.
[-A] is the switch that forces WinDaq to start acquiring data to disk on start-up.
You’ll need to check the Windows Device Manager under ‘Ports’ (COM & LPT)’, or run the DATAQ Instruments Hardware Manager to determine the COM port number.
In this example, presume we have a DI-710-U, installed on COM 8. Here’s the command line:
START /DC:\WINDAQ\47FBA0F7 C:\WINDAQ \DI100ANT.EXE -Ddi108nt.dll C:\test\target.WDQ 00:01:00 -FC:\test\setup.WDQ -A
DI-71x-Ethernet Series Instruments
While the command line structure for DI-71x-Ethernet units is similar; the DLLs are different, and you’ll need to specify the IP address of the unit after the DLL.
In the case of a DI-710 Ethernet device, you would use the di640nt.dll (there is no port to specify). Consequently, the command line would look like this:
START /D[d:path]yyyyyyyy [d:path]di100ant.exe -Ddi640nt.dll -Nxxx.xxx.xxx.xxx [d:path]targetfilename [record time] [-F[d:path]setupfile] [-A]
DI-718B series instrument (including the DI-718Bx) use di670nt.dll, so the command line would look like this:
START /D[d:path]yyyyyyyy [d:path]di100ant.exe -Ddi670nt.dll -Nxxx.xxx.xxx.xxx [d:path]targetfilename [record time] [-F[d:path]setupfile] [-A]
Where xxx.xxx.xxx.xxx is the IP address
DI-720/730 Series Instruments
The command line for DI-720/730 series instruments differs in a few ways, as well. First, the WinDaq executable is called di200ant.exe (instead of di100ant.exe). Second, the file containing the instruments default setup (codaspar.bin) is located in the root directory (where WinDaq was installed); therefore there’s no need to specify a START directory. In addition, DI-720/730 series instruments use di720nt.dll.
The command line for DI-720/730 series USB instruments looks like this:
[d:path]di200ant.exe -Ddi720nt.dll [d:path]targetfilename [record time] [-F[d:path]setupfile] [-A]
With DI-720/730 Ethernet instruments, you’ll need to include the START command once again, as the default setup (codaspar.bin) is kept in a subdirectory named for the MAC address of the instrument (printed on the bottom of the unit). Ethernet DI-720/730 instruments use di800nt.dll, and you must specify the IP address:
START /D[d:path]yyyyyyyyyyyy [d:path]di200ant.exe -Ddi800nt.dll –Nxxx.xxx.xxx.xxx [d:path]targetfilename [record time] [-F[d:path]setupfile] [-A]
Where yyyyyyyyyyyy is the 12 character alphanumeric MAC address and xxx.xxx.xxx.xxx is the IP address.
Creating the Batch File
Once you’ve created the appropriate command line, paste it into a batch file.
While there are methods for creating a batch file, we’ve simply created a text (.txt) file, and changed the file extension to .bat.
Schedule the Task
With the batch file created, simply schedule the batch file to run at system startup (or when you log on).
Please note that any time you see a “-“ (-D, -A, etc.), it’s a dash, not a minus sign.
We are excited to get our system logging on PC startup, but are having trouble with the sampling rate. For some reason, when Windaq launches from the .bat file, it cannot handle the sample rate in our setup file at [-F[d:path]setupfile].
We are able to log data at our preferred sample rate if starting WIndaq manually. I have enabled more channels (all eight) and decreased our Max rate to 25. The overall minimum sample rate per channel is 0.004. We want to collect at 0.017. The system (with 8 ch enabled) forces a minimum rate of 0.038.
Any ideas what’s causing this? Any workarounds? Can I write the sample rate into the .bat somehow?