March 29, 2024, 05:33:26 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Displaying real time data

Started by Andy, May 03, 2015, 05:14:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

Hi,

Firstly, thanks to everyone for helping with the graphs quest.

I would like to do a simliar graph(s) but for real time data.

I wanted to list it as a new topic as it's about displaying "real time" data on screen.

So, this is what I've got so far - and please bare with me:

My car diagnostics program can get real time data for around 90 different engine tests, each car is able to do different tests - depends on the make / model of the car.

Each individual test can take anything from 366 millisecs to 550 millisecs, just depends on the car.

When they perform a live data test, they get the option to record the details in a log file - e.g. 1150 - Engine RPM etc, and besides each test on screen, the values is printed.

Now thanks to you all, I was able to include browing to any log file that my program creates and display the details graphically.

My question is this.....


Could I display say 3 tests graphically whilst a live data test is being performed, rather than just reading from a file done previously???

What I would like is a kind of rolling graph, that only takes up x amount of screen, but updates each time that test is performed and a value is returned.

- I'm not sure how fast a graph can be drawn
- I'm not sure how long someone would run a test for

Can anyone advise me please if you have done something similar, or have ideas on how to try to do this??

Sorry if this is a long post....

If you can help, but have questions, please ask away.

Thanks,
Andy.
:)

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Look at the FT Demo type example shown here
http://www.ionicwind.com/forums/index.php?topic=4190.msg32708#msg32708

and you can make compact little charts like the other ones you did in the other thread
and there are not limits to the number of charts you can put on one screen

you should at least read up on it.  ;)
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Hi Larry,

Yes, thanks for that.

$24.95 is a great price for what it can do, unfortunately I'm still waiting to be paid for the new Enhanced version of my program, so I can't afford it at the moment - just hope someone will treat me for my birthday which is coming up in a few days time.

Thanks,
Andy.
:)


Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Hi Andy,

As long as you are sticking to graphs using the same size as the examples in your last project, you should not worry about the update speed. Guess you could easily enlarge the graphs as well, but then you'll have to experiment a little. And it does not really matter if you use your own graphs or use the library, but must admit that Larry's library will take a lot of the work load off your shoulders, and it will look proffesional.
The greatest challenge will be what kind of interface the meassuring equipment is presenting. Some brands use commports, some paralell ports, and some use an i2c bus etc. So this is where you should start.
Next you have to find at what speed the equipment communicate, and if they are using any protocol for communicating.

There is an old,  but great example on how to use an I2C bus posted here on the forum, part 1: http://www.ionicwind.com/forums/index.php?topic=4480.0  and part 2: http://www.ionicwind.com/forums/index.php?topic=4481.0.


Regards,
Egil
Support Amateur Radio  -  Have a ham  for dinner!

Andy

Hi Egil,

Thanks for the links... think you're right, Larry's way is probably the way to go.

Think there is no point re-inventing the wheel in this case, I will just have to wait until I can buy the add on.

I already know the communication speed, and my program works correctly with it to return live data to the screen, so when I get the add on I will work on adding in the live graph function.

Thanks,
All the best,
Andy.
:)

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Hi,

I did decide to have a go at a simulated live data graph as it would appear in my program.

See attached.

Each test takes around 550 millisecs to return the value of each test because of the response time of the ECU (enigine management system - "on board vehicle computer").

So I've simulated 8 passes using the same data rolling across, pausing for 550 millisecs.

Basically, it draws 5 bars, waits 550 millisecs, redraws the bars in white (so it appears they have been cleared), then redraws the graph where bar 5 would always be the new value once all initial 5 have been drawn.

Before drawing the new value for bar 5, it draws the previous value for bar 5 at position 4, and 4 goes to 3 etc - hope that makes sense.

This is something I can work with until I can get Larry's custom chart add-on.

Regards,
Andy.


Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

I just tried to use my chart library to create a little demo for Andy and it won't compile.
It says it can't find the gdiplus functions - the vary functions that I've been using to display all the stuff on Egil's mapview program.

Got to figure out what is going on.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Problem was on my computer -fixed
Attached zip has two exes
One showing Two variables plotted "like" real-time.  Timer should match rate your desired real-time sample rate

The other shows multiple bars from multiple variables but you can do multiple bars from a single variable if you desire(are simulate it anyway) there is a ton of flexibility built in there and you can put a lot of charts on one page

The 2nd zip shows 6 charts in one window.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

I have now received a copy of Larry's chart designer.

I have to say I would recommend it to anyone, this will certainly cut down my workload hugely.

I now have the "small" task of working out how I add it into my main program, like the old British Rail - I might not be the fastest - but I'll get there in the end!

Thanks Egil for your help
:)

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

the picture is in response to a question Andy asked in a PM
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library