02-02-2017 08:40 PM
Hello! I am new to LabView so forgive me for any mistakes. I needed to creat a VI that would conver an input temperature in either Celsius or Farenheit to its counterpart. I got that part done, but now need to record the input temperature to a binary file and graph every 10 seconds (take the measurement every 10 seconds). My professor said that he would give bonus points for not using express VIs for this part and this is what I am stuck on. I also need to be able to read an input file. Not sure What im doing wrong!
First file is what is most complete, second file is what is only for converting temperatures.
02-02-2017 09:11 PM
You have no loop in your VI where you are trying to log the data. So you will only log one data point.
I also noticed that your byte orders are different between your write and read operations. I recommend just getting rid of those controls and let the functions use the default (they will be consistent that way).
And use -1 for your numer of samples to read out of the file. That will read the entire file.
02-02-2017 09:21 PM
Good job getting started, looks like you have something functional.
You don't have any loops in your 111.vi, so I'm assuming you're using the Run Continuously button. This isn't the way to do it because you're running the entire code every single time.
That being said, you seem to have the concept of opening, writing, and closing the file using the binary VIs.
I would suggest you look in to how a State Machine architecture works. This can allow you to have states like "Create file", "Write", "Read", "Save and Close", "Convert to F", "Convert to C", etc.
The Simple State Machine template that ships with LabVIEW is really the best way for new developers to get familiar with LabVIEW while utilizing a semi-scalable architecture.
Here's a broad example of how a state machine works:
Also, since you're a student and interested in learning:
"Give me six hours to chop down a tree and I will spend the first four sharpening the axe." - Abraham Lincoln
Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-03-2017 11:53 AM
Thank you very much for your help I will work on this!!
02-03-2017 11:55 AM
This is great! I believe this might be the way to go! I will see if I can't figure out how to do this with the state structures. Thank you very much for the tutorials as well! I was working with the 'getting started' modules from NI and google searches only before.