is your pointer set to the correct visu client? set a breakpoint in your client iteration and step through the active visu clients like programming system, targetvisu, webvisu,... and check the last usage value of each client
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You have to make shure every no longer updated pointers in the array have to be deleted and no longer used by your code!
Usage of this pointer access at your own risk :-)
Works with SP16. From SP17 and newer there will be warnigs etc. using this solution as I remember.
It will be great, if Codesys publishes a example or give a hint how to accesse this client values with the VisuUtil lib or other future-proof way!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With this snippet i was able to see the lastusage variable count, but it would not iterate between clients? i was only able to access the data of the target visu.
it threw an error with the array of pointers stating it was not able to convert etc. also when i tried it with the while loop it created an endless loop and crashed the program.
any ideas? Thankyou
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply,
i am using codesys SP16 patch 5 as this is the version that is compatible with my IFM controller.
i am accessing the lastusage variable from the VisuStructClientData structure through a pointer.
when i log in it lists the time since last log in but does not continually count, it remains a static value which isnt useful.
hopefully you can help. Thankyou
is your pointer set to the correct visu client? set a breakpoint in your client iteration and step through the active visu clients like programming system, targetvisu, webvisu,... and check the last usage value of each client
can you send me some code snippets of the declarations and code need i am unsure of how to set the pointer to the correct visu client.
Thanks i appreciate your help.
you can give this code snippet a try. It's extracted and simplyfied from my code:
Install VisuElemBase lib if not installed yet.
Execute in visu task:
You have to make shure every no longer updated pointers in the array have to be deleted and no longer used by your code!
Usage of this pointer access at your own risk :-)
Works with SP16. From SP17 and newer there will be warnigs etc. using this solution as I remember.
It will be great, if Codesys publishes a example or give a hint how to accesse this client values with the VisuUtil lib or other future-proof way!
Hi mate,
With this snippet i was able to see the lastusage variable count, but it would not iterate between clients? i was only able to access the data of the target visu.
it threw an error with the array of pointers stating it was not able to convert etc. also when i tried it with the while loop it created an endless loop and crashed the program.
any ideas? Thankyou
https://forge.codesys.com/forge/talk/Visualization/thread/b12815b7cd/#877a
there was a discussion about this thematic
searching in the talk helps to learn from others...
good luck, Dave