Create an OPC UA method callable by an external OPC UA Client
In
FactoryTalk Optix Studio
, you can create an OPC UA method callable by an external OPC UA client and then edit its code in an external code editor.Prerequisites
Set the default external code editor. See Set the default code editor.
- Create an object type. See Create an object type.
- In theProject viewpane, right-click the object type and selectAdd custom behavior.
- Right-click the object type and selectEdit with .NET code editor (external).The external code editor opens. The following code is added in the NetLogic:[CustomBehavior] public class testTypeBehavior : BaseNetBehavior { public override void Start() { // Insert code to be executed when the user-defined behavior is started } public override void Stop() { // Insert code to be executed when the user-defined behavior is stopped } #region Auto-generated code, do not edit! protected new testType Node => (testType)base.Node; #endregion }
In the code editor, develop the method.
Provide Feedback