1. A non-transitory 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 in relation to an industrial process, wherein the value is a post-scan state to establish post-conditions associated with the execution of the add-on instruction; 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; and creating respective contexts associated with each execution of a plurality of executions of the add-on instruction, wherein the each context tracks a call to the add-on instruction, an initiator of the call, a location of the call, a passed reference to a complex data type associated with the add-on instruction, a passed reference to an object associated with the add-on instruction, and an instance of data of the add-on instruction.