With Visu Utils library it's very easy to open dialog from code.
But how I can close it with this library?
Edwin, hope on your advice.
I need something like that:
I have not used visu utils but this is how I have closed dialogs in the past using this function:
This function needs to be called from the same task as your VisuElems.Visu_Prg
We had a button that set the PLC_PRG.xCloseDialog to TRUE
My understanding is you can't use the "CurrentVisu" Variable when using this. Hope this helps a little.
Thanks, it's seems like a solution.
Your function is not use sDialogName (so it works as "CloseAllDialogsForAllClients"), but I understand how I should edit code for my task.
I'm very appreciated.
I hope 3S include same FB in Visu Utils in next SP's.
Does anyone knows if this works also in TwinCat 3?
You are correct e.kislov and sorry about that. Was a solution for something else we were experimenting with. To do a specific dialog you would change it to this:
It works very well under TwinCat3.
Log in to post a comment.