03-05-2013 11:13 AM
Dennis,
I put the incrementing into the case structure along with setting up a power because for some reason I want these two operations to be executed together and strictly after setting of the frequency. So the shift register of some outer while loop will not help.
I can easily replace the case structure with flat sequence like Olivier suggested or with my favorite "in place element", so I want to understand why it's also bad and what is the good way.
03-05-2013 11:19 AM
@Arkady_V wrote:
Olivier, I thought that flat sequence structure that you suggest to use is designed primarily for the case when you have more than one frame to be executed consequentally. In case of one frame it looks weird. Why is it better than "in place element"?
The "In place element" is designed for something else: to replace a single value inside a very large cluster or large array to reduce mem copies. You are correct in your interpretation of the "Sequence structure" but it can be used in this situation to enforce data flow in VI without "error in/error out" and since it is meant to enforce data flow, it is a better structure to use instead of the "In place element" for code readability. They are probably functionally identical however.
03-05-2013 11:39 AM
Olivier,
Thank you, may be I just need to get use to it, as now I feel slightly uncomfortable using this structure. It looks more cumbersome than the pair of { } or begin and end that I really need...