05-01-2020 11:33 AM
Made a few updates. Also took snippet since I think people prefer that.
05-01-2020 02:35 PM
One there is a bug in your code.
Look below at your spreadsheet, mine is next to it as a comparison.
Can you see the difference in numbers? (dt is 0.001) Can you identify your sheet?
Below is a NEW working version that should sip less memory and maybe faster as some loops are parallelized. The zip file is saved in LabVIEW 2018.
All you need to do is change the precision and default data directory.
mcduff
05-01-2020 04:14 PM
I noticed this issue when I was doing some testing earlier. I think I'm giving one more digit of precision than is necessary in the "number to fractional string" and then I'm likely experiencing a rounding error due to that.
Your solution is very clean. I've got some work to do and lots to learn... thank you for your guidance, I really appreciate it.
05-01-2020 04:26 PM
@nickb34 wrote:
I noticed this issue when I was doing some testing earlier. I think I'm giving one more digit of precision than is necessary in the "number to fractional string" and then I'm likely experiencing a rounding error due to that.
Look at the Help for Ramp.
You need to set the "exclude end?" to True. Then it should be okay.
Good luck.
Cheers,
mcduff
05-01-2020 04:59 PM
That's great... I put in a some logic to counter that issue and I got most of the way there, but setting that to true allowed me to remove all of that and it works correctly now.
05-01-2020 05:24 PM
I glad it works for you.
I gave you that last example as it may be easier to modify it in the future.
Because it uses a fixed string array (the 2d array on the shift register) you can do the following:
Think a bit about the case where you might need to modify in the future.
mcduff