cancel
Showing results for 
Search instead for 
Did you mean: 

How to login data hourly using STWIN sensor tile?

Mrahm.1
Associate II

I am trying to use STWIN sensor tile for logging the sensors data every 30 minutes, could anyone please help me how to modify codes in HS-datalogin?

1 ACCEPTED SOLUTION

Accepted Solutions
SPRAD.1
ST Employee

HS_DataLog can stream sensor data via USB or store them into an SD Card.

When using the SD Card, it is possible to select between the "continuous" or the "intermittent" modes just by changing the HSD_SD_LOGGING_MODE define in main.h file.

Continuous Mode

  #define HSD_SD_LOGGING_MODE    HSD_SD_LOGGING_MODE_CONTINUOUS

Press the USR button to start and stop the acquisition.

Data are stored in a single folder, one single file for each sensor for the complete duration of the acquisition.

Intermittent Mode

  #define HSD_SD_LOGGING_MODE    HSD_SD_LOGGING_MODE_INTERMITTENT 

The acquisition can be started/stopped by pressing the USR button.

In this case the acquisition is not continuous and for each cycle:

1- A new folder is created (STWIN_###)

2- Data are stored in the new folder, one file for each sensor. The acquisition lasts for the amount of seconds defined by the user --> HSD_LOGGING_TIME_SECONDS_ACTIVE

3- The acquisition is then paused for the amount of seconds defined by the user --> HSD_LOGGING_TIME_SECONDS_IDLE

4- back to step 1

The duty cycle parameters can be changed in sdcard_manager.h file:

#if (HSD_SD_LOGGING_MODE == HSD_SD_LOGGING_MODE_INTERMITTENT)

 /* Define the duty cycle of the data logging */

 #define HSD_LOGGING_TIME_SECONDS_IDLE    5                              

 #define HSD_LOGGING_TIME_SECONDS_ACTIVE  (15*60 - HSD_LOGGING_TIME_SECONDS_IDLE)  

#endif

Hope it helps

Regards

View solution in original post

2 REPLIES 2
SPRAD.1
ST Employee

HS_DataLog can stream sensor data via USB or store them into an SD Card.

When using the SD Card, it is possible to select between the "continuous" or the "intermittent" modes just by changing the HSD_SD_LOGGING_MODE define in main.h file.

Continuous Mode

  #define HSD_SD_LOGGING_MODE    HSD_SD_LOGGING_MODE_CONTINUOUS

Press the USR button to start and stop the acquisition.

Data are stored in a single folder, one single file for each sensor for the complete duration of the acquisition.

Intermittent Mode

  #define HSD_SD_LOGGING_MODE    HSD_SD_LOGGING_MODE_INTERMITTENT 

The acquisition can be started/stopped by pressing the USR button.

In this case the acquisition is not continuous and for each cycle:

1- A new folder is created (STWIN_###)

2- Data are stored in the new folder, one file for each sensor. The acquisition lasts for the amount of seconds defined by the user --> HSD_LOGGING_TIME_SECONDS_ACTIVE

3- The acquisition is then paused for the amount of seconds defined by the user --> HSD_LOGGING_TIME_SECONDS_IDLE

4- back to step 1

The duty cycle parameters can be changed in sdcard_manager.h file:

#if (HSD_SD_LOGGING_MODE == HSD_SD_LOGGING_MODE_INTERMITTENT)

 /* Define the duty cycle of the data logging */

 #define HSD_LOGGING_TIME_SECONDS_IDLE    5                              

 #define HSD_LOGGING_TIME_SECONDS_ACTIVE  (15*60 - HSD_LOGGING_TIME_SECONDS_IDLE)  

#endif

Hope it helps

Regards

Thank you very much... it is working very well. the problem solved. Also in the similar way I found  #define  Autosave which is already in the main.h .. therefor I just changed the logging and pause times in the Autosave definition .

Best regards,