implementing DAQmx_Scan

Hello,

I've been taking data by calling "fDAQmx_ReadChan()" repeatedly but I now need to take data at a much higher sampling rate.

So I began to look into using "DAQmx_Scan." 

Looking at the documentation, I noticed there are a lot of flags and such.

But for the first iteration, I would be happy just to be able to store voltage data in a wave using "DAQmx_Scan." 

 

My device name is "Dev1" and I am taking data through "channel 0."  I believe that's pretty much all I need to implement, to my knowledge that is.

 

Function whassup()

	make/O/N=10 Input0
	string ScanString = "Input0, 0/DIFF, -0.5,0.5;"
	DAQmx_Scan /DEV = "Dev1" WAVES=ScanString
	print ScanString

	

end

 

Below is my feeble attempt to implement "DAQmx_Scan"  (my best effort so far.  At least I'm not getting an error with this one)

If I just want to measure whatever is getting fed into Analog Input channel 0, how would you go about doing it, using "DAQmx_Scan"?

 

I was looking for posts related to my question and found "https://www.wavemetrics.com/forum/general/nidaqmx-signal-averaging."

 

Apparently, the block of code below could work like an oscilloscope.  I would like to know how this could be implemented, alternatively. (when i run the code, it says there are no grpahs or the specified graph does not exist) 

Make/O/N=10000 Wave0 
SetScale/P x, 0,0.000025, Wave0 
SetAxis Left -5,5 
DAQmx_Scan/DEV="dev4"/RPT WAVES="Wave0, 0"

 

Simply adding "display /K=1 Wave0 " below "SetAxis Left -5,5" returns an error "scanning already in progress"

 

 

Seems like that last little block should work in a basic way. What's going wrong? If you get an error, you get a large amount of fairly inscrutable error info from

print fDAQmx_ErrorString()

The error info is hard to read but contains very useful information.

To get an oscilloscope-type display, see the /RPT and /RPTC flags.