Beckhoff-USA-Community / SPT-Libraries

MIT License
70 stars 16 forks source link

Sensor.Trace('My Sensor'); It only works the first time then it doesn't work more times... #22

Closed runtimevic closed 11 months ago

runtimevic commented 11 months ago

Hello, Sensor.Trace('My Sensor'); It only works the first time then it doesn't work more times...

nshiggins commented 11 months ago

There is filtering in the trace logic which by default does not allow duplicate sequential messages. This is to keep you from hammering the event logger in case you have a condition that is not a 'one-shot'. You can override this with a library parameter. You'll need to add the SPT Base Types library to your project in order to edit: image

runtimevic commented 11 months ago

Hello, I have put the variable: ALLO_DUPLICATE_SEQUENTIAL_MESSAGES := FALSE; and if I cyclically put the same message with: Sensor.Trace('Mi Sensor'); the message comes out in the output constantly without stopping... Do I think it's wrong? Or how should I put it so that the same message doesn't come out repeatedly?

nshiggins commented 11 months ago

I'm not clear on the sequence of events. Originally with the default library parameter setting you said the duplicate messages were being filtered. Now they are streaming constantly? Did you modify the library parameter from with the Library Repository window?

On Fri, Jul 28, 2023 at 1:02 PM Runtimevic @.***> wrote:

Hello, I have put the variable: ALLO_DUPLICATE_SEQUENTIAL_MESSAGES := FALSE; and if I cyclically put the same message with: Sensor.Trace('Mi Sensor'); the message comes out in the output constantly without stopping... Do I think it's wrong? Or how should I put it so that the same message doesn't come out repeatedly?

— Reply to this email directly, view it on GitHub https://github.com/Beckhoff-USA-Community/SPT-Libraries/issues/22#issuecomment-1656019294, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMHY7MJ2U7XIK526VZUPUDXSPWDFANCNFSM6AAAAAA23K7JZA . You are receiving this because you modified the open/close state.Message ID: @.***>

runtimevic commented 11 months ago

No tengo clara la secuencia de eventos. Originalmente, con la configuración de parámetros de biblioteca predeterminada, dijo que los mensajes duplicados se estaban filtrando. ¿Ahora están transmitiendo constantemente? ¿Modificó el parámetro de biblioteca desde la ventana Repositorio de biblioteca? On Fri, Jul 28, 2023 at 1:02 PM Runtimevic @.> wrote: Hello, I have put the variable: ALLO_DUPLICATE_SEQUENTIAL_MESSAGES := FALSE; and if I cyclically put the same message with: Sensor.Trace('Mi Sensor'); the message comes out in the output constantly without stopping... Do I think it's wrong? Or how should I put it so that the same message doesn't come out repeatedly? — Reply to this email directly, view it on GitHub <#22 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMHY7MJ2U7XIK526VZUPUDXSPWDFANCNFSM6AAAAAA23K7JZA . You are receiving this because you modified the open/close state.Message ID: @.>

SPT Application Framework_Sensor_3 SPT Application Framework_Sensor_4

Now it doesn't filter the message, it comes out non-stop, that's what's happening to me now..., It is cyclically set to be carried out and the message is constantly coming out

nshiggins commented 11 months ago

Does it do the same after an activation/cold start?

On Fri, Jul 28, 2023 at 1:09 PM Runtimevic @.***> wrote:

No tengo clara la secuencia de eventos. Originalmente, con la configuración de parámetros de biblioteca predeterminada, dijo que los mensajes duplicados se estaban filtrando. ¿Ahora están transmitiendo constantemente? ¿Modificó el parámetro de biblioteca desde la ventana Repositorio de biblioteca? … <#m4116200006258059149> On Fri, Jul 28, 2023 at 1:02 PM Runtimevic @.> wrote: Hello, I have put the variable: ALLO_DUPLICATE_SEQUENTIAL_MESSAGES := FALSE; and if I cyclically put the same message with: Sensor.Trace('Mi Sensor'); the message comes out in the output constantly without stopping... Do I think it's wrong? Or how should I put it so that the same message doesn't come out repeatedly? — Reply to this email directly, view it on GitHub <#22 (comment) https://github.com/Beckhoff-USA-Community/SPT-Libraries/issues/22#issuecomment-1656019294>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMHY7MJ2U7XIK526VZUPUDXSPWDFANCNFSM6AAAAAA23K7JZA https://github.com/notifications/unsubscribe-auth/AEMHY7MJ2U7XIK526VZUPUDXSPWDFANCNFSM6AAAAAA23K7JZA . You are receiving this because you modified the open/close state.Message ID: @.>

[image: SPT Application Framework_Sensor_3] https://user-images.githubusercontent.com/53791834/256887321-4a4f523e-e75e-4a06-b410-3837a05cb8f7.PNG [image: SPT Application Framework_Sensor_4] https://user-images.githubusercontent.com/53791834/256887345-14703839-1e58-4cdf-8c42-b1f04edee628.PNG Now it doesn't filter the message, it comes out non-stop, that's what's happening to me now..., It is cyclically set to be carried out and the message is constantly coming out

— Reply to this email directly, view it on GitHub https://github.com/Beckhoff-USA-Community/SPT-Libraries/issues/22#issuecomment-1656029439, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMHY7K4BDC4CSD2EBGH4DTXSPW6LANCNFSM6AAAAAA23K7JZA . You are receiving this because you modified the open/close state.Message ID: @.***>

runtimevic commented 11 months ago

¿Hace lo mismo después de una activación/arranque en frío? On Fri, Jul 28, 2023 at 1:09 PM Runtimevic @.> wrote: No tengo clara la secuencia de eventos. Originalmente, con la configuración de parámetros de biblioteca predeterminada, dijo que los mensajes duplicados se estaban filtrando. ¿Ahora están transmitiendo constantemente? ¿Modificó el parámetro de biblioteca desde la ventana Repositorio de biblioteca? … <#m4116200006258059149> On Fri, Jul 28, 2023 at 1:02 PM Runtimevic @.> wrote: Hello, I have put the variable: ALLO_DUPLICATE_SEQUENTIAL_MESSAGES := FALSE; and if I cyclically put the same message with: Sensor.Trace('Mi Sensor'); the message comes out in the output constantly without stopping... Do I think it's wrong? Or how should I put it so that the same message doesn't come out repeatedly? — Reply to this email directly, view it on GitHub <#22 (comment) <#22 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMHY7MJ2U7XIK526VZUPUDXSPWDFANCNFSM6AAAAAA23K7JZA https://github.com/notifications/unsubscribe-auth/AEMHY7MJ2U7XIK526VZUPUDXSPWDFANCNFSM6AAAAAA23K7JZA . You are receiving this because you modified the open/close state.Message ID: @.> [image: SPT Application Framework_Sensor_3] https://user-images.githubusercontent.com/53791834/256887321-4a4f523e-e75e-4a06-b410-3837a05cb8f7.PNG [image: SPT Application Framework_Sensor_4] https://user-images.githubusercontent.com/53791834/256887345-14703839-1e58-4cdf-8c42-b1f04edee628.PNG Now it doesn't filter the message, it comes out non-stop, that's what's happening to me now..., It is cyclically set to be carried out and the message is constantly coming out — Reply to this email directly, view it on GitHub <#22 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMHY7K4BDC4CSD2EBGH4DTXSPW6LANCNFSM6AAAAAA23K7JZA . You are receiving this because you modified the open/close state.Message ID: @.>

¿Hace lo mismo después de una activación/arranque en frío? On Fri, Jul 28, 2023 at 1:09 PM Runtimevic @.> wrote: No tengo clara la secuencia de eventos. Originalmente, con la configuración de parámetros de biblioteca predeterminada, dijo que los mensajes duplicados se estaban filtrando. ¿Ahora están transmitiendo constantemente? ¿Modificó el parámetro de biblioteca desde la ventana Repositorio de biblioteca? … <#m4116200006258059149> On Fri, Jul 28, 2023 at 1:02 PM Runtimevic @.> wrote: Hello, I have put the variable: ALLO_DUPLICATE_SEQUENTIAL_MESSAGES := FALSE; and if I cyclically put the same message with: Sensor.Trace('Mi Sensor'); the message comes out in the output constantly without stopping... Do I think it's wrong? Or how should I put it so that the same message doesn't come out repeatedly? — Reply to this email directly, view it on GitHub <#22 (comment) <#22 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMHY7MJ2U7XIK526VZUPUDXSPWDFANCNFSM6AAAAAA23K7JZA https://github.com/notifications/unsubscribe-auth/AEMHY7MJ2U7XIK526VZUPUDXSPWDFANCNFSM6AAAAAA23K7JZA . You are receiving this because you modified the open/close state.Message ID: @.> [image: SPT Application Framework_Sensor_3] https://user-images.githubusercontent.com/53791834/256887321-4a4f523e-e75e-4a06-b410-3837a05cb8f7.PNG [image: SPT Application Framework_Sensor_4] https://user-images.githubusercontent.com/53791834/256887345-14703839-1e58-4cdf-8c42-b1f04edee628.PNG Now it doesn't filter the message, it comes out non-stop, that's what's happening to me now..., It is cyclically set to be carried out and the message is constantly coming out — Reply to this email directly, view it on GitHub <#22 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMHY7K4BDC4CSD2EBGH4DTXSPW6LANCNFSM6AAAAAA23K7JZA . You are receiving this because you modified the open/close state.Message ID: @.>

https://github.com/Beckhoff-USA-Community/SPT-Libraries/assets/53791834/c80937b9-9814-442a-965a-e96ba446c170

The same message keeps coming out.....

runtimevic commented 11 months ago

could you look at it?

MarkLewis-Beckhoff commented 11 months ago

Does it do the same after an activation/cold start?

nshiggins commented 11 months ago

Changes to constants need at least a PLC cold start to take effect. It's working as designed on my end:

https://github.com/Beckhoff-USA-Community/SPT-Libraries/assets/18381949/7afd2734-36d0-4591-a1b2-220c7837b2aa

runtimevic commented 11 months ago

https://github.com/Beckhoff-USA-Community/SPT-Libraries/assets/53791834/7c69515f-cf23-4542-993f-d702fbf718d9

watch the video, I hope you see it... it's not working right...

MarkLewis-Beckhoff commented 11 months ago

Hi Victor, I will email you offline I would like to look at your code.

nshiggins commented 11 months ago

Pushed SPT_Base_Types v3.2.3 today, which should fix this. String comparison for detecting duplicate message was overcomplicated.