GQ Electronics Technical Support Forum Active Users: / Visits Today:
Highest Active Users:
GQ Electronics Technical Support Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 GQ Electronics Forums
 2.GQ Geiger Muller Counter
 New release GQ-Charts2.0 php scripts

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an Image File
Check here to include your profile signature.
    

T O P I C    R E V I E W
jokeraces 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
1   L A T E S T    R E P L I E S    (Newest First)
jokeraces Posted - 04/21/2017 : 18:49:25
Hello all,
I added a new set of 24 hour x 5 minute samples for GQ-charts v2.0. If you have already installed the gq-charts2.0.rar package then just simply save the code to a php file, adjust the settings if necessary and upload to your folder, Otherwise you must first install the GQ package. I have tested a 24hrx1 minute chart but it gets to messy to read so this will not be released. So for now the 60 minute chart will have to do for 1 minute samples.
Also, for those of you who have been using the historic archive batch file that is included in the GQ-charts package i have now completed a working script to bring up a 24hr historic chart. My archived files go all the way back to mid 2012 up to current.. This has not been released just yet as it is still in testing but the good news is you can see and try it here as are the other scripts in a nicely implemented webpage:

www.racers.net/radiation

And for the new samples:

24hrx5m min/max Chart: www.racers.net/radiation/pub_minmax24x5min.php
The Code: www.racers.net/radiation/pub_minmax24x5min.php.txt

24hrx5m line Chart: www.racers.net/radiation/pub_line24x5min.php
The Code: www.racers.net/radiation/pub_line24x5min.php.txt

24hrx5m Bar Chart: www.racers.net/radiation/pub_bar24x5min.php
The Code: www.racers.net/radiation/pub_bar24x5min.php.txt

Complete package of GQ PHP Charts: www.racers.net/radiation/gq-charts2.0.rar

Enjoy and please let me know if you like them.
Cheers!

GQ Electronics Technical Support Forum © Copyright since 2011 Go To Top Of Page
Generated in 0.08 sec. Snitz's Forums 2000