LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner - Need help with output using DAQ assistant and NI 9401

I'm an absolute beginner and I have been putting in some time learning the basics of labview, but right now I need to do a very simple task and I can't figure it out. I am trying to use DAQ Assistant to send a pulsating signal (0 and 5 volts) through a 9401 module. At this stage, ALL I need to do is make it physically send the signal in specified intervals until I say stop. My block diagram only contains the daq assistant, because by my understanding that should be all I need to make such a simple thing happen. However, nothing happens when I run the code. As far as I can tell, the daq assistant is set up correctly. I chose Generate Signals > Counter Output > Pulse Output and then choose 10 seconds and 100 pulses.  Sorry for wasting your time with such a stupid question,  but I have spent hours trying to find an example as basic as what I'm trying to do with no luck at all. 

 

Thanks,

Andy

0 Kudos
Message 1 of 10
(4,194 Views)

Hi Andy,

 

As far as I can tell, the daq assistant is set up correctly.

As far as we can tell we cannot answer your question as you did forget to attach your VI…

 

Did you try to use some of the exmaple VIs coming with LabVIEW?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(4,164 Views)

I didn't attach my VI because it's literally just the daq assistant as I described. In essence, that is my question - is it possible to run the program and have something happen with just a daq assistant and absolutely nothing else in the block diagram?

0 Kudos
Message 3 of 10
(4,162 Views)

Hi Andy,

 

something will happen when you run the DAQ assistent. You have it configured to do something

 

But how should we tell you, what exactly will happen, when you don't attach your VI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(4,159 Views)
0 Kudos
Message 5 of 10
(4,157 Views)

Hi Andy,

 

I must admit I don't use the DAQAssistent at all - you usually don't need it.

And I don't use cDAQ devices, I use cRIOs with FPGA level programming.

 

LabVIEW comes with a lot of example VIs explaining how to use DAQmx devices. And there is a good AppNote here

 

Do you get an error message from the DAQ Assistent? If there is no error it will work as intended!

(General note: any reasonable program should have a loop and a stop button…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 10
(4,147 Views)

I see a couple of things.

 

You have the pulse set up for 5 seconds high and 5 seconds low.  So each pulse will be 10 seconds.  Times 10 samples means 100 seconds of pulse output.  The timeout for the DAQ task is 10 seconds, so I think it would timeout after a single pulse.  (Try adjusting the high low times in your task.)

 

It is set to use CTR1.  I don't use counter/pulse tasks very often, but a counter sounds like an input to me rather than an output.  Can you configure CTR1 to output a signal?  Maybe you can and it just works.  Maybe you can and you have to configure something else.  But it is something that jumps out to me.  I'd expect a digital output to be the output channel.

0 Kudos
Message 7 of 10
(4,138 Views)

Here is what the channel looks like. Does this seem ok to you?

0 Kudos
Message 8 of 10
(4,134 Views)

Click Hide Details

 

Look at the pulse shape parameters.

0 Kudos
Message 9 of 10
(4,116 Views)

Hello aham312

 

Basically if you go to: Help>>Find example>> Hardware Input and Output>>DAQmx>>Counter Output you should see the "Counter - Continuous Output.vi" that example might be useful for you. On the other hand we have a Community where many people upload examples and codes so, I found another example:  https://decibel.ni.com/content/docs/DOC-2167

 

Feel free to use our Community too.

 

Have a great day 

0 Kudos
Message 10 of 10
(4,072 Views)