====== Screen Events ====== Screen events are events that only occur when the associated screen is being displayed. {{ :comfilehmi:screenevent:screenevent.png?nolink |screenevent}} ===== Screen Event Types ===== {{ :comfilehmi:screenevent:screenevent2.png?nolink |}} There are 4 screen event types: * 1. When Screen Opens: This event occurs when the screen is first displayed. * 2. When Screen Closes: The event occurs when the screen is no longer displayed (e.g. Immediately before transitioning to a different screen). * 3. Timer: This event occurs periodically while the screen is being displayed. * 4. Monitor by Expression : This event occurs when a variable or expression evaluates to a specified condition. * 5. Monitor Device : This event occurs when data in a device's memory meets a specified condition. ===== 1. When Screen Opens ===== Press the down arrow icon next to the event type to add actions to an event. {{ :comfilehmi:screenevent:screenactionadd.png?nolink |}} ===== 2. When Screen Closes ===== Press the down arrow icon next to the event type to add actions to an event. ===== 3. Timer ===== Press the down arrow icon next to the //Timer// node to add a new timer event. {{ :comfilehmi:screenevent:screentimeradd.png?nolink |}} The following window will appear. {{ :comfilehmi:globalevent:eventtimer1.png?nolink |}} Specify the period of for which the event will occur. In this example, the period is set to 1 second. Add actions to run when the event occurs. {{ :comfilehmi:screenevent:screentimeradd2.png?nolink |}} ===== 4. Monitor by Expression ===== Press the down arrow icon next to the //Expression// node to add a new expression event. {{ :comfilehmi:screenevent:screensusikeventadd.png?nolink |}} Enter the expression specifying the condition that must be met for the event to occur. {{ :comfilehmi:globalevent:susikwatch.png?nolink |}} Add actions to be executed when the event occurs. {{ :comfilehmi:screenevent:screensusikeventadd2.png?nolink |}} ===== 5. Monitor Device ===== Press the down arrow icon next to the //Device// node to add a new device event {{ :comfilehmi:screenevent:screendevicewatch.png?nolink |}} Enter the device address to monitor and specify the conditions that must be met for the event to occur. {{ :comfilehmi:globalevent:devicewatch.png?nolink |}} Add the actions to be executed when the event occurs. {{ :comfilehmi:screenevent:screendevicewatch2.png?nolink |}} ---- ===== Add Events ===== The following window will appear to provide the ability to add multi-actions to the event. {{ :comfilehmi:globalevent:eventadd.png?nolink |}} [[comfilehmi:multiaction:index|What is action?]] ====== Video ====== {{ :comfilehmi:screenevent:screenevent.mp4?850x454 |}} [[comfilehmi:#Field_Resources:|Back to ComfileHMI]]