Page 1 of 1

Customizable graph to display float information over time

Posted: Fri Oct 17, 2014 1:10 pm
by Gareth_SA
Hi all, I hope I have posted this in the correct place.

I have a Labjack U3-HV Data Acquisition module linked up and created my own signal conitioning and amplification break-out board to read temperature from a k-type Thermocouple. (See attached picture). Basically for a 0 - 250 degree Celcius range the output has been calabrated to linearly output that range over the following voltage 0.1 to 2.6v. This is getting read as a 'float' value that refreshes a a very high speed (too fast actually)

What I need is a visual representation of this information over time (Graphically) but I need the graph to be customisable in that I may want it to record the temperature for 10 minutes with one sample a second (or all the values averaged over a second) or I may need to record the temperature over a 24 hour period sampling the temperature one every minute. (a slider for samples from 1 second to 1 minute would be good, and a slider for duration from 1 minute to 1 hour?)

This needs to be displayed on a graph and can either then be exported as a *.CSV or similar file, or an option to export the graph as a JPG or similar (or both options preferably)

Where would I start with something like this? Also, ultimately I will be turning all this back-end into a easy to use front-end GUI.

Regards, and thank you in advance.

Gareth_SA

http://i123.photobucket.com/albums/o293/Gareth82/20141016_133601ed-small_zps512ab461.jpg

Re: Customizable graph to display float information over tim

Posted: Fri Oct 17, 2014 1:55 pm
by Drnkhobo
Hey Gareth!

If you search for any of the "scope" or "fft window" tags you should come up with some to help you. I guess they use a mono2float module for the array of data to represent and you could do the same except with temp data instead.

As far as customizing goes, most of them have options to customize ;)

Re: Customizable graph to display float information over tim

Posted: Sat Oct 18, 2014 3:52 pm
by Gareth_SA
Hi, thank you for your prompt reply!

Probably I am missing something easy, but the problem is that my data is coming IN as a float.

The mono2float block needs the signal coming in as a source, then you can trigger it to capture a float value and then plot that.

mine is coming out the labjack analogue port as a rapidly updating float value.

thank you in advance for any ideas.

Re: Customizable graph to display float information over tim

Posted: Sat Oct 18, 2014 4:46 pm
by Gareth_SA
Hi again.

I just created this mockup/pseudo code.

This is kinda what I am looking for.

http://i123.photobucket.com/albums/o293/Gareth82/Flowstone-whatIneed_zpsb9bcc4eb.jpg

Regards,

Gareth_SA

Re: Customizable graph to display float information over tim

Posted: Sat Oct 18, 2014 6:07 pm
by tulamide
For the first issue use sample and hold on both values and trigger them with a timer. The premade graph displays all have a value window dependent on the array size. That's unusable for your application. You'd need to develop your own drawing routine that just takes the two values and draws them in a fixed value window size.

Re: Customizable graph to display float information over tim

Posted: Sun Oct 19, 2014 5:17 am
by Perfect Human Interface
tulamide wrote:The premade graph displays all have a value window dependent on the array size. That's unusable for your application.


Why is that? Can't you just use a queue prim to cycle the array and graph it?

Re: Customizable graph to display float information over tim

Posted: Sun Oct 19, 2014 8:35 am
by tulamide
Perfect Human Interface wrote:
tulamide wrote:The premade graph displays all have a value window dependent on the array size. That's unusable for your application.


Why is that? Can't you just use a queue prim to cycle the array and graph it?

You could, but that would involve more than needed. For example, the whole array would be drawn each time. You'd have to fill the array in a certain order, that you have to keep track of, etc. While it is very easy to just draw one point or line at (time modulo whatever-width-you-like). No complex logic of filling the array, no unneccessary drawings. You could also very easily, and lightweighted on the cpu, draw to a bitmap this way and save it when filled (since printing from within FS isn't possible), before starting all over.

Re: Customizable graph to display float information over tim

Posted: Mon Oct 20, 2014 9:14 am
by Gareth_SA
Thank you very much for all your input and help.

Upon searching around a bit more I found a solution at another topic of the support forum here

http://www.dsprobotics.com/support/viewtopic.php?f=2&t=166

These examples (especially the bottom one here - http://www.dsprobotics.com/support/download/file.php?id=108 ) - Helped me a lot and I believe I can modify one of these for my project.

Regards,

Gareth_SA