only in every n-th cycle [...] snippet. traceObject.every_n_cycles [...] Object.add_trace_variable(variableName="PLC_PRG.a"+str(i)) Next, a Script