Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not printing data out in real time just printing out all at once at the end of loop. #36

Closed
stillpointx opened this issue Apr 8, 2019 · 3 comments

Comments

@stillpointx
Copy link

Greetings

I'm testing out Feedgnuplot and I'm having some issues.

I can execute a program ./rtauto-usb2001tc that gets real time temperature from a thermocouple and displays it on the screen. The data in the columns represent the timestamp, temperature in Celsius, and temperature in Fahrenheit.
See First_animation.gif of what the program ./rtauto-usb2001tc does when executed.

first_animation

The command I tried to plot real time data is below.
./rtauto-usb2001tc | tee output.csv | awk '{print $1 $3}' | feedgnuplot --stream --with linespoints

  1. It writes data to a file called output.csv (working)
  2. The x data is the 1st column (timestamp) and the y data (temperature) is the 3rd column (issues with x and y axis are not matching along with it's not plotting in real time, it plots all at once at the end)
    See Second_animation.gif of what the commands with feedgnuplot does when executed below.

second_animation

Thanks for a great app!!

@dkogan
Copy link
Owner

dkogan commented Apr 8, 2019 via email

@stillpointx
Copy link
Author

stillpointx commented Apr 9, 2019 via email

@stillpointx
Copy link
Author

stillpointx commented Apr 9, 2019

Thanks so much for your suggestions it helped me a lot and I got my old thermocouple plotting in real time. It's a long command to use and it looks crazy but it works for my needs.

./rtauto-usb2001tc 1200 | tee output_temp.csv | unbuffer tail -f output_temp.csv | stdbuf -o0 awk -W interactive '{print substr($2, 9, length($2)),$4;fflush();}' | feedgnuplot --stream --domain --title "Plasma water Temperature vs Time\n <process to run for 1200 seconds>" --set timestamp --ylabel 'Temperature' --xlabel 'Time' --set 'xtics rotate' --with linespoints

Rick

real_time_working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants