1. A tangible computer-readable medium having instructions stored thereon that, in response to execution, cause at least one device including a processor to perform operations, comprising: obtaining a value of a state parameter associated with an add-on instruction called by a user program executing via an industrial device; determining control logic to execute by the add-on instruction based on the value of the state parameter; and initiating execution of the determined control logic.