LabVIEW: Need help figuring out programme flow

  • Thread starter Thread starter WWCY
  • Start date Start date
  • Tags Tags
    Flow
Click For Summary
SUMMARY

The discussion focuses on the functionality of the FOR loop in LabVIEW, specifically regarding the handling of an array (Vsource) and its interaction with DAQ Assistant modules. The user seeks clarification on whether DAQ Assistant 2 outputs a single scalar (Vresistor) per iteration and why the resulting data conversion function produces a double array instead of a scalar. The conversation highlights the importance of understanding data types and flow within LabVIEW programming, particularly for beginners.

PREREQUISITES
  • Basic understanding of LabVIEW programming environment
  • Familiarity with DAQ Assistant functionality in LabVIEW
  • Knowledge of data types in LabVIEW, specifically dynamic data type
  • Concept of FOR loops and iteration in programming
NEXT STEPS
  • Explore LabVIEW's data types and their conversions
  • Learn how to utilize the DAQ Assistant effectively in LabVIEW
  • Investigate the behavior of arrays and scalars in LabVIEW programming
  • Study the implementation of FOR loops in LabVIEW with practical examples
USEFUL FOR

This discussion is beneficial for beginners in LabVIEW, engineers working with data acquisition systems, and anyone looking to understand the intricacies of programming loops and data handling in LabVIEW.

WWCY
Messages
476
Reaction score
15
Hi all, I'm having some trouble trying to figure out how the FOR loop is working for my code (attached below). I'll try to describe what I think is happening so that I can be corrected. Thanks in advance! I have only been using LabVIEW for 3 days, so I'd appreciate if explanations aren't too technical.

1. To the left of the FOR loop, an array (call it Vsource) is passed into the loop. The loop takes in one element from Vsource per iteration. I'll try to consider what goes on in each iteration
2. The element goes through into DAQ Assistant 1 where it is input to the apparatus (some circuit).
3. The element simultaneously flows into the "minus" function
4. From DAQ assistant 2, a measurement value (Vresistor) is output in dynamic data type. This is where I get confused. I'm supposing that this value for Vresistor is a single scalar that corresponds to the single element in Vsource.
5. This Vresistor value flows to a) the "minus" function and then to a data conversion function, and b) straight to a data conversion function. In both cases, somehow an array is output from the data conversion function.

My questions are:
a) If I am right and DAQ2 does output one scalar per iteration, why is the converted data type a double array, rather than a double scalar?
b) If I am not right...what exactly is happening?
Screenshot 2019-04-15 at 2.03.59 AM.png
 

Attachments

  • Screenshot 2019-04-15 at 2.03.59 AM.png
    Screenshot 2019-04-15 at 2.03.59 AM.png
    26.8 KB · Views: 602
  • main.jpg
    main.jpg
    45.6 KB · Views: 389
Physics news on Phys.org
Is it possible that given an input value the circuit being measured will output a time based array of double values? And you can either use then or select the last value for your for box?
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
7
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K