Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-9474 cDAQ Digital Output Frequency Output Difficulties

Solved!
Go to solution

I'm working with an NI-9474 Digital Output card in an NI-9174 chassis.  Along with the digital output card, there is an NI-9239 Analog card and an NI-9422 Digital Input card. 

 

I was hoping to use one of the digital outputs to drive a frequency input control for a motor.  But software timing, even with a timed loop is not producing pulses consistently enough to drive the motor at a stable speed.  Even with a max pulse/loop speed of 20Hz. 

 

From what I understand, with hardware timing my pulse output options are limited. 

 

How Do I Program the Frequency Output (FREQ OUT) Signal Using NI-DAQmx?

 

This will not give me the fine control I need over the speed of the motor.

 

Testing in MAX in Continuous Samples mode, it looks like I can change Samples to Write and Rate to have pretty fine control over the pulses out.  But I can't test this on actual hardware at the moment

 

Do I have any other options?

 

 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 1 of 3
(3,186 Views)
Solution
Accepted by topic author pallen

I don't have a lot of familiarity with cDAQ family hardware so I can only speak to more general knowledge based mainly on desktop boards.  Readings on the forums tell me that this stuff *can* also be true for cDAQ, but it may depend on which chassis and modules you use.

 

So anyway, the main idea is to generate your variable frequency output as a Counter task rather than a DO task.  It's much easier to both get the precise timing you want and the ability to change frequency on-the-fly without stopping.  If you add the phrase "on the fly" to your searches here, you should find a lot of relevant results.

 

 

- Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 3
(3,147 Views)

Hi Kevin,

 

Thanks for the reply!

Adding "On the fly" to my search term gave me some results I hadn't found before.

 

Change Counter Output Frequency on the Fly

 

I did have to make some changes to the example code to get it to run.  (Basically replace the Reference and Value property combination with a Local Variable of the Frequency control. 

 

I don't have access to the hardware at the moment.  But the code is working in simulation.  If I can produce a stable 100Hz pulse train, then I should be able to control the motor. 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 3 of 3
(3,141 Views)