10-23-2022 04:52 PM - modifié 10-23-2022 05:24 PM
Hi,
Please, could someone explain to me how the code works in the advanced while loop in the attached picture and what is the difference with the simple version of the code?
It's something Urgent.
Thank you in advance 🙂
10-23-2022 06:19 PM - modifié 10-23-2022 06:26 PM
Since you know the number of iterations before the loops even start, they should be a FOR loop. No need to check for termination at each iteration
The difference becomes more important if the loops run for very long time at a fast rate and we don't know when they will be stopped by the operator. I that case, the lower loop will grow the array forever and eventually you'll run out of memory. The upper loop will have a fixed size array with 20 elements and the oldest element will get overwritten with the new data. Much more memory efficient.
So, I recommend the following tests to understand things:
le 10-24-2022 02:20 AM
Dear Altenbach,
I have a problem with my MacBook computer. I can't launch LabVIEW. It is an assignment to be done for today (a two-page report). The file LabVIEW is attached. Please, could you send me screenshots on Labview of what you recommended I do?
I'll be very grateful to you.
Thank you very much.
le 10-24-2022 10:01 AM
@Lam_8 wrote:
I have a problem with my MacBook computer. I can't launch LabVIEW. It is an assignment to be done for today (a two-page report). The file LabVIEW is attached. Please, could you send me screenshots on Labview of what you recommended I do?
(Sorry, I don't have access to LabVIEW 2021 at the moment, so I cannot look at your attachment. If you have a hardware problem, talk to your teacher. Maybe there is an alternative solution)
The recommendation on what to do depends on the exact problem description. What is the purpose of the program? What are the controls? What should the desired output be. What problem does it solve? How does it fit into the big picture?
We don't know any of this!!! All you asked was the difference between the two code versions in the first message and I explained it to you.in detail. Did you understand my explanation?
What should be the topic of the two-page report? For the report, give it a good title and don't forget to include your name,
Start with one or two paragraphs explaining the problem description, followed by a description of the program and how to use it. Add some screenshots. At the end write conclusions and an outlook what could be improved in the future and how it could be scaled to a much larger program.