Initializing Controls and Indicators Using Flat Sequence in LabVIEW

Updated Jul 3, 2021

Reported In

Software

  • LabVIEW

Issue Details

  • I'm trying to create a project in LabVIEW that contains a flat sequence structure. I initialized the controls and indicators outside the structure, but when my code is executed I get the initial values rather than the expected ones. How can I initialize in a proper way? 

Solution

Usually, end-users can initialize values by placing constants and wire them to the controls or indicators, outside of the main loop or design pattern been used to develop applications. There are several situations when this approach is not recommended. In this case, when end-users use Flat sequences to develop sequential code. 

The outcome of this approach using flat sequences is unexpected since there is no flow control between the controls and indicators connected to the constant values and the flat sequence structure. The recommended approach is to create a new frame at the beginning of the sequence with the initial information. The following image is an example:

 
ini.png