Python Forum
reading raw data until condition is met, then stopping
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
reading raw data until condition is met, then stopping
#8
(Sep-26-2018, 04:42 PM)ikejima Wrote: unknowntothem,

Yes, when the second loop is complete and the adcx sensor is below 840, the first 'while' will continue to run and it will open the file again and write for 5 seconds.
When the second loop is complete and adcx sensor is greater than 840, the first 'while' stopped.

Do you want to log only the last 5 seconds of sensor until its value is 840 ?

Hi Ikejima,

I would like to log only 5 seconds of data in total, during the five second loop somewhere in the middle the raw data will exceed 840 for less than 0.01 seconds and generate a overblast pressure graph then return to a value below 840. The issue is that once this happens I need the program to stop recording these 5 second loops, saving the whole graph in the .csv file, so I can't stop the loop the moment that the value exceeds 840, I need to see the following 0.01 seconds of data also.

Thanks for all the info so far, I really feel like this is a noob question, I've gotten this far learning python online but can't quite figure out this last bit.
Reply


Messages In This Thread
RE: reading raw data until condition is met, then stopping - by unknowntothem - Sep-27-2018, 06:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading All The RAW Data Inside a PDF NBAComputerMan 4 1,364 Nov-30-2022, 10:54 PM
Last Post: Larz60+
  Reading Data from JSON tpolim008 2 1,100 Sep-27-2022, 06:34 PM
Last Post: Larz60+
  Help reading data from serial RS485 korenron 8 14,049 Nov-14-2021, 06:49 AM
Last Post: korenron
  How to map two data frames based on multiple condition SriRajesh 0 1,497 Oct-27-2021, 02:43 PM
Last Post: SriRajesh
  Help with WebSocket reading data from anoter function korenron 0 1,345 Sep-19-2021, 11:08 AM
Last Post: korenron
  Fastest Way of Writing/Reading Data JamesA 1 2,207 Jul-27-2021, 03:52 PM
Last Post: Larz60+
  Reading data to python: turn into list or dataframe hhchenfx 2 5,401 Jun-01-2021, 10:28 AM
Last Post: Larz60+
  Reading data from mysql. stsxbel 2 2,228 May-23-2021, 06:56 PM
Last Post: stsxbel
  reading canbus data as hex korenron 9 6,303 Dec-30-2020, 01:52 PM
Last Post: korenron
  Reading Serial data Moris526 6 5,429 Dec-26-2020, 04:04 PM
Last Post: Moris526

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020