LabView Basics 2 - Writing data to an excel file
Summary
TLDRThis video tutorial demonstrates how to log temperature data from a DAC module into an Excel file. It covers the process of creating a shift register for tracking iterations, setting up data arrays for date, time, and temperature, and ensuring data is correctly recorded every second. Viewers learn about troubleshooting common issues, such as data format conversions and managing Excel's cell limitations. The tutorial emphasizes practical steps to effectively collect and store experimental data, making it an invaluable resource for anyone looking to automate data logging in their experiments.
Takeaways
- π§ Using a DAC module, you can accurately measure temperature for data logging.
- π Data can be logged into an Excel file to keep track of experimental results.
- π Implement a shift register to increment iteration counts automatically with each loop.
- β° Ensure your time logging includes seconds for accurate data tracking.
- π Build an array to combine various parameters such as date, time, temperature, and iteration count.
- π Convert numerical data to strings to ensure proper formatting before logging to Excel.
- ποΈ Excel has a maximum cell count limitation; be mindful of this when logging large datasets.
- π Change the file name once a certain iteration count is reached to prevent data loss.
- π οΈ Use boolean conditions to control when to change the file name during data logging.
- π This logging technique facilitates better organization and analysis of experimental data over time.
Q & A
What is the purpose of the DAC module mentioned in the transcript?
-The DAC module is used to measure temperature in the experiment, providing data that can be logged for analysis.
How can data be recorded into an Excel file according to the script?
-Data can be recorded into an Excel file by using a string constant connected to the 1D data and building an array of the data points, such as date, time, iteration, and temperature.
What is a shift register, and how is it utilized in the experiment?
-A shift register is used to store and increment a value each time the loop runs. In this case, it tracks the iteration count of the data being logged.
Why is it important to convert numeric data to strings in this process?
-Converting numeric data to strings is necessary for properly building arrays of data that will be recorded in the Excel file, as Excel requires data in string format for certain operations.
What issue did the speaker encounter with the Excel file output?
-The speaker initially faced a problem where not all data points were recorded in the Excel file, as it only captured the last data entry rather than stacking all the numbers.
How did the speaker resolve the issue with the Excel file output?
-The speaker resolved the output issue by ensuring that all data points were pinned to the file and correcting the configuration to allow all entries to be recorded.
What modification was made to include seconds in the time recording?
-To include seconds in the time recording, a constant was created to set the condition to true, allowing the recording of seconds in the output.
What limitation of Excel is mentioned regarding data recording?
-The script notes that Excel has a maximum cell count limitation, meaning that after a certain amount of data is logged, a new file name should be generated to continue recording data.
What does the speaker use to increment the iteration count?
-The speaker uses a numeric increment operation, specifically adding one to the iteration count each time the loop runs.
What steps did the speaker take to ensure the temperature was correctly recorded?
-The speaker warmed up the thermocouple and monitored the temperature reading, verifying that the data was logged properly after initiating the recording process.
Outlines
π Logging Data from a DAC Module
In this section, the speaker discusses the process of logging temperature data obtained from a DAC (Digital-to-Analog Converter) module into an Excel file. They outline steps for creating a string constant and connecting it to 1D data while emphasizing the need for adjustments to make the system work effectively. A shift register is introduced to track iterations in data logging, with the speaker demonstrating how to increment the count with each loop iteration. The need for an array to hold date, time, and temperature data is highlighted, along with a conversion step to ensure numerical data is formatted as strings for logging. The speaker encounters some issues with file saving but resolves them, ultimately confirming that the data is being recorded correctly.
π Ensuring Accurate Time and Temperature Logging
Continuing from the previous part, the speaker focuses on refining the logging process by building an array for date and temperature data, ensuring that the system captures time accurately, including seconds. They identify and resolve issues related to time stream settings and Boolean conditions that affect the logging of seconds. The speaker successfully demonstrates the system in action, confirming that iterations, temperature, and time are being recorded accurately every second. However, they note Excel's limitations in handling large datasets, suggesting strategies for changing file names once a certain cell count is reached to manage data effectively.
Mindmap
Keywords
π‘DAC module
π‘Excel file
π‘shift register
π‘iteration
π‘numeric increment
π‘array
π‘string constant
π‘time stream
π‘boolean values
π‘file management
Highlights
The process starts with reading temperature data from a DAC module.
The speaker outlines methods to log temperature data into an Excel file.
Using a string constant allows for the connection of data to be logged.
A shift register is introduced to keep track of data points being logged.
The iteration count is incremented by one each time the loop runs.
The need for a user-defined output location for the data file is discussed.
An indicator is used to visually confirm that the iteration count is working.
An array is built for storing date, time, and temperature data.
The importance of converting numerical data to string format for logging is emphasized.
Arrays for both temperature and time are constructed to accommodate changing values.
A specific naming convention for the output file is established.
The limitations of Excel regarding maximum cell count are acknowledged.
A boolean condition is used to manage the inclusion of seconds in the time logging.
The system demonstrates an ability to log temperature changes effectively.
File names can be dynamically changed once a certain number of iterations are reached.
A hands-on demonstration shows the temperature sensor's response to heat.
Transcripts
okay so let's say you've done that and
got a certain temperature off of your
DAC module and now you want to maybe do
a log you want to try to keep up with
what's being recorded in your your
experiment
so we've got our right to excel file and
there's a couple ways you can do this
but I'm going to try to do this one of
the easier ways quickest ways you
right-click choose a string constant
connect it to the 1d data it's not gonna
work as is once in a race or a
right-click here it changed to array now
we can add in our different look
controls into it
we can add in our different labels here
and so what I'm going to label these is
that show up on our excel file so he'll
we're looking at so what do date/time -
we'll start with the iteration okay so
we'll start with the iteration that we
want to know basically what data point
we're logging here so we're going to put
we're going to use what's called a shift
register so we're going to come to right
side of this hit add shift register put
a constant zero outside of it then we're
going to add one find a numeric
increment plus one so every time is loop
runs it's going to add one so as an
example let's just put in indicator here
to make sure it's working like it's
supposed to so every time this loop runs
over one second this indicator call that
iteration should go up by one every
second let's see oh it wants me to
figure out where I want to say this file
to which I haven't told it where to go
yet so I'm just going to save it to the
C Drive let the output okay then we'll
call it test okay
so this isn't working
this figure out why
and this should probably would be on the
outside of our loop
so doesn't keep asking us for file fetch
every time let's try this again alright
so now it's just gonna keep running and
this iteration should go up good alright
so we got our title of earth man
alright Federation is going up so now we
need to build an array for our date and
our time and for our we also need to add
another one of these for our temperature
we're actually recording which is here
okay so we've got four different things
we're looking at here alright so we need
to build an array of our date and our
temperature because our date may change
you let this run for a long time your
date may change so we need our time a
time Rayleigh long building array
pull the Ray over time
all right so we've got an array coming
out of here here and then our data here
so what we're going to do is we're going
to combine this temperature data with
our at the bottom and our iteration but
this needs to be a number to a string
let's do that
we got put in our conversion signal
manipulation from number there we go so
it's a string now this is a string and
this is a string so we got to build
array
there we go so now we can build the
array that we want
and we'll put that into our data file so
let's see if this works I'll start we're
going to give it a name just one XLS
running my fingers on the thermocouple
try to warm it up it should be warming
right now all right I'm gonna hit the
stop button you'll see it appeared in my
these other ones on the 19th generation
32-bit notice how it didn't record all
the way down through
so that recorded a very last one but it
did not stack the numbers that we wanted
let's figure out one of that happen
we don't want it to we already we do
want it to a pin to the file I want this
one too as well so that looks like that
is our problem all right let's go back
and test it again should start all over
again we're gonna call it the test -
accel x s I think that's right I can't
remember the new Linux OS all right so
let's let it go throw a couple
iterations will use my fingers start
warm up the thermocouple just a second
stop
so should now be here okay good deal and
we can see we had didn't like it for a
full minute so we got our date we've got
our time iteration is counting upwards
this means just going through iterations
but we've got our minutes we don't have
seconds so let's figure out why we don't
have seconds it's because our time
stream here we do one seconds and it's
again the same issue of having to tell
it true or false here so we're going to
create a constant it's naturally it's uh
yeah naturally false but we want to be
true because we do want seconds so we'll
try this again test three X and less
okay all right again we'll let it run up
and then I'm gonna push my fingers you
own the thermocouple tip and let it run
up and hopefully it should be showing a
increase in the temperature stop
let's see if that worked test three does
it show seconds yes it does and notice
our timing is working every one second
so we have seconds we have our iteration
we have our temperature so now it's
recording now Excel does have a
limitation where you know eventually it
will run out of the ability there's a
maximum cell count and so what you can
potentially do is once you get to a
certain amount change the file name and
you can do that with one of those
boolean numbers where your iteration
gets a certain amount you change your
file name
Browse More Related Video
Big Data with Mapbox | Handling Zoom Levels, Mapbox Tiling Service (MTS), Large File Uploads
Setup alerts in Grafana 10 with example
Creating a Data Source in ServiceNow
How To Automatically Add Excel Data to a SharePoint List with Power Automate
ReactJS Music Player #4: Integrating the Spotify Api in our React App
Data Warehouse System Processes | Lecture #5 | Data Warehouse Tutorial for beginners
5.0 / 5 (0 votes)