NidaqTools: DAQmx_Scan with Subfolders

Hi,

I tried to use the command DAQmx_Scan/DEV="NI9239" WAVES="Wave1,0,-5,5;" with a wave "Wave1" which is created in a subfolder of root.
Everytime I get the error message that there is no wave. If the wave "Wave1" is created in the root folder everything is fine.

Do you know how to tell DAQmx_Scan that the wave is in a different folder?

Small Example:

this works:

Function test()
        Wave Wave1
    DAQmx_Scan/DEV="NI9239" WAVES="Wave1,0,-5,5;"
    MatrixOP/O avgW1 = mean(Wave1)
    return avgW1
End


this not:

Function test()
       DFREF dfr1 = GetDataAcqTRMokeScansDFREF()   
    Wave/SDFR = dfr1 Wave1
   
    DAQmx_Scan/DEV="NI9239" WAVES="Wave1,0,-5,5;"
    MatrixOP/O avgW1 = mean(Wave1)
    return avgW1
End



Thanks a lot.
Since the DAQmx_Scan WAVES keyword takes a string parameter, it does not know anything about any local variables, including wave references.

Since the documentation for the WAVES keyword says that it takes a "wavename" as a parameter, I suspect that it does not support a path to a wave. Thus, you have to set the current directory before calling DAQmx_Scan. You can restore it after. The help for GetDataFolderDFR shows how to save and restore the current data folder.
The WAVES keyword knows how to parse a wave name with data folder path. So use GetWavesDataFolder() to get the full path and build your WAVES string using the full path string.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com