Skip to content

Hmi Button Function

Hello there,

I have the following problem:

I have an HMI button and when the user presses it I want to signal my C# code to create a file and then download that file to the device on which the user pressed the button.

The above was my first thought but it does not work since I correctly signal my C# code to create the file but that happens AFTER the actual command execution since the HMI commands are executed first before diving into the C# code.

My next thought was this:

I actually have a task which will signal my C# code first and on the next cycle download the file.

The only problem here is that I do not know if I can write a command to download the file the same way as the Hmi Button on the first picture. Is there a command I can replace my comments with in order to achieve what I want?

Maybe there is another better way?

Thank you again for any answer in advance.

-DM

Comments

  • edited March 2024

    Hello!

    You have to dial with this task in some async manner, and use addition flag, that file is ready for download.

    This flag will trigger download event, when trigger rise edge detected. This will base on "Action on data" dynamic property. You should set this flag in you plc, after C# code comleted and file is ready.


Sign In or Register to comment.