
Error: "The volume can not be fuond"

kachy_89P
until yesterday worked perfectly on my PC with XP, it made acquisitions from the card National and saves files in specific folders.
Today I copied the procedure to my new pc with win7-64bit, I created the specific save-folders in specific locations and have started the procedure.
When it ends, I get this error: "The specified volume can not be found"
You may depend on what?
Function SV() Variable/G experimenttime Variable/G recordingtime Variable/G duration Variable/G rate Variable/G savedrate Variable/G plotresolution // variable comment Variable/G com string/G wct end //Principal Function master(experimenttime, recordingtime, duration, rate, savedrate, plotresolution) variable experimenttime, recordingtime, duration, rate, savedrate, plotresolution variable psdflag=1 // first time, make the periodogram NewPath/O Path1, "C:Users:Carlo:SD" //defines where to save the files // rate= sampling rate for data acquiring, like 40000 Hz // savedrate= rate for high time-resolution data recording, like 200 Hz // plotresolution= interval between each point on strip graph // recordingtime= interval for saving on disk, like 10s or 30s // experimenttime= global experiment time, after which acquisition stops, like 3600 s (break stops before and saves) // savepath = forlder where save the files, like "C:Users:Carlo:SD" <!--break--> string timenow=date()+" "+time() // date and time now string filename variable t0 = stopMSTimer(-2)/10^6 // consults the microseconds timer, from the moment of PC startup variable t1=0, dt1=0, dt2=0 // time init if (plotresolution<duration) plotresolution=duration // cannot update faster than acquire endif make/O/N=0 timestrip //store the time make/O/N=0 deflstrip //where to store the deflection every plotresolution>duration make /O/N=0 variancestrip //where to store the variance every plotresolution>duration setscale/P x, t1, (plotresolution), "s", timestrip, deflstrip, variancestrip // sets the spacing of the waves, just to have "s" as unit setscale/P y, 0,1,"V" deflstrip, variancestrip setscale/P y,0,1,"s",timestrip //display display/W=(220,1,930,150) deflstrip vs timestrip AppendToGraph/L=L2 variancestrip vs timestrip ModifyGraph axisEnab(left)={0,0.45} ModifyGraph axisEnab(L2)={0.55,1} ModifyGraph freePos(L2)=0 ModifyGraph lblPosMode(L2)=2 ModifyGraph rgb(deflstrip)=(0,0,0) make /O/N=0 storeaverage, storevariance, storetime, waveaverage, wavevariance, wavetime // to store average and variance for the recordingtime display/W=(220,220, 550,450) storeaverage vs storetime variable acq_cycle=0 // counter for acquisition cycle do //big loop for acquisition and plot t1=stopMSTimer(-2)/10^6-t0 // evaluate the experimental time //print "t1=",t1 waveacquire(t1, duration, rate, savedrate, psdflag) // DATA ACQUISITION dt1+=stopMSTimer(-2)/10^6-t0-t1 // increment the delta time for plotting dt2+=stopMSTimer(-2)/10^6-t0-t1 // increment the delta time for saving insertpoints numpnts(storeaverage), numpnts(waveaverage), storeaverage // extends storeaverage storeaverage[numpnts(storeaverage)-numpnts(waveaverage), numpnts(storeaverage)-1]=waveaverage[p-numpnts(storeaverage)+numpnts(waveaverage)-1] // stores the averaged deflection points insertpoints numpnts(storevariance), numpnts(wavevariance), storevariance // extends storevariance storevariance[numpnts(storevariance)-numpnts(wavevariance), numpnts(storevariance)-1]=wavevariance[p-numpnts(storeaverage)+numpnts(waveaverage)-1] // stores the variance time points too insertpoints numpnts(storetime), numpnts(wavetime), storetime // extends storetime storetime[numpnts(storetime)-numpnts(wavetime), numpnts(storetime)-1]=wavetime[p-numpnts(storeaverage)+numpnts(waveaverage)-1] // and the times acq_cycle=+1 //increment the counter for acquisition cycle if (psdflag==1) psdflag=0 endif // switches off psd //print dt1," ",dt2 if (dt1>=plotresolution) // after exiting this loops, it adds a plot point ... // insertpoints numpnts(deflstrip), 1, deflstrip, variancestrip // makes room timestrip[numpnts(timestrip)]={stopMSTimer(-2)/10^6-t0} // to store the time too deflstrip[numpnts(deflstrip)]={mean(storeaverage, pnt2x(storeaverage, numpnts(storeaverage)-acq_cycle*rate/savedrate), pnt2x(storeaverage, numpnts(storeaverage)))} variancestrip[numpnts(variancestrip)]={mean(storevariance, pnt2x(storevariance, numpnts(storevariance)-acq_cycle*rate/savedrate), pnt2x(storevariance, numpnts(storevariance)))/sqrt(acq_cycle*rate/savedrate)} doupdate // explicitly ask to update the plots (in hope it has not done it before at insertpoint) // print "plotplot" dt1=0 //resets delta time for plotting acq_cycle=0 // resets acquisition cycle, so it later knows what to use for plotting endif if (dt2>=recordingtime) // after exiting this loop, it records on file and resets storeaverage and storevariance // saves storeaverage and storevariance on file with automatic names // empty storeaverage and storevariance for next acquisitions timenow=date()+" "+time() // updates time filename="DeflectionStrip "+num2str(savedrate)+"Hz on "+timenow+"-"+num2istr(dt2)+".txt" // for saving save /G/P=Path1 storetime storeaverage storevariance as filename // print "I want to save storeaverage and storevariance" redimension/N=0 storetime, storeaverage, storevariance //clean up dt2=0 //resets delta time for recording psdflag=1 // nextg cycle, record the PSD (if there is no next cycle, it records it at the end) endif while (t1<experimenttime) // now save storeaverage and storevariance, as the last portion of it may get lost otherwise (worst case, it will be empty files) timenow=date()+" "+time() // updates time filename="DeflectionStrip "+num2str(savedrate)+"Hz on "+timenow+"-"+num2istr(dt2)+".txt" // for saving save /G/P=Path1 storetime storeaverage storevariance as filename // print "I want to save storeaverage and storevariance" // and also save deflstrip and variancestrip timenow=date()+" "+time() // updates time filename="ExperimentStrip "+"finished on "+timenow+".txt" // for saving save /G/P=Path1 timestrip deflstrip variancestrip as filename // print "I want to save storeaverage and storevariance" //print "I want to save deflstrip and variancestrip" // now acquire last PSD waveacquire(t1, duration, rate, savedrate, 1) // DATA ACQUISITION (and saving of PSD) end // of function Function waveacquire(t1, duration, rate, savedrate, psdflag) variable t1, duration, rate, savedrate, psdflag string timenow, filename variable i=0 variable blocksize=rate/savedrate // blocksize for block averaging variable segmentsize=0 if (duration*rate>8192*4) segmentsize=8192// segment size for Periodogram calculation else segmentsize=(duration*rate)/5 endif //print segmentsize make/O/N=(rate*duration) wave0 make/O/N=(rate*duration/blocksize) wavevariance // wave variance decimated make/O/N=(rate*duration/blocksize) waveaverage // wave after decimation make/O/N=(rate*duration/blocksize) wavetime // to store the time points make/O/N=0 media //to store the recordings make/O/N=0 timepoints //to store the time of recordings make/O/N=(segmentsize/2+1) periodogramdomain setscale/P x, t1, (1/rate), "s", wave0 // sets the spacing of the wave, so the sampling rate DAQmx_scan/DEV="dev3" WAVES="wave0, 2;" //acquires from DEV device on channel 2 and puts in wave0 if (psdflag==1) DSPPeriodogram/Q/DLSG/NOR=(segmentsize*segmentsize/2)/SEGN={(segmentsize),(segmentsize/2)}/Win=hanning wave0 timenow=date()+" "+time() // updates time filename="PSD "+num2str(savedrate)+"Hz on "+timenow+".txt" // for saving periodogramdomain=pnt2x(W_periodogram, p) save /G/P=Path1 periodogramdomain W_periodogram as filename // print "I want to save storeaverage and storevariance" endif wavevariance=variance(wave0, pnt2x(wave0, blocksize*p), pnt2x(wave0, (blocksize*(p+1))-1))/blocksize setscale/P x, t1, blocksize*(1/rate), "s", wavevariance // sets the spacing of the wave, so the sampling rate waveaverage=sum(wave0, pnt2x(wave0, blocksize*p), pnt2x(wave0, (blocksize*(p+1))-1))/blocksize setscale/P x, t1, blocksize*(1/rate), "s", waveaverage // sets the spacing of the wave, so the sampling rate wavetime=pnt2x(wavevariance, p) // timings from the scale (?) variable stoptimer=stopMSTimer(-2) // stops the microseconds timer end <pre><code class="language-igor">
Use the Debug on Error feature to find exactly where the error is occurring. For details, execute:
December 3, 2015 at 10:36 am - Permalink
Now I try to start the " Debugging Error" .
December 3, 2015 at 11:23 am - Permalink
December 3, 2015 at 03:52 pm - Permalink
"C:Users:Carlo:SD"
from the line
at least, then Path1 can be freshly defined.
December 4, 2015 at 12:52 am - Permalink
Alway the same error!, When I remove the path; it ask me the path, I select a random folder, but everytime comes out the error: "The volume can not be found"
December 4, 2015 at 01:34 am - Permalink
December 4, 2015 at 05:10 am - Permalink
on my new PC was set as the time format hh: mm: ss.
Having said this:
in my procedure, the string to save the file is:
timenow=date()+" "+time() // updates time
filename="DeflectionStrip "+num2str(savedrate)+"Hz on "+timenow+"-"+num2istr(dt2)+".txt"
save /G/P=Path1 storetime storeaverage storevariance as filename
Because Windows does not Allows to rename the files with the ":", here that the error was generated!
The end is always the fault of windows !!!
December 4, 2015 at 05:42 am - Permalink