Author |
Topic |
|
jokeraces
USA
24 Posts |
Posted - 04/01/2017 : 20:05:40
|
Hi everyone, After many more hours of work i am please to announce the second release of GQ PHP Charts package GQ-Charts2.0. These Charts are made for websites that have PHP. V2.0 is Now capable of reading directly from the GQ Geiger Muller Counter Data Logger 5.22+ pro without any additional processing. These charts have also been updated to work with current versions of PHP. These Charts were developed with the help of a freeware program available called PChart2 (www.pchart.net). I wish to share the php code with those that would like to post their Geiger counter readings on their websites. This code is also capable of being viewed on a normal desktop computer just as long as you have set up a PHP environment. Again this PHP code is custom made for use with the current version of GQ Geiger Muller Counter Data Logger 5.22+ pro. These charts will update automatically along with some other neat stuff, You must have the complete package to use. Link below....
please read on.
As an example this is a working 24 hour Averages chart: h**p://www.racers.net/radiation/pub-gphminmax24.php
The entire package i present here can be viewed online by clicking on the following links: The Above Chart: www.racers.net/radiation/pub-gphminmax24.php The Code: www.racers.net/radiation/pub-gphminmax24.php.txt
24 hr line Chart: www.racers.net/radiation/pub-gphline24.php The Code: www.racers.net/radiation/pub-gphline24.php.txt
24 hr Bar Chart: www.racers.net/radiation/pub-gphbar24.php The Code: www.racers.net/radiation/pub-gphbar24.php.txt
60 min Min/Max/Avg: www.racers.net/radiation/pub-gphminmax60.php The Code: www.racers.net/radiation/pub-gphminmax60.php.txt
60 min Line Chart: www.racers.net/radiation/pub-gphline60.php The Code: www.racers.net/radiation/pub-gphline60.php.txt
60 min Bar Chart: www.racers.net/radiation/pub-gphbar60.php The Code: www.racers.net/radiation/pub-gphbar60.php.txt
You can save the above code to file if you wish but you must edit these files a little, and you must have either download my package or the PChart development package to use. Links found below.
So not to infringe on pcharts copyrights and gpl the pChart library is released under two different licenses. And i quote:
quote: If your application is not a commercial one (eg: you make no money by redistributing it) then the GNU GPLv3 license (General Public License) applies. This license allows you to freely integrate this library in your applications, modify the code and redistribute it in bundled packages as long as your application is also distributed with the GPL license.
If your application can't meet the GPL license or is a commercial one (eg: the library is integrated in a software or an appliance you're selling) then you'll have to buy a commercial license. With this license you don't need to make publicly available your application code under the GPL license terms. Commercial license price are depending of your needs :
With that said i have made a bundled package available for free with all modules, sub-directorys, and files necessary to create your own working group of PHP graphs for your website. You can unpack these files anywhere on your webserver as long as your keeping all directories intact. There are the 6 charts above, the 60 min line chart, 60 min bar chart, 60 min Averages w/highs/ lows, 24 hr line chart, 24 hr bar chart, 24 hr Averages/highs/lows. All Charts Update Automatically. At the bottom this post you will find links to these chart packages or the PCharts full development package for those advanced users if you wish, but if your site is limited in data space you will not want the entire pchart package on your website. The PChart development package is very large and has many things you will never use. I make no ownership of this package but i will clam some ownership to the modified code, i want nothing for them, these are all free. I can only offer limited support for the bundle but all in all this package is very easy to set up and use on your website. You Will have to edit some of the settings to match your site, this can be done with a simple .txt editor. Read on:
What you will need are the following:
1. The latest version of the GQ Logger Pro software (v5.52 at this time) 2. A website that allows PHP. There are some great tools to see if your site will support PHP. If your site does not allow the use of PHP then you are out of luck with this package. A simple test would be something like this in a file <?php phpinfo(); ?> Here is a test tool. Save it and test on your server. www.racers.net/radiation/testphp.php.txt
Your settings on the logger will need to be set in the area of: "Auto save settings" - checked, "file type = CSV" , Path is to where you keep these php scripts (C:\path\to\the\scripts\radiation\, "Fixed file name (Rad)",can be any name you like as long as the php file path matches (line #7 in the code). "Restart counter is"- checked, "Auto Save period 0=hr 1=min, 0=sec" , "Append data on same filename" - checked. If you use the auto FTP function and not just saved locally then set the FTP functions to 0=hr 1=min 0=sec. You may need to increase the 1=min setting to 2 or 3 perhaps for a slow upload connection.
Settings in the php files i provide that will need editing.
Line 7 of the php code: $data_file_path = 'rad.csv'; This must match your fixed file name in the data logger software.
Around Line 154 or 174 or so, depending on the chart you are editing: $myPicture->drawText(350,33,"60 min chart - Update every 1 min - Last Update: $time",$TextSettings); you can change the text in this code to your liking anywhere between the "Text" quoted area. you can change position of the text by changing the first to sets of numbers ie: 350,33.
And the last thing is your path to the files. This includes the Class files, fonts, and the above CSV file paths. Depending on your server software, Whether Apache, IIS, or whatever, this path might have to look like this: $data_file_path = 'rad.csv';
or it may have to look like this: $data_file_path = './rad.csv';
Same with the class files, their paths may need to look like this: include("../class/pImage.class.php");
../ means up one directory ./ means same directory
My server needs neither as you see in the code.
Lastly, you will also need to set the Fonts directories too. Watch closely here. These paths are easy to overlook and miss, Missing one path anywhere in this code will cause the php script to fail. $myPicture->setFontProperties(array("FontName"=>"../fonts/Forgotte.ttf","FontSize"=>14));
NEW: included in the release is a batch file (Dateback.bat) which is a file for a future addition. I am currenting developing a history function to where it will use these files. You must have a folder named "Data" one level above where you keep your scripts. you will also have to edit this batch file to match your paths, it can be run local as a client side system and later uploaded to the website if need be or run on the host server. Run it once a day just before midnite via "Task Scheduler". With this you also need to use "tail.exe" (included) which comes from the full windows resource file available here (https://download.microsoft.com/download/8/e/c/8ec3a7d8-05b4-440a-a71e-ca3ee25fe057/rktools.exe). Add this to you local path or somewhere it can be run from the batch file. (not from your exposed web dir). Note: This batch file also helps to trim the size of your .csv datafile.
Thats about all there is to it. I hope you Enjoy these scripts. These scripts represent many hours of work in testing by myself Bob Holmes, With help from Ken True and the changes that have been made by the author of the the GQ Data logger to accommodate these scripts. If anyone wishes to modify the php scripts feel free to do so. Please offer your own setups and works which are much appreciated and welcomed. Feel free to comment if you wish. Cheers!
Complete package of GQ PHP Charts: www.racers.net/radiation/gq-charts2.0.rar
PChart Website: www.pchart.net/ PChart Development Download: [urlwww.pchart.net/download |
Give those people air! |
|
Reply #1
jokeraces
USA
24 Posts |
|
|
Topic |
|
|
|