LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

use LabVIEW and cDAQ to generate a signal with iteration methods

Hello everyone,

 

I want to generate a sine wave with my voltage output card(NI 9263). But I don't want to create it directly but to generate with a digital feedback and iteration methods.  So I use NI9263 to generate Signal, which is directly measured with my signal input card NI 9205. The following picture shows the prinzip of the program.  And the program is also attached.  My problem is at first I can get a 0 wave as Ui-1. Then both Ui and Ui-1 disappear and the iteration failed. I don't know why and how can I corrcet the program.

 

Best Regards 

 

Young 365

Young365_2-1588072747054.png

 

Young365_1-1588072250191.png

Young365_3-1588072871158.png

 

 

0 Kudos
Message 1 of 3
(2,040 Views)

Hi Young,

 

are you sure your sample arrays/waveform ALWAYS have the same (and expected) length?

 

One point to make this for sure is to request exactly 1000 samples at DAQmxRead (or use the value of "samples per channel" in every place)!

 

Suggestion: replace ALL "value" property nodes by wires:

(When requesting a fixed amount of samples from DAQmxRead you can also delete that silly wait function in the first frame.)

Best regards,
GerdW


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

Hello GerdW,

Yeh, I know what you did can do simplize the program. I make it as your advice. But most importantly is my problem is still there. I mean I want to know why my thought doesn't work. I think the first wave generation should be 0, then slowly aproach my goal(a sine wave). I can't find out why it doesn't work as expected.

 

Best Regards

 

Young

0 Kudos
Message 3 of 3
(1,981 Views)