LabVIEW FOR loop with DAQ Assistant producing array output

  • Thread starter WWCY
  • Start date
  • Tags Tags
    Flow
1 reply · 2K views · last reply
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?
LabVIEW block diagram: a For Loop with N from an array size input, containing two DAQ Assistant blocks, a subtract block labelled V(diode) = Vs - Vr, a divide block by 998 labelled Current, and a Vresistor wire to an indicator.
 
Attachments
  • LabVIEW block diagram: a For Loop with an N input from an array size control, containing two DAQ Assistant blocks, a subtract node, a divide node by 998, and Vresistor wired to a output array indicator.
    Screenshot 2019-04-15 at 2.03.59 AM.png
    26.8 KB · Views: 628
  • LabVIEW block diagram with a For Loop containing two DAQ Assistant blocks, subtraction and conversion nodes, feeding an IV Graph and a Write to Text File block.
    main.jpg
    45.6 KB · Views: 424
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?