LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Synchronization LIFA

I have made a program for 3 nodes each measuring temperature at different location.

I have attached my program, I have write to measurement file. How will I do that in LIFA?

Wherein the graph  will show time and date, as well as save the data with time and date?

I cant somehow figure it out, or rather what to use? Any suggestions?

Dont mind the COM10, this is an overview of my program (not finals) need some ideas for time synchronization?

BTW I have used Nathan_B max31855 for this.

0 Kudos
Message 1 of 44
(9,453 Views)

Are you saying that each of these will have a different COM port?  That is the only way that it will work.

About logging the data, what timescale are you looking at logging the data?  Every 1 second?  Every 5 minutes?  As far as I know, that express VI is best for writing a bunch of data all at once (not just single peices of data per execution).

You can search the general forums with how to do the logging also (there are many more engineers over there that can help) because logging is completely independent from LIFA.

For the displaying of the data, you want to use a chart, not a graph.  So, replace your Waveform Graph with a Waveform Chart.

0 Kudos
Message 2 of 44
(4,047 Views)

Yup, I should be expecting 3 different COM ports from 3 different Arduino having their own Xbees.

Every 1 minute I suppose, Ill try to ask there then.

Will try to change that part.

BTW Have I done the things, LIFA should be in this programming, that only the synchronization is what I beed. The way I programmed it is from the knowledge I had in LIFA.

Thank you for your reply as always!

0 Kudos
Message 3 of 44
(4,047 Views)

Everything in the loop must execute once before it starts over so it will get all of the data withing a small time frame.  If you are logging only ever minute, the time difference between the three thermocouples is negligible.

I think I would probably use the Write to Spreadsheet file.  I had the express VI working really well with Excel files (it had a column for the time and one for each value and appended each new data point nicely) but then I realized that you are using LabVIEW 2011 which does not support that file type.

0 Kudos
Message 4 of 44
(4,047 Views)

Time difference? What I want to show on the chart or graphs are date and time, as well as the temperature, my problem is for example

at t=0 node1: 105C

at the labview it will be different once it is received. it will not be t=0, rather time diffenrence of milli? micro? deoending on the distance I suppose?

The purpose of Write to is for future references or something. Btw, what does "Send Receive" in LIF really does? I cant somehow figure it out?

0 Kudos
Message 5 of 44
(4,047 Views)

To display the data live, you simply need to replace the "waveform graph" with a "waveform chart".  This will show the date/time on the X-axis.

The difference in time betwen the multiple Arduinos will be very likely not be more than 1 second.  But, this assumes that your OS is not bogged down and the communication with the Arduino is efficient (meaning that it doesn't timeout).  Basically, the time difference between the measurements will be less than the wihle loop execution time before you have added any loop timing (you can calculate and display this if you want).  In most cases, this time difference between measurements will be negligible (meaning that the temperature won't change much if at all in that amount of time).

0 Kudos
Message 6 of 44
(4,047 Views)

What if I make it every 1 second? I will somehow will get a higher problem right?

0 Kudos
Message 7 of 44
(4,047 Views)

It really depends on how much code you put in your loop.  For simple code, it's unlikely to take that long to execute.

The other consideration that you need to think about is your thermal system.  How fast can it change?  What kind of time resolution do you need to have enough data to satisfy your goal?

If possible, I would just try it.

But remember, how you log and how often (because reading/writing from/to files is slower than most operations) can affect the timing.  Express VIs are, by their nature, slower than their alternative "by hand" implementation.

0 Kudos
Message 8 of 44
(4,047 Views)

I think our code will be simple, so we will have no problem with that, so I guess it'll be 30 seconds to 1 minute (will decide on this)

I see, it does not change that fast though, not instantly but little by little and increase little by little.

I guess in this project lots of trials will be made.

0 Kudos
Message 9 of 44
(4,047 Views)

You say "

Re: Time Synchronization LIFA     

Yup, I should be expecting 3 different COM ports from 3 different Arduino having their own Xbees."

This means you need a Xbee coordimator for each Xbee node.  Sure you can dsign your system this way if you have money to burn.  But budget minded engineers will only use one coodinator to communicate with three Xbee nodes.

hrh1818

0 Kudos
Message 10 of 44
(4,047 Views)