LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Producing a step function out of a DAQ 6009

Hello,

 

I am trying to produce a signal from my DAQ USB-6009.

 

This signal will be outputed from the DAQ, to a linear actuator, to deliver a force. The linear actuator has a force sensor, to provide feedback to the DAQ.

 

The step function I am trying to produce is visualised in the graph below:

Y-axis (voltage in volts), X-axis (time in seconds)

+3 |                       --------- 

+2 |             

+1 |        ------------- 

  0 |  -----                          -------------------------

      0s   1s           5s       7s                         10s

 

Questions: 

1. How would I go about producing this signal from Labview to the DAQ to the linear actuator?

2. How would I incorperate a PID controler. 

3. How would I write onto the DAQ from the force sensor?

 

I have attached a picture of what I have accomplished so far, but I am recieving errors from the DAQ reader. I am willing to scrap this VI and start from scratch if that would make it easier. 

 

IMG_4686.JPG

 

Thanks

0 Kudos
Message 1 of 5
(4,918 Views)

Hi Jake,

using Control&Simulation loops is likely overkill for this problem…

1. How would I go about producing this signal from Labview to the DAQ to the linear actuator?

I suggest a simple FOR loop: set a voltage and wait the delay. In the next iteration do the same. Your example translates to "coordinates" (voltage/delay pairs): (0V, 1s), (1V, 4s), (3V, 2s), (0V, 3s). Put those into an array, the FOR loop will autoindex them…

2. How would I incorperate a PID controler. 

Use the PID function found in recent LabVIEW versions. It comes with example VI, so study them!

3. How would I write onto the DAQ from the force sensor?

Use an analog input of your USB6009 to read the force sensor signal…

LabVIEW and DAQmx come with a lot of example VIs. Study them!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(4,906 Views)

Thanks for the reply.

 

Could you please claify "voltage/delay pairs".

 

I am a novice user at LabVIEW, any step by step explaination would be helpful. 

0 Kudos
Message 3 of 5
(4,901 Views)

Hi Jake,

 

Could you please claify "voltage/delay pairs".

You want to output a certain voltage for a predefined time: So you have to define a pair of values, one voltage value with one time/delay value…

See this simplified example:

check.pngYou can also use a 2D array instead of 2 1D arrays…

 

Btw. you know how to produce "screenshots"? 😄 (Or is your LabVIEW computer not connected to the internet?)

Best regards,
GerdW


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

Thanks for the reply.

 

I was just responding to you on my mac laptop, and it was easier for me to take a picture with my phone and send it there rather than screen shot it from the windows one, haha.

 

Thanks 

0 Kudos
Message 5 of 5
(4,875 Views)