07-30-2018 06:43 PM
Hello,
This is my first labview code and have been trying to do make a simple task.
I have a cDaq9178 and want to use it to record voltage readings from 2 different voltage taps and a current reading. I want to plot the voltages vs current and record and export the data as 3 columns (tap 1, tap 2, current) for the entire time it is recording until I hit stop.
With my current set-up, my excel file shows 3 columns, however, it only produces one line of recorded data and instead of showing me the 3 different inputs, it copies the first column onto the other two.
I am not sure what step to take to fix this issue, I hope someone can provide some help.
I have attached both the Labview file and the excel.
07-30-2018 09:45 PM
I cannot tell, from the code that you have provided, the following:
I also cannot tell (because you are using an information-obscuring Express VI, instead of using more straight-forward LabVIEW functions) where/how you are savind data to Excel. i don't even see a file name mentioned.
What I do see, which puzzles me, is that your DAQmx Read function is for N channels, 1 sample. Surprise! Your Excel file contains 3 channels, 1 sample. Maybe your code is doing what you told it to do, instead of what you wanted it to do (even LabVIEW code has the bad habit of doing "what we say" instead of "what we want").
I'm guessing that you have a Task defined in MAX called Use All. I would be very interested in knowing the parameters of this Task. Using a MAX Task, while convenient, has the disadvantage that the parameters are "remote" from the code. Something that's almost as convenient as a MAX Task, but can "stay with the code", is to embed your "project" in a LabVIEW Project File (.lvproj). A Project allows you to create a New DAQmx Task (much like MAX, with most or all of the same parameters), but it is associated with the Project, and can be provided "as code" to allow others to see and understand the context under which your code runs.
Bob Schor