LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create a ramp like function in Formula node

Solved!
Go to solution

Hi GerdW,

 

Thanks for your reply. The reason that the code is long is due sending a trigger signal (at the beginning of ramp) to activate laser and camera. Can you please let me know which part of length calculation you think is incorrect? 

 

Also, do you think the repetition of ramp profile over multiple cycles is correct?

 

Thanks

Navid

0 Kudos
Message 11 of 16
(454 Views)

Hi Navid,

 


@navidvd wrote:

Can you please let me know which part of length calculation you think is incorrect?


You search for edges in the signal, but each search function uses a subset of the former function - but still you use their index outputs (even though they are totally unrelated!) to calculate some signal length from it…

 


@navidvd wrote:

Also, do you think the repetition of ramp profile over multiple cycles is correct?


I don't see any "repetition over multiple cycles" in the VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 16
(445 Views)
Solution
Accepted by topic author navidvd

Here's what I might do. See if it can give you some ideas. It will repeat the waveform until you press stop.

 

altenbach_0-1696431731480.png

 

 

You can easily figure out how to calculate the wait based on the number of points so the waveform repeats approximately every second. (since the wait is quantized to ms, it might not be precise for all array sizes, but I assume you'll be able to find a combination that works well. 😄 )

Message 13 of 16
(424 Views)

Thanks for that. I need the cycle to be repeated untill I stop the program.

0 Kudos
Message 14 of 16
(402 Views)

Thanks,

 

I believe that is what I need. The cycle to repeat before I press stop. I can reduce dt to increase the accuracy (let's say from 10 ms to 1 ms). I need it to be accruate, since when I do cycle average, I need to ensure that all cycles are started from the same location (time-wise in the cycle).

 

Thanks

Navid

 

0 Kudos
Message 15 of 16
(399 Views)

@navidvd wrote:

I believe that is what I need. The cycle to repeat before I press stop. I can reduce dt to increase the accuracy (let's say from 10 ms to 1 ms). I need it to be accruate, since when I do cycle average, I need to ensure that all cycles are started from the same location (time-wise in the cycle).


You have full control over the number of points in the waveform AND the playback speed. You can always find a reasonable combination.

 

If you need to synchronize this with other processes, there are many possibilities. Best would be hardware timed.

0 Kudos
Message 16 of 16
(351 Views)