LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Output using NI 9375 and cDAQ-9174 combination

Hello, 

 

I am trying to use the NI 9375 for a control output of 0- 24V. 
Currently have an issue if using software timed output, the while loop only gives me 20Hz. 
where I need at least 1 kHz to progress. 
From the spec seems like both units can push way more than what I required. 
If I am using hardware timing, I can push more than 1k, but the graph is not able to meet a 50% duty cycle. 

 

ShawnLi2024_0-1747680677704.png

I am using the above simple code. 
Thanks for the support. 

0 Kudos
Message 1 of 5
(356 Views)

Your loop has no timing at all.

What do you mean by "graph"?

Where is the terminal of the stop local variable?

Is this running on a PC or a Realtime system?

Yes, you need to do hardware timing.

0 Kudos
Message 2 of 5
(338 Views)

Hello, Thanks for the reply.
Sorry for the confusion. 
I am new to LabVIEW. 

Want to find out what the ideal solution is 
I am not using any timing in the loop because any timing I add will slow down my output speed. 
This loop gives me only 20 Hz max. I am using an external Oscilloscope to monitor the DO channel. 
And is running on a PC. 

 

What I want the program to do is the following. 

ShawnLi2024_0-1747688801646.png

The program I am in does not seem to reach the speed. 

 

Thanks. 

0 Kudos
Message 3 of 5
(317 Views)

Hi Shawn,

 


@ShawnLi2024 wrote:

Want to find out what the ideal solution is 


Please define "ideal"! This might mean different things for you and for us…

 


@ShawnLi2024 wrote:

I am not using any timing in the loop because any timing I add will slow down my output speed.


You were recommended to use "hardware timing". This does NOT mean to add some wait functions in the loop!

 

DAQmx allows to offload the timing to the hardware, which uses a more accurate clock than your PC can provide…

 


@ShawnLi2024 wrote:

I am new to LabVIEW. 


LabVIEW and DAQmx come with a huge library of example VIs.

Open the example finder and look for suitable examples on DAQmx counter output…

 


@ShawnLi2024 wrote:

What I want the program to do is the following. 

 

The program I am in does not seem to reach the speed. 


When outputting just one sample after the other without hardware timing then you will NEVER reach that 1kS/s sample rate…

 

Learn from the examples and use hardware timing!

Best regards,
GerdW


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

See shipping examples at Help >> Find Examples.. >> Hardware Input and Output >> DAQmx >> Digital Output >> Digital - Continuous Output.vi

 

Instead of using a shift register to invert the value, use Digital Pattern Generator (Ramp) VI and write multiple samples with a single DAQmx Write VI.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 5 of 5
(280 Views)