<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://labviewwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AristosQueue</id>
	<title>LabVIEW Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://labviewwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AristosQueue"/>
	<link rel="alternate" type="text/html" href="https://labviewwiki.org/wiki/Special:Contributions/AristosQueue"/>
	<updated>2026-04-22T10:15:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://labviewwiki.org/w/index.php?title=LabVIEW_2020&amp;diff=31610</id>
		<title>LabVIEW 2020</title>
		<link rel="alternate" type="text/html" href="https://labviewwiki.org/w/index.php?title=LabVIEW_2020&amp;diff=31610"/>
		<updated>2022-04-18T14:48:17Z</updated>

		<summary type="html">&lt;p&gt;AristosQueue: /* New features in LabVIEW 2020 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{prevnext|LabVIEW 2019|LabVIEW Versions|LabVIEW 2021}}&lt;br /&gt;
{{LabVIEW Version&lt;br /&gt;
|version=LabVIEW 2020&lt;br /&gt;
|logo=File:LV2020.png&lt;br /&gt;
|release=May 2020&lt;br /&gt;
|release_sp1=January 2021 (SP1)&lt;br /&gt;
|change_0=Interfaces&lt;br /&gt;
|change_1=Partially broken wires&lt;br /&gt;
|change_2=Publish web services to NI Web Server&lt;br /&gt;
|change_3=Repairing packages&lt;br /&gt;
|change_4=Clear variant data types}}&lt;br /&gt;
&lt;br /&gt;
==New features in LabVIEW 2020==&lt;br /&gt;
{{ambox|text=This is a subset of new features in LabVIEW 2020 that were mentioned on [https://twitter.com/labview Twitter] and [https://www.facebook.com/labview/ Facebook]. See the Upgrade Notes for a complete list of changes.}}&lt;br /&gt;
* Interfaces - Expanded object-oriented programming to introduce interfaces as a companion feature to classes. &lt;br /&gt;
* Clear Variant Data right-click menu option&amp;lt;ref name=&amp;quot;fb-clear-variant-data&amp;quot;/&amp;gt; - Clears data from Variant controls and indicators.&lt;br /&gt;
* Enum to Array of Enums function&amp;lt;ref name=&amp;quot;fb-enum-to-array-of-enums&amp;quot;/&amp;gt; - Creates an array with all possible Enum values.&lt;br /&gt;
* Create NI GUID function&amp;lt;ref name=&amp;quot;fb-create-ni-guid&amp;quot;/&amp;gt; - Adds a native GUID function to LabVIEW.&lt;br /&gt;
* Remove &amp;lt;code&amp;gt; (no error)&amp;lt;/code&amp;gt; from Error Control (hidden INI key)&amp;lt;ref name=&amp;quot;fb-remove-no-error-from-error-control&amp;quot;/&amp;gt; - Set &amp;lt;code&amp;gt;NI.LV.RemoveNoError=TRUE&amp;lt;/code&amp;gt; to remove the &amp;lt;code&amp;gt; (no error)&amp;lt;/code&amp;gt; suffix from Error Controls.&lt;br /&gt;
* Build Path Relative Path Input&amp;lt;ref name=&amp;quot;fb-build-path-relative-path-input&amp;quot;/&amp;gt; - The default type for the second input of the Build Path function was changed to relative Path instead of String.&lt;br /&gt;
* Break Bad Wire Branches Only&amp;lt;ref name=&amp;quot;fb-break-bad-wires-only&amp;quot;/&amp;gt; - Wires only break for broken branches instead of all branches.&lt;br /&gt;
* Class Dialog Improvements&amp;lt;ref name=&amp;quot;fb-class-dialog-improvements&amp;quot;/&amp;gt; - The dialog for creating new classes was changed to provide more features.&lt;br /&gt;
* Double Click Array To Cluster&amp;lt;ref name=&amp;quot;fb-double-click-array-to-cluster&amp;quot;/&amp;gt; - The property dialog for the Array To Cluster function can now be opened by a double-click.&lt;br /&gt;
* Set Text Icon for Project Libraries&amp;lt;ref name=&amp;quot;fb-edit-icons&amp;quot;/&amp;gt; - The Project Library configuration dialog has a new &#039;&#039;Set Text Icon...&#039;&#039; button, which provides a way to quickly set the text, text color and background color for the library icon.&lt;br /&gt;
* Range Limits for Type&amp;lt;ref name=&amp;quot;fb-range-limits-for-type-vi&amp;quot;/&amp;gt; - Returns the maximum and minimum values for a given data type.&lt;br /&gt;
* Generate Checksum Values&amp;lt;ref name=&amp;quot;fb-generate-checksum-values&amp;quot;/&amp;gt; - Adds native functions to calculate SHA-2 and SHA-3 checksums to LabVIEW.&lt;br /&gt;
* Hide Event Data Node and Iteration Terminal&amp;lt;ref name=&amp;quot;fb-hide-event-data-node-and-iteration-terminal&amp;quot;/&amp;gt; - It is now possible to hide Event Data Nodes in Event Structures and Iteration Terminals on For- and While loops.&lt;br /&gt;
* Multi-Error Support&amp;lt;ref name=&amp;quot;fb-multi-error-support&amp;quot;/&amp;gt; - Collect multiple error values on a single error wire (adds a new subpalette for handling multiple errors).&lt;br /&gt;
* Hide Last Item for Rings when running&amp;lt;ref name=&amp;quot;fb-hide-last-item-for-rings&amp;quot;/&amp;gt; - Adds an option to hide the last item from a ring control.&lt;br /&gt;
&lt;br /&gt;
==Application icon design==&lt;br /&gt;
The application icon was changed for LabVIEW 2020 SP1:&lt;br /&gt;
&lt;br /&gt;
[[File:LV2020SP1.png]]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [https://www.ni.com/en-us/shop/labview/release-details.html LabVIEW Release Details]&lt;br /&gt;
* [https://www.ni.com/pdf/manuals/374715n.html LabVIEW 2020 Readme]&lt;br /&gt;
* [https://www.ni.com/pdf/manuals/374715p.html LabVIEW 2020 SP1 Readme]&lt;br /&gt;
* [https://www.ni.com/pdf/manuals/371780t.pdf LabVIEW 2020 Upgrade Notes]&lt;br /&gt;
* [https://www.ni.com/en-us/support/documentation/bugs/20/labview-2020-sp1-bug-fixes.html LabVIEW 2020 SP1 Bug Fixes]&lt;br /&gt;
* [https://www.ni.com/en-us/support/documentation/bugs/20/labview-2020-known-issues.html LabVIEW 2020 Known Issues]&lt;br /&gt;
* [https://www.ni.com/en-us/support/documentation/bugs/20/labview-2020-sp1-known-issues.html LabVIEW 2020 SP1 Known Issues]&lt;br /&gt;
* [https://youtu.be/rXLxo9zuBSc What’s new in LabVIEW 2020] by Tom’s LabVIEW Adventure&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-clear-variant-data&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/313204460045993 Clear Variant Data] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-enum-to-array-of-enums&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/283647629401421 Enum to Array of Enums] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-create-ni-guid&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/570111097012827 Create NI GUID.vi] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-remove-no-error-from-error-control&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/615411719411123 Remove (no error) From Error Control] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-build-path-relative-path-input&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/299469061159932 Build Path Relative Path Input] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-break-bad-wires-only&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/672708713385685 Break Bad Wires Only] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-class-dialog-improvements&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/3102767176494288 Class Dialogue Improvements] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-double-click-array-to-cluster&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/349473259602855 Double Click Array To Cluster] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-edit-icons&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/350338116077871 Edit Icons] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-range-limits-for-type-vi&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/690573941892844 Range Limits for Type VI] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-generate-checksum-values&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/1254380881613189 Generate Checksum Values] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-hide-event-data-node-and-iteration-terminal&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/372715580702001 Hide Event Data Node and Iteration Terminal] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-multi-error-support&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/191762282418740 Multi-Error Support] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;fb-hide-last-item-for-rings&amp;quot;&amp;gt;[https://www.facebook.com/labview/videos/842160236599572 Hide Last Item for Rings] by Darren Nattinger&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
[[Category:LabVIEW Versions]]&lt;/div&gt;</summary>
		<author><name>AristosQueue</name></author>
	</entry>
	<entry>
		<id>https://labviewwiki.org/w/index.php?title=Occurrence&amp;diff=4589</id>
		<title>Occurrence</title>
		<link rel="alternate" type="text/html" href="https://labviewwiki.org/w/index.php?title=Occurrence&amp;diff=4589"/>
		<updated>2011-10-24T15:37:11Z</updated>

		<summary type="html">&lt;p&gt;AristosQueue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There seem to be misconceptions about how exactly occurrences work and what exactly the &amp;quot;ignore previous&amp;quot; parameter on &amp;quot;Wait on Occurrence&amp;quot; (WoO) does. The following tries to explain, in a long and winded way, how they (functionally) behave:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHORT STORY:&#039;&#039;&#039; The following is the advice of LabVIEW&#039;s Chief Architect to use occurrences correctly: &lt;br /&gt;
&#039;&#039;First build a system which polls continuously for whatever it is the occurrence will signal. You need to be able to determine the state of things without an occurrence. This creates a correct, but inefficient busy waiting implementation. Once that works, add an occurrence to alleviate the inefficient waiting. Do &#039;&#039;&#039;not&#039;&#039;&#039; remove the actual polling. In other words, use the occurrence only to indicate that &amp;quot;it is probably a good time to check on that thing...&amp;quot;.&#039;&#039;&lt;br /&gt;
[http://lavag.org/topic/14998-how-to-open-front-panel-after-n-milliseconds-unless-the-operation-is-done/page__view__findpost__p__90901 You can see an example of this usage in this LAVA post.]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LONG STORY:&#039;&#039;&#039; How Occurrences are &amp;quot;generated&amp;quot;: When a VI is loaded (!) each &amp;quot;Generate Occurrence&amp;quot; function allocates exactly one unique occurrence. When the VI is running and this function is called it simply returns this one occurrence -- no matter how many times it is called (try putting one in a loop and examining its value using the probe, it will always have the same number). If you stop the VI and run it again, you will get the same value; only removing the VI from memory and loading it again will give you a &amp;quot;fresh&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
How Wait On Occurrence (WoO) works: Each WoO functions &amp;quot;remembers&amp;quot; what occurence it last waited on and what time it continued (because the occurence fired or because of a timout). When a VI is loaded (!) each WoO is initialized with a non existing occurrence. When a WoO is called and &amp;quot;ignore previous&amp;quot; is FALSE there are four potential cases:&lt;br /&gt;
&lt;br /&gt;
*The occurrence has *never* been set -&amp;amp;gt; in this case WoO waits&lt;br /&gt;
*The occurrence has been set since this WoO last executed -&amp;amp;gt; WoO does not wait&lt;br /&gt;
*The occurrence has last been set before this WoO last executed and last time this WoO was called it waited on the *same* occurrence -&amp;amp;gt; WoO will wait&lt;br /&gt;
*The occurrence has last been set before this WoO last executed but last time this WoO was called it waited on a *different* occurrence -&amp;amp;gt; WoO will *not* wait!!!!&lt;br /&gt;
&lt;br /&gt;
The first three cases are pretty clear, the last one may seem a bit strange. It will only arise if you have a WoO inside a loop (or inside a *re-entrant* VI in this loop) and it waits on *different* occurrences (out of an array, for example) or if it is inside a *non re-entrant* VI and the VI is called with different occurrences. These cases do generally not happen. The reason the WoO behaves this way is due to its implementation. Each occurrence &amp;quot;knows&amp;quot; the last time it has been fired, and each WoO remembers the occurrence it was last called with and what time it fired (or timed out). When WoO is called and &amp;quot;ignore previous&amp;quot; is FALSE, it will look at its input; if the input is the same as last time, it will look at the time of the last firing and wait depending on whether the time was later than last execution; if the input is *not* the same as last time, it will simply look at the time and wait depending on whether it has *ever* been fired.&lt;br /&gt;
&lt;br /&gt;
A possible (implementation) problem: It appears that occurances are &amp;quot;remembering&amp;quot; that they have been set during previous invocations of the program. One would think that generating an occurance should create a clean &amp;quot;non-set&amp;quot; occurance. This problem can be illustrated in a program that has three parallel loops with an abortable wait in each using occurances. If the program is stopped with the stop button things are fine. But if one waits until one of the random stop conditions triggers the end of the loops (generated from the other loops), the next time the program is run, the loops will execute only once and not loop at all. (The random terminate condition in the actual program is an error occuring in some piece of equipment.) Either this is a bug, or we are completely wrong on the use of occurances. Our example here is using the occurances in the &amp;quot;do not clear previous&amp;quot; mode. We would think that we will not remember ccurances from previous runs of the program since a new clear occurance should be created with the generate occurance icon. In this instance we can not use the clear previous occurances mode since we need a single occurance to stop multiple parallel loops.&lt;br /&gt;
&lt;br /&gt;
The reason for the problem: The first time the occurrence is set because of an error, the loops terminate, but the &amp;quot;stop button&amp;quot; loop is still running. When you click on the stop button, the occurrence gets triggered again (unneccessarily) and the program stops. The next time the VI runs, the WoO will not wait because of this extra trigger; and since you&#039;ll trigger again in the &amp;quot;stop button&amp;quot; loop, the VI won&#039;t work until it&#039;s reloaded from disk.&lt;br /&gt;
&lt;br /&gt;
A solution to the problem: Due to this behavior of occurrences, it is clear that one cannot use the &amp;quot;timed out&amp;quot; flag to determine when the occurrence fired. You will have to maintain some global information about your state, let&#039;s say in a global boolean called &amp;quot;FINISHED&amp;quot;. At the beginning of the program you would initialize it to false. If you have an error, set FINISHED to true, and then trigger the occurrence. After the WoO see if FINISHED is true (make sure you don&#039;t read the global until *after* WoO finished executing), if FINISHED is false continue with the loop. In the &amp;quot;Stop button&amp;quot; loop, also set FINISHED before you trigger the occurrence.&lt;br /&gt;
&lt;br /&gt;
BTW, if you don&#039;t like globals, you could use a VI with an [[Uninitialized shift register]] (LabVIEW 2 global), but the effect would be the same.&lt;br /&gt;
&lt;br /&gt;
Comments: One may think that occurrences are quirky, a pain to use and that they should be avoided. One might be right! Occurrences are very low level and you often have to add functionality to them in order to use them effectively. In other words, they are not for the faint of heart. Anything implemented with occurences can be also implemented without them, but maybe not as efficently. What occurrences do is to allow you to program synchronization in a way that does not use polling, and is thus &amp;quot;cheaper&amp;quot; in processor time.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: National Instruments encuorages the use of Notifier operations functions in place of the occurences for most operations.&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Synchronization]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Synchronization]]&lt;/div&gt;</summary>
		<author><name>AristosQueue</name></author>
	</entry>
	<entry>
		<id>https://labviewwiki.org/w/index.php?title=Error_Cluster_data_type&amp;diff=4171</id>
		<title>Error Cluster data type</title>
		<link rel="alternate" type="text/html" href="https://labviewwiki.org/w/index.php?title=Error_Cluster_data_type&amp;diff=4171"/>
		<updated>2010-02-26T15:48:08Z</updated>

		<summary type="html">&lt;p&gt;AristosQueue: /* Error Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Error Cluster  ==&lt;br /&gt;
&lt;br /&gt;
An error cluster contains a Boolean “status”, an I32 numerical “code” and a “source” string in that order. Any cluster with this structure is treated as an error cluster in LabVIEW. The default value, “status” = false, “code” = 0 and “source” empty, is shown in &#039;&#039;&#039;Figure 1&#039;&#039;&#039; for a typical control.&lt;br /&gt;
&lt;br /&gt;
[[Image:Error cluster control and terminal.JPG|frame|center|Figure 1:  3D error cluster control and terminal‎]]&lt;br /&gt;
&lt;br /&gt;
Note that the default terminal and wire color was changed from pink to dark yellow in LabVIEW 8.2 ([http://www.ni.com/pdf/manuals/371780b.pdf upgrade notes] p. 35). The “status” is true if an error has occurred but remains false for warnings. The “code” assumes positive and negative values (see “error codes, ranges of” in &#039;&#039;LabVIEW Help&#039;&#039;). The following ranges are reserved for users to define their own error codes:&lt;br /&gt;
* 5000 to 9999&lt;br /&gt;
* -8999 to -8000&lt;br /&gt;
* 500000 to 599999&lt;br /&gt;
Use &#039;&#039;&#039;Tools &amp;gt;&amp;gt; Advanced &amp;gt;&amp;gt; Edit Error Codes&#039;&#039;&#039; to create text files to define your own errors.&lt;br /&gt;
&lt;br /&gt;
The “source” identifies a VI and possibly its call chain as the origin of an error. Possible reasons for an error can be obtained from the &#039;&#039;&#039;Explain Error&#039;&#039;&#039; tool (see &#039;&#039;&#039;Figure 2&#039;&#039;&#039;). This tool is activated by selecting the &#039;&#039;&#039;Explain Error…&#039;&#039;&#039; item under the &#039;&#039;&#039;Help&#039;&#039;&#039; menu in LabVIEW or by right-clicking on any element of an error cluster with “status” true and selecting &#039;&#039;&#039;Explain Error&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Explain Error tool.jpg|frame|center|Figure 2:  Explain Error tool]]&lt;br /&gt;
&lt;br /&gt;
LabVIEW provides several VIs for working with error clusters. For example, the &#039;&#039;&#039;Error Cluster from Error Code.vi&#039;&#039;&#039; generates an error cluster based on a specified “code” (see &#039;&#039;&#039;Figure 3&#039;&#039;&#039;). You can also define custom codes using the &#039;&#039;&#039;General Error Handler.vi&#039;&#039;&#039; or by creating an XML-based text file in the &amp;amp;lt;labview\user.lib\ errors&amp;amp;gt; directory (see “error codes, defining custom” and “error codes, defining custom in text files” in &#039;&#039;LabVIEW Help&#039;&#039;). This VI outputs a “message”, like the “Explanation” from &#039;&#039;&#039;Explain Error&#039;&#039;&#039;, which identifies the “source” and describes possible causes associated with the “code”. This information can also be displayed using several different types of dialogs. This feature is commonly employed to identify errors in user interface applications.&lt;br /&gt;
&lt;br /&gt;
[[Image:Fig 3-VI connectors.JPG|frame|center|Figure 3:  connectors for Error Cluster from Error Code.vi and General Error Handler.vi]]&lt;br /&gt;
&lt;br /&gt;
Error clusters are also valid inputs to some comparison and array functions and can be used to control case structures and while loops (see &#039;&#039;&#039;Figure 4&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:Fig 3-error cluster examples.JPG|frame|center|Figure 4:  structures, comparison and array functions involving error cluster inputs]]&lt;br /&gt;
&lt;br /&gt;
The comparison functions &#039;&#039;&#039;Equal?&#039;&#039;&#039;, &#039;&#039;&#039;Not Equal?&#039;&#039;&#039;, &#039;&#039;&#039;Greater?&#039;&#039;&#039;, &#039;&#039;&#039;Less?&#039;&#039;&#039;, &#039;&#039;&#039;Greater Or Equal?&#039;&#039;&#039; and &#039;&#039;&#039;Less Or Equal?&#039;&#039;&#039; can operate in two modes. The output is Boolean in the &#039;&#039;&#039;Compare Aggregates&#039;&#039;&#039; mode, while a cluster of three Booleans corresponding to each component of the error cluster is generated in the &#039;&#039;&#039;Compare Elements&#039;&#039;&#039; mode (see &#039;&#039;&#039;Figure 5&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
[[Image:Comparison function indicators.JPG|frame|center|Figure 5:  typical indicators for both modes of a comparison function]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Select&#039;&#039;&#039;, &#039;&#039;&#039;Max &amp;amp;amp; Min&#039;&#039;&#039; and &#039;&#039;&#039;In Range and Coerce&#039;&#039;&#039; functions can output an error cluster. While the &#039;&#039;&#039;Max &amp;amp;amp; Min&#039;&#039;&#039; function returns ordered inputs in the Compare Aggregates mode, an output may not correspond to either error cluster if Compare Elements is selected (default). The &#039;&#039;&#039;Array Max &amp;amp;amp; Min&#039;&#039;&#039; function always returns ordered inputs corresponding to the first and last elements of the &#039;&#039;&#039;Sort 1D Array&#039;&#039;&#039; output. The primary sort is performed on “status”, with secondary ordering by “code” and then “source”. Strings are sorted by ASCII code starting with the leading character. Note that error clusters behave like their Boolean “status” value when connected to the selector terminal of a &#039;&#039;&#039;Select&#039;&#039;&#039; function and &#039;&#039;&#039;Case Structure&#039;&#039;&#039; or the conditional terminal of a &#039;&#039;&#039;While Loop&#039;&#039;&#039;. &amp;lt;!-- Bill VanArsdale, 21:18, 3 May 2007 (CDT) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Selection  ==&lt;br /&gt;
&lt;br /&gt;
A common programming issue in LabVIEW involves selecting between two or more error clusters. This process involves finding the cluster with “status” true or “code” not equal zero if no “status” is true. The &#039;&#039;&#039;Merge Errors.vi&#039;&#039;&#039; shown in &#039;&#039;&#039;Figure 4&#039;&#039;&#039; implements this search for up to three error clusters and an array of such clusters. This subVI is relatively fast with large error arrays. However, a significant portion of the execution time involves concatenation of inputs for the small arrays (&amp;amp;lt;10 elements) typical in most applications. This result suggests that time critical applications should be built around the immediate selection between two error clusters rather than their concatenation into an array. The simplest method of comparing the “status” of two error clusters involves the Select function (see &#039;&#039;&#039;Figure 6&#039;&#039;&#039;). &lt;br /&gt;
&lt;br /&gt;
[[Image:Simple error selector diagram.JPG|frame|center|Figure 6:  diagram for a simple error selector that does not detect warnings]] &lt;br /&gt;
&lt;br /&gt;
This function selects the first error cluster with “status” true, much like the &#039;&#039;&#039;Or&#039;&#039;&#039; function operating on Boolean inputs. Connecting “error 2” instead of “error 1” to the selector terminal is more analogous to the &#039;&#039;&#039;And&#039;&#039;&#039; function, which is typically less useful. While about 30 times faster than the &#039;&#039;&#039;Merge Errors.vi&#039;&#039;&#039; (LabVIEW 7.0), the &#039;&#039;&#039;Select&#039;&#039;&#039; function does not detect a warning (“status” false and “code” not equal zero). &lt;br /&gt;
&lt;br /&gt;
Diagrams for several VIs that compare error clusters and detect warnings are shown below (fastest to slowest). &lt;br /&gt;
&lt;br /&gt;
[[Image:Error selector diagram A.JPG|frame|center]][[Image:Error selector diagrams B.JPG|frame|center|Figure 7:  possible diagrams for an error selector that detects warnings]] &lt;br /&gt;
&lt;br /&gt;
These VIs execute about 5 times faster than the &#039;&#039;&#039;Merge Errors.vi&#039;&#039;&#039; (LabVIEW 7.0), even with normal priority execution. (&#039;&#039;&#039;Merge Errors.vi&#039;&#039;&#039; uses the “subroutine” priority.) Inputs to selector terminals in the first and second diagrams are passed to “error” for the cases not shown. Otherwise, “error 1” is checked for nonzero “code” since neither cluster has “status” true. The last approach uses the Max &amp;amp;amp; Min function in Compare Aggregates mode to order inputs. If just one of these clusters has “status” true, that input will be the “max” output since true &amp;amp;gt; false. However, this output must be checked for “status” true or “code” nonzero to determine selection. &amp;lt;!-- Bill VanArsdale, 21:18, 3 May 2007 (CDT) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Cluster as Execution Order Specifier  ==&lt;br /&gt;
&lt;br /&gt;
LabVIEW is a dataflow language and as such preferred way to specify execution order of block diagram items is to connect output of a block diagram item to an input of another block diagram item. There are situations when some certain execution order is required but the outputs of the items to be executed earlier cannot be connected to the inputs of the items to be executed later. In these situations error cluster is a preferred way to specify the execution order of the items. It&#039;s preferred over sequence structures in almost all use cases.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This can easily be achieved by a private replacement for the &#039;merge errors&#039; node, that also contains a &#039;No_Error&#039;&amp;amp;nbsp; constant:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:SerializeprocessesBD.png|merge errors with No_Errors]] The connector pane looks like this: [[Image:SerializeprocessesCP.png|Connector Pane for &#039;SerializeIndependentProcesses]]&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
It can be used like this: &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:SerializeprocessesUsage.png]] &lt;br /&gt;
&lt;br /&gt;
So a VI-Ref is opened independently if an error occured before, but after all preliminary portions of code had been finished. The printing actions relate to the eventual error of the OpenVI-Ref node only. All errors are merged as final action, so any error that might have shown up is reported, while the printing actions care only on VI-server related errors. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This little helper is too simple to provide its code as VI, though...&lt;br /&gt;
&lt;br /&gt;
== See also  ==&lt;br /&gt;
&lt;br /&gt;
*[[Error handling]] &lt;br /&gt;
*[[Error Case Structure]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Data_types]]&lt;/div&gt;</summary>
		<author><name>AristosQueue</name></author>
	</entry>
</feed>