From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time delay in ForFor Loop

Thank you!!!!

It works perfectly now, love u guysHeart

0 Kudos
Message 31 of 33
(337 Views)

Hello!

Here I come again! I have learned something these days and met some problems again. Appreciate if you can give a hand.

It's still the same program but I add two functions into the program(Threshold 1D array and interpolate 1D array, learned this from the forum) to create a look up table for the Duty.

 

It works but the 'time' I create is not ending at the value I want which means it has one value missing.

 

And also if I create the 'Duty step size' to a value which has one decimal, how could I program it to let it choose the value from the array which is connected to the 'interpolate 1D array' function. (Let's say, set Duty step size to 0.5, it won't choose the value from the array but will calculate an average value between that)

Here I attached the program.

0 Kudos
Message 32 of 33
(311 Views)

Hi AIEXINUK,

 

I have learned something these days

Yes, you learned about using the RAMP function, shift registers and how to prevent race conditions because of local variables.

 

and met some problems again.

Because you don't take our advice and still don't use the RAMP function in your VI and still place way too much local variables!

 

check.png

let it choose the value from the array which is connected to the 'interpolate 1D array' function. (Let's say, set Duty step size to 0.5, it won't choose the value from the array but will calculate an average value between that)

If you would read the help for that Interpolate function you would know the reason why it works exactly this way…

 

It works but the 'time' I create is not ending at the value I want which means it has one value missing.

Put more values into your LUT to prevent this problem…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 33 of 33
(276 Views)