A method of generating events based on automation system data in an intelligent programmable logic controller (110E; 110F), the method comprising: collecting , by the intelligent programmable logic controller (110E; 110F), automation system data; applying , by the intelligent programmable logic controller (110E; 110F), a context model to the automation system data to create contextualized data; during each control cycle included in a plurality of control cycles executed by the intelligent programmable logic controller (110E; 110F), performing an in-cycle event generation process by the intelligent programmable logic controller (110E; 110F), the in-cycle event generation process comprising: collecting automation system data, retrieving, by the intelligent programmable logic controller (110E; 110F), historical automation system data from a non-volatile computer-readable storage medium operably coupled to the intelligent programmable logic controller (110E; 110F); modifying, by the intelligent programmable logic controller (110E; 110F), one or more analytics specifications used by analytics components based on the historical automation system data; and using the analytics components to determine whether an event generation condition exists based on the automation system data; and generating one or more additional events if the event generation condition exists; and generating , by the intelligent programmable logic controller (110E; 110F), one or more events based on the contextualized data. collecting , by the intelligent programmable logic controller (110E; 110F), automation system data; applying , by the intelligent programmable logic controller (110E; 110F), a context model to the automation system data to create contextualized data; during each control cycle included in a plurality of control cycles executed by the intelligent programmable logic controller (110E; 110F), performing an in-cycle event generation process by the intelligent programmable logic controller (110E; 110F), the in-cycle event generation process comprising: collecting automation system data, retrieving, by the intelligent programmable logic controller (110E; 110F), historical automation system data from a non-volatile computer-readable storage medium operably coupled to the intelligent programmable logic controller (110E; 110F); modifying, by the intelligent programmable logic controller (110E; 110F), one or more analytics specifications used by analytics components based on the historical automation system data; and using the analytics components to determine whether an event generation condition exists based on the automation system data; and collecting automation system data, retrieving, by the intelligent programmable logic controller (110E; 110F), historical automation system data from a non-volatile computer-readable storage medium operably coupled to the intelligent programmable logic controller (110E; 110F); modifying, by the intelligent programmable logic controller (110E; 110F), one or more analytics specifications used by analytics components based on the historical automation system data; and using the analytics components to determine whether an event generation condition exists based on the automation system data; and generating one or more additional events if the event generation condition exists; and generating , by the intelligent programmable logic controller (110E; 110F), one or more events based on the contextualized data. <EOS>