LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView coding (8.2) explanation

I was hoping someone could explain the attached block diagram/coding that I have come across in LabView. Please could you explain it step by step, describing each block and in layman's terms as I am a new user. The coding was created for a dedicated CJC compensated data logger that has 9 individual thermocouples connected to it and also a thermopile. The coding also covers a data logger for a pressure transducer. An annotated diagram would also help. I would very much appreciate any help given.

0 Kudos
Message 1 of 5
(2,616 Views)

Data is acquired from 2 different DAQ devices and when a user clicks a front panel control, the data is saved to some file. It's very basic.  Is there something specific you don't understand? Please take the LabVIEW basic tutorial and turn on Context help to get an explanation of each function.

0 Kudos
Message 2 of 5
(2,587 Views)

Unfortunately i do not understand the use of the index array, array subset and the build array...also i do not understand the ue of the constants in the blue boxes..thanks for the help...much appreciated

0 Kudos
Message 3 of 5
(2,540 Views)

The things you are having trouble understanding are very basic to LabVIEW.  The tutorials Dennis linked should help you with those.

 

Lynn

0 Kudos
Message 4 of 5
(2,534 Views)

It is impossible to really inspect a VI by looking at a picture of the block diagram, because many things (e.g. the configuration of the big blue express VIs) is not visible.

 

In an nutshell (yes, this code was probably written by a nutcase :o), you have:

 

  1. The entire code is contained in a big while loop that will repeat the content once everything in it has completed. Most likely, the slowest node is the wait at the bottom, which is either one second or 60 seconds, depending on the value of the green wire containing the state of the "start recording" button. Since the button is only read every second or every 60 seconds, it might take a very long time into the program reacts to a user change of this button (first big mistake).
  2. The wait and the two DAQ assistants all execute in parallel because they don't depend on each other.
  3.  Two DAQ assistants interact with an analog input device. The upper one gives a single point (thin orange wire, displayed as pressure(bar)) while the lower one give an array (thick orange wire). An array is a collection of identical datatypes that can only differ in value. Each element is identified by its index, the first element is index 0.
  4. The raw array gets two operations: The first 9 elements are taken as a subset and displayed as Temp(c). (We cannot tell what kind of indicator that is, it could be a chart, graph, or simple array indicator, etc.). The 10th element is taken seperately using "index array" and displayed in the thermopile indicator.
  5. Steps 2, 3 and 4 execute always.
  6. If the start recording button has not been pressed and there is something in the FALSE case of the case structure, it will also execute, but we cannot tell form the picture.
  7. If the  "start recording" button is switched on, two things happen. A: the loop slows down to 60 seconds per iteration. B: the code inside the TRUE case of the case strucure will also execute. We also cannot tell the mechanical action of the button so we don't know if it switches only for one iteration or until the user turns it back off.
  8. In the true case, the various values (pressure, temp array, thermopile) and built back into a single array with 11  elements. This array is written to a file with a filename as entered into the path control. We cannot tell how it is written (e.g. appended or not) because we cannot see the express VI configuration.
  9. If the stop button is pressed, the code will stop once everything in the loop has finished. Because of potential race conditions, this could take up to 120 seconds. (another big mistake).
All clear? 😄

 

Message 5 of 5
(2,506 Views)