Recent

Author Topic: Tchart with log scale and needed real time on X-axis  (Read 10558 times)

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #15 on: December 24, 2023, 01:52:02 pm »
Hi WP,

4 gauges are working in the trend and in de logging, one question where is the description saved ?

Thanks,

Johan

wp

  • Hero Member
  • *****
  • Posts: 13334
Re: Tchart with log scale and needed real time on X-axis
« Reply #16 on: December 24, 2023, 04:16:54 pm »
where is the description saved ?
You mean that what I call "Comment" in the sample code? It only appears in the first lines of the file.

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #17 on: December 24, 2023, 04:28:10 pm »
Hi WP,
It's not into the CSV file ....see attachment.

Best,
Johan

wp

  • Hero Member
  • *****
  • Posts: 13334
Re: Tchart with log scale and needed real time on X-axis
« Reply #18 on: December 24, 2023, 04:39:37 pm »
Your attachment does not show the csv file...

Here it is working - see screenshot

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #19 on: December 24, 2023, 04:55:13 pm »
Thanks small mistake here, it works out of the BOX  :-*

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #20 on: December 24, 2023, 05:26:37 pm »
Perfect logging thanks WP.

Best,

Johan

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #21 on: December 26, 2023, 03:46:48 pm »
Test graph and communication with Teensy 4.0.

Best,
Johan


Teensy send via Serial some float values.
har lcd_buf[40];
float pressure1 = 0.0011;
float pressure2 = 0.0000025;
float pressure3 = 0.030;
float pressure4 = 0.00012;

void setup() {
 Serial.begin(115200);

}

void loop() {
   
  sprintf(lcd_buf, "%.2E", pressure1);
  Serial.print(lcd_buf);                    // array 0 in Pascal
  Serial.print(F(","));
  sprintf(lcd_buf, "%.2E", pressure2);
  Serial.print(lcd_buf);                    // array 1 in Pascal
  Serial.print(F(","));
  sprintf(lcd_buf, "%.2E", pressure3);
  Serial.print(lcd_buf);                    // array 2 in Pascal
  Serial.print(F(","));
  sprintf(lcd_buf, "%.2E", pressure4);
  Serial.print(lcd_buf);                    // array 3 in Pascal
  Serial.print(F(","));
  Serial.println();
 delay(10);
}

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #22 on: December 26, 2023, 03:50:25 pm »
The final beautiful vacuum realtime trend and data logger.
Thanks all for helping special thanks WP.

Best and happy holidays from the Netherlands.

Johan

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #23 on: December 28, 2023, 05:09:07 pm »
Work in progress ..... not done yet but the begin is there.
Best,
Johan

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #24 on: December 30, 2023, 07:23:12 pm »
Dear all, Werner,

My project is done perhaps a bit polishing but it works out of the box.

Some information,

Data comes from a Teensy 4.0 with a ADS1115 16bit analog converter.

Close valves will close all valves, vent has a count timer when vent is pushed the vent valve will close after 10 sec.

System is in manual mode so caution must be taken to avoid a turbo crash....

Best regards,
Johan



cdbc

  • Hero Member
  • *****
  • Posts: 2565
    • http://www.cdbc.dk
Re: Tchart with log scale and needed real time on X-axis
« Reply #25 on: December 31, 2023, 06:33:03 am »
Nice, congrats Johan  ;)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #26 on: January 03, 2024, 07:48:40 pm »

wp

  • Hero Member
  • *****
  • Posts: 13334
Re: Tchart with log scale and needed real time on X-axis
« Reply #27 on: January 04, 2024, 12:39:24 am »
Thanks for the acknowledgment...

I see in the video that you are loading the log file into LibreOffice Calc. You can do this directly by writing an ods file using the fpspreadsheet library. You can apply formatting directly in this file, and in the current (still experimental) version you can even generate a chart within the spreadsheet file. See the attached modified previous project.

Note that fpspreadsheet is required to compile the project. Note also that the version distributed by the Online-Package-manager at the moment does not allow to plot the data - comment out the line {$ifdef FPS_Chart} in this case. If you use the development version from CCR, however, (use svn or download the zipped snapshot from https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/), the chart can be generated (still with some flaws there and there, such as the incorrectly labeled date axis).

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #28 on: January 04, 2024, 10:17:53 am »
Hi WP,

Amazing stuff beautiful to see that this is possible!  :D

Thanks a lot this will help students log there data in a easy way.

Best,

Johan

Johan Holstein

  • Jr. Member
  • **
  • Posts: 67
Re: Tchart with log scale and needed real time on X-axis
« Reply #29 on: January 08, 2024, 04:01:14 pm »
Hi group, WP,

There is one option I really need and well I like to store a integer or string as example 10022334 or '10022334' on harddisk, I made a Tedit  where I can put in the number already.

When starting up my application for the first time 'pumpdown' than first I must store my unique number on harddisk say 10022334 this number can be any number if the number match the Teensy serial  number than the user can use the pumpdown program otherwise it will be closed.

In short what I need is write a number to harddisk with Tedit and read the number when starup my pumpdown program.

Perhaps someone has a simple solution?

Best regards,

Johan



 

TinyPortal © 2005-2018