10-04-2023 04:56 AM
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
10-04-2023 05:52 AM
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…
10-04-2023 10:03 AM
Here's what I might do. See if it can give you some ideas. It will repeat the waveform until you press stop.
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. 😄 )
10-04-2023 09:23 PM
Thanks for that. I need the cycle to be repeated untill I stop the program.
10-04-2023 09:33 PM
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
10-12-2023 09:32 AM
@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.