Graphing Data Without Time


CamEra

Recommended Posts

Hi,

 

I am looking at using DaqFactory as a display system for an instrument installation. we have a buoy in a lake with thermistors every 10 metres from the surface to the bottom. Every hour data is telemetered back to our office. That data is held in a csv file. I would like to get DaqFactory to read that file (no issue there as I have done that many times before) and put the data into an array such that the array contains pairs of data - depth of thermistor and the temperature (there are only 15 thermistors hence the array would be 15x2). I would then like to plot these two against each other - the bottom axis being the temperature and the Y axis as the depth.

 

I have had a go at this but haven't been able to get it sorted. Do you know if it is possible to do it?

 

Regards

 

George

Link to comment
Share on other sites

Yes, you can certainly do it.  If I knew I was always getting two measurements, I'd probably just use two 15x1 arrays, but you can do it with a 15x2.  Just use a second [] for the second dimension.  For example, to add a row at the end:

 

private len = numrows(myArray)

myArray[len][0] = depth

myArray[len][1] = temperature

 

Note that you have to get the length first, as the length will change once you do the first assignment.

 

Then to graph, put:

 

myArray[][0] 

 

for the Y expression, and:

 

myArray[][1]

 

for the X.  Change the X axis scaling to Lin so it doesn't create a trend graph.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.