Skip to content

DataLogger operation

Dear PLCnext Team,

I have two questions about the DataLogger feature(included in PLCnext runtime).

1) How to calculate the required memory size for the DataLogger ?

Since PLCnext controller has limited memory space for data logging,
I would like to estimate how long the PLCnext controller can store the data
using the DataLogger.


2) Is there any way to dinamically disable/enable the DataLogger during operation ?

As described above, PLCnext controller has limited memory space. To save the memory space,
I would like to enable the DataLogger only when the data record is needed. I want to do
this without stopping the PLCnext controller operation.

 

Sincerely,
Hiroki Kannon

Comments

  • Hello Hiroki,

    please see the answers to your questions below:

    1) How to calculate the required memory size for the DataLogger ?

    It is depends on your DataLogger configuration. If the Data should be logged permanently, you can use the following example for calculation:

    Memory Size for one Record of 10 Variables of datatype "Byte" =  uint64_Timestamp + 10_Variables x (b_Var_Value + uint64_EventCounterValue) + b_ConsistentDataSeries 

    The max. needed memory size for one record is: 8Byte + 10 x (1Byte + 8Byte) + 1Byte = 99 Byte

    Please note, If you use the option "storeChangesOnly="true",  you can spare Data-sink memory size.

    - Tipp: You can also use the SQLite Browser to open your DataBase and calculate the number of records during the recorded time-window (TimeStepLastRecord-TimeStepFirstRecord). In Windows Explorer you can see the DB-memory-size (if you copy the DB via WinSCP to the Windows directory).

     

    2) Is there any way to dinamically disable/enable the DataLogger during operation ?

    I'm not sure what you mean by disabling / enabling the DataLogger. If you want to deactivate / activate the DataLogger Service, this is not possible because the DL-Service starts in a FW component and cannot currently be deactivated dynamically.

    However, if you want to start / stop or configure / reconfigure the DataLogger session, you can. During operation you can start / stop or configure / reconfigure it via RSC-IDataLoggerService (see IDataLoggerService.hpp):


    virtual ErrorCode StartSession(const RscString& sessionName) = 0;
    virtual ErrorCode StopSession(const RscString& sessionName) = 0;
    virtual ErrorCode ConfigureSession(const RscString& sessionname, const std::vector& properties) = 0;

     

    If you have additional questions, plese don't hesitate to ask!

    Best Regards

    Eduard

     

  • Hello Eduard-san,

    Thank you for your quick response.

    For the answer of Q1, I understand your clarification, Thanks.
    I will also check the memory size on SQLite Browser.

    For the answer of Q2, you are correct. I meant dynamic activation/deactivation of DataLogger.
    I will check the RSC-IDataLoggerService.

     

    Sincerely,
    Hiroki Kannon

Sign In or Register to comment.