Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

clocked digital output DAQmxWriteDigitalLines M-series

Using M-series 6259, nicaiu.dll, through matlab and loadlibrary, calllib, etc.


Attempts to do clocked digital output following the example WritDigChan-ExtClk.c fails with message:


Measurements: Requested value is not a supported value for this property


The only difference is for the clock source, I've tried '20MHzTimebase', and '100kHzTimebase', and also an external pin 'Dev2/PFI0'


Static digital I/O without clocking works fine. 


I have been able to implement all of the functionality I want using LabVIEW, so I know what I want to do is supported by the hardware.  There has been some suggestion that the M-series devices  do not have their own do/sample clock so an external clock needs to be used.  Using labview selecting the 100kHzTimebase, etc. works fine so it seems to me this should not be the root of the problem. 


Has anybody else encountered this?  clocked digital I/O is not supported in the instrument control toolbox so perhaps this is a fundamental problem?


0 Kudos
Message 1 of 5

Hi fuzzback,


I am not too familiar with using that toolbox, but it does appear that you are correct in that it is not supported, based on what I read on that website. You may need to contact the third-party software vendor as I saw mention of including requests if hardware clocked digital I/O functionality was needed. Regarding the M Series not having their own do/sampleclock, you are correct that it does not have a dedicated DI or DO sample clock, and so another internal or external source must be specified. As always, more information may be found in the Digital I/O section of the M Series User Manual. This should all be possible in LabVIEW or by creating a task in Measurement & Automation Explorer. Hope this helps,

Daniel S.
National Instruments
0 Kudos
Message 2 of 5

Hi Daniel,


I am not using any toolbox right now.  I am basically using the nicaiu.dll library, except calling the functions using Matlab.  I am assuming that I should be able to get all of the same functionality in the nicaiu.dll independent of what environment I am using to call the functions.  I haven't tried to write a C program using the dll to see if that would work and will do that next, but in the mean time, has anybody out there been successful doing clocked digital I/O using an M series DAQ using the nicaiu.dll library functions, in particular calling them through Matlab or Python?  Thanks.




0 Kudos
Message 3 of 5

Hi fuzzback,


Do you know exactly which value of the function is causing the error? It may be possible that another parameter of your timing function could be incorrect as well, such as the sample mode or something else. Also, are you specifying the source terminals with the proper syntax (with the forward slash at the beginning such as "/Dev1/PFI2" )? Can you post the exact function you are calling with each corresponding parameter or check the error to see which value you are requesting that is not valid (it usually gives choices for what are valid choices as well)? Thanks,
Daniel S.
National Instruments
0 Kudos
Message 4 of 5
Hi Daniel, I got it to work.  I had a mistake in the sampsPerChanToAcquire argument in DAQmxCfgSampClkTiming which I discovered after comparing a C program that worked properly with my Matlab calllib calls.  Thanks.
0 Kudos
Message 5 of 5