I may be reading it wrong, but it appears the VI you posted is guaranteed to almost never do anything. In the first frame of the sequence, you set
start logging to FALSE. In the second frame, you immediately read
start logging, and do nothing if it is FALSE. Unless you happen to have something else changing this global at exactly the right time, this VI will do nothing.
Unfortunately, I have not used DAQ in over ten years, so cannot competently comment on your setup code. However, it appears you are attempting to use the same physical channels for both your voltage and temperature measurements. You may want to consider using the DAQ assistant to generate your tasks. You can find it on the
Measurement I/O->DAQmx - Data Acquisition palette on the bottom left. When it finishes, you can keep the result as an Express style VI or generate full code to a subVI or straight to your block diagram.
There are a few structural issues with your code you may want to address.
- LabVIEW is a dataflow language with true parallel execution. As such, the delays you have scattered about your code may or may not do anything. If the code around them takes longer than the delay, then the delay will do nothing. This may be what you want. If it is not, then you will need to place the delay in a single frame sequence and route a wire through the sequence to enforce data flow timing. The standard method is to route one of your error wires through the sequence. Alternately, you can use one of the Express delays, which have error inputs and outputs to enforce data flow sequencing.
- Globals are poor way to pass data around. Race conditions will cause you endless problems. If you cannot use wires and controls (the preferred method), you can create singleton data objects from functional globals or single element queues. You can find documentation on these methods in the LabVIEW help, online on the NI website, or in these forums or the LAVA forums. Note that in some cases, globals are a good choice. Your stop complete flag may be an example of this, depending on the rest of your code. It could also be a very poor choice, if you are reading, processing, and writing to it in a couple of places. Using globals to pass large arrays around creates copies of the arrays, in some cases leading to memory issues. You probably won't have this problem, since your arrays are relatively small.
I hope this helps. I realize you are new to LabVIEW and dataflow is very different from the sequencing you get in a text language. Think of it as a flow diagram and it will probably be easier. Debugging with execution highlighting turned on makes things clearer. If you need any more help, let us know.