Creating a data sample buffer while network failure appears

I have a project where energy data is collected by PFC200 based CODESYS V3 application. The data is stored to WAGO Cloud by WagoAppCloud library. Typically, when the PFC200 is not connected to the internet and to WAGO Cloud, the data is not sent to the Cloud system and there will be NULL values in the data plot. In this project, it’s necessary to buffer the data in the PFC200 during the network failure and send the data to the WAGO Cloud when the internet connection is available again. Then, all data is stored in the WAGO Cloud.

Does anyone have a sample program that buffers the data samples during network failure and then publishes the data to the WAGO Cloud (or any MQTT based) when the internet connection is available again? Network breaks can take from some minutes to 1-2 hour.

Hello Petrus,

Isn’t it the purpose of the Cache mode feature ?
Or maybe there is a WAGO Cloud limitation I don’t see ?

Hello,
Is there a sample program of the cache mode? I haven’t seen that before, but might be that I have missed it!

This feature doesn’t require any code on the IEC part, and is part of the Cloud Connectivity feature.
In the WBM you can select if the Cache mode uses RAM or SD card.
In RAM the cache size is limited to 3Mb. 512 Mb for SD card.
Depending on the message and the publish interval check if it’s enough for your 1-2 hours possible network failure.
See Cache mode in Cloud Connectivity app note : WAGO Global | 15719