RT Datalogger Trigger in PLCNE 2021.6

Good afternoon, I see that there is a new feature in PLCNE 2021.6 - a Trigger. It does seem to be documented yet, though. I have been trying to work with it, but unsure how it works. I have a customer who is hoping to use the RT Datalogger, but only log during certain conditions. I thought maybe the trigger would help with this, but it doesn’t seem to be quite working that way. Do we need to datalog via FB to log only during certain conditions?

Hello, the trigger can be activated in the data logger configuration window. Here you can also define the trigger condition (see attached image). In this example the datalogger is triggered when the variable OP_diCounter is greater than 20000.

Hiallo Stefan, Thank you for the quick reply! I realize I word my question poorly, my apologies. I did get the trigger to work, I started the logging when a bit goes true, otherwise my set-up is similar to yours. I guess my question is: does the trigger only work once? I toggle my switch off and on every few seconds, but it appears that I only get about 20 records in the database when I open it

Hello, the trigger is fired when the condition is met and not only once. It will record the number of cycles specified before and after the event. With the default settings, you will get 21 records per event.

Hello, it seems I have a similar problem: Once the trigger condition is reached for the first time, the DataLogger starts logging and doesn’t stop anymore, even when the trigger condition is no more true. The condition has been true only for one task cycle (Task period 100ms). This is my config file: Arp.Plc.Eclr/NewProgram1.xRecord RisingEdge Here you can find the example project, the resulting db and the config file: https://github.com/M256-Automation/Test_TriggerDataLogger Thanks! Marcello

Hi Marcello, I can see that your configuration file includes postCycles=“0” The way the datalogger works with triggers, is that when the trigger condition goes true, the listed variable(s) will be recorded for “preCycles” task cycles before the trigger point, and for “postCycles” task cycles after the trigger point. If postCycles=“0”, like in your case, the variables will continue to be logged forever. I don’t think it’s possible to configure PLCnext Engineer to stop logging based on a signal, but perhaps someone else has an idea how this might be done.

Hello Martin, I don’t need to stop logging based on a signal, but to have just one record on the rising edge of a condition ( a user request from HMI, or push button, etc) I changed postCycles to 1. Now the listed variables are recorded once, but only once, even if the trigger variable goes from FALSE to TRUE several times… Thanks, Marcello

Yes, I am afraid this is a known issue. I will check the status of this issue and let you know if there is a workaround you can use while this is being fixed.

I have checked this issue and the short explanation is that, while the underlying DataLogger service is working OK, PLCnext Engineer currently does not allow the trigger to be reset on a DataLogger session. This is not a problem for people who are using the DataLogger from C++ code, since the C++ API allows the trigger to be reset. A work-around (suggested by someone else who had exactly the same problem) is to check the “Store Changes” option on the data logger session, and then in your code use each rising edge of the “trigger” variable to move the values you want to store into the DataLogger variables. At least one of the values must change, so you could also include a “count” variable in the list of logged variables that increments each time the trigger is set. Unfortunately this workaround requires additional variables and additional code. Hopefully this will be fixed in a future version of PLCnext Engineer.

Perfect. I’ll use the suggested work-around. Thanks, Marcello

Dear All,

I’m testing datalogger with FW 2022.0 I need the same thing : to start datalogger with a Trigger and stop if the Tirgger is false.
I verifyed and the issue has not been yet fixed , is it right ?
Greetings
Fabrizio

Hi Fabrizio,

Yes, you’re right, this feature is not in PLCnext Engineer yet.