LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple DAQms tasks for generate a CO Pulse Freq to control stepper motor speed

Hello,

 

I have a potentiometer with who I want to change the duty cycle of a pulse signal to control the speed of a stepper motor. I am using National Instrument NI USB 6212 as data aquisition module. I created an Analog Input Voltage DAQmx channel to get the potentiometer voltage and an CO Pulse Freq DAQmx channel to generate the pulse signal. How can I use the potentiometer as a Trigger so every time I rotate the potentiometer the CO Pulse will trigger and change the duty cycle. 

 

I created the scheme for both of events but I can't figure it out how to connect them between themselves.

 

Thank you

0 Kudos
Message 1 of 2
(1,987 Views)

I recommend exploring producer / consumer architecture. This is useful to share data between two loops running at potentially different rates.

 

Producer/Consumer Architecture

 

Using Producer/Consumer with DAQmx

0 Kudos
Message 2 of 2
(1,953 Views)