Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter output error

Hi all,

 

I wish to output my counter pulse to a waveform graph.  However, I am getting an error:

 

Error -200673 occurred at DAQmx Write (Digital 1D Wfm NChan 1Samp).vi:1

 

Possible reason(s):

Measurements: Multiple samples cannot be written using a single sample write.

Ensure the waveform contains only a single sample.

Task Name: _unnamedTask<12>

 

Can anyone offer any help as to what's wrong with the code?

 

Kind regards,

Miika

0 Kudos
Message 1 of 2
(5,932 Views)

Hello Miika,

 

when using a counter to generate a pulse train, you only need to specify the frequency and duty cycle in the beginning with the DAQmx Create Channel VI or with the DAQmx Write Signal VI when you want to change the parameters. After that you can start the generation with the DAQmx Start VI, no need to do anything else. For more information please see the Hardware Input and Output -> DAQmx -> Generating Digital Pulses category in the Example Finder.

 

Also, if you generate the pulse train with the counter, you will only be able to see the waveform if you feed it back to one of the digital inputs.

 

Daniel

Dániel Fülöp
Field Application Engineer (CLA, CTA)
National Instruments
0 Kudos
Message 2 of 2
(5,923 Views)