A Better Way to Access Variables in Complex Programs in LabVIEW

By Ralph - Last updated: Monday, September 28, 2009 - Save & Share - Leave a Comment

In some LabVIEW programs, we need to access the value of a variable which is inside a loop from outside before the loop is over.

Most of us will use a local variable of a indicator to do this job. But this is not a good way to do this job. For example, if you use multiple locals in multiple places all linked to the same indicator, it’ll make it very easy to lose your control of the timing of the data. And in a worse condition, if you write the local variable in multiple places in your program, it will make a nightmare for sure. SO, it’s worthy to note that try not to use local variables unless absolutely necessary.

The best way to do this, I get so far, is passing data through a queue which will adds some kind of complexity, but you will have the full control of the data especially in a much complex program which has a lot of loops and much demands of data timing.

Related posts:

  1. How to Create a Programmatically Changed Text Label In LabVIEW In LabWindows/CVI, we can create a free label text control...
  2. The Difference Between Chart and Graph in LabVIEW We can use chart and graph to display our acquired...
  3. How to Ignore CR LF ASCII Codes in Serial Receive with LabVIEW In one of my recent LabVIEW projects, my application needs...

Posted in LabVIEW, VI Software • Tags: , , , Top Of Page

Write a comment