LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop

Hi krispiekr…,

i don´t understand your code. How many parallel loops do you have now? Can you upload more code, so we can help to clean up and show you a way without local variables?

Mike

Message 11 of 16
(900 Views)
Hi krispiekream,

you may use much less locals when you would use shift registers:

When changing TempDwell and OtherLoop to control and indicator, respectively, you would get rid of two more locals... And I just notice: I forgot to delete the TempCycle local!



Message Edited by GerdW on 04-29-2008 08:53 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 16
(892 Views)
i got the temp problem solved..but i have a lot to learn about not using local variables..
i have this vi that is working..but its filled with sequences and local variables. i dont want mess with a working code so i didnt bother cleaning it up...
can you see my codes and see what i can clean up..

Best regards,
Krispiekream
0 Kudos
Message 13 of 16
(887 Views)
GerdW
that is some nice programming...
i'll try to clean my program to look like that..

Best regards,
Krispiekream
0 Kudos
Message 14 of 16
(885 Views)
Here's another quick draft using autoindexing. It may need to be tweaked a bit. I am not sure why you use indicators as controls and vice versa.
 
I don't undestand a lot of your logic and it is probably wrong. This is a somewhat literal refactoring. 😉


Message Edited by altenbach on 04-29-2008 12:17 PM
Message 15 of 16
(875 Views)


@krispiekream wrote:
i have this vi that is working..but its filled with sequences and local variables. i dont want mess with a working code so i didnt bother cleaning it up...


Since "refactoring" (the process of cleaing up the code) takes a long time while this should not change the functionality of the code, it is recommended to implement the code in a proper way from start.....So i recommend you to look into examples shipped with LV or you can download from NI website just to see what possibilities are out there to reduce the usage of variables and sequencestructures 😉

Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 16 of 16
(842 Views)