Configuration.SetInitialValue (METH) ¶ METHOD FINAL SetInitialValue : ERROR SetInititalValue is a helper method in cases a static initialization in the context of a declaration can not working properly due the initialization sequences of the compiler. As soon as the FB Configuration is embedded when designing own function blocks and parameters from the embedded FB’s VAR_INPUT CONSTANT area are to be provided with initial values, it is time to consider the using of SetInitialValue . For a description of the individual parameters, please refer to the VAR_INPUT CONSTANT section of Configuration . InOut: Scope Name Type Return SetInitialValue ERROR Input itfRootDiagnostics IRootDiagnostics
Connection (FB) ¶ FUNCTION_BLOCK PUBLIC FINAL Connection EXTENDS Component IMPLEMENTS IConnection , IGroupElement, IConnection_Internal This Function Block represents a Pub Sub Connections. A Pub Sub Connection is a combination of protocol selection, protocol settings and addressing information. See IConnection for more details. If necessary create a ConnectionDiagnostics instance and connect it to itfConnectionDiagnostics . It will offer the diagnostic data of an Pub Sub Connection via the itfDiagnostics output. The udiPublishingInterval is set in WriterGroup function block. See: PubSubConnectionType at OPC Foundation . InOut: Scope Name Type Initial Comment Inherited from Output eErrorID ERROR Reason for STATE.ERROR Component xActive BOOL True 🠖 STATE.OPERATIONAL Component eState State See: State Transition Diagram at STATE Component Input Const itfAsyncProperty IAsyncProperty itfTSNContext ITSNContext uiPublisherId UINT itfIPAddress IIPAddress uiPort UINT UDP.PORT itfPublisherIP IIPAddress uiPublisherPort UINT UDP.PORT itfSubscriberIPSet IIPAddressSet itfConnectionDiagnostics IConnectionDiagnostics Input itfConfiguration IConfiguration Output itfDiagnostics IConnectionDiagnostics itfConnection IConnection Methods: SetInitialValue Structure: SetInitialValue (Method)
Connection.SetInitialValue (METH) ¶ METHOD FINAL SetInitialValue : ERROR SetInititalValue is a helper method in cases a static initialization in the context of a declaration can not working properly due the initialization sequences of the compiler. As soon as the FB Connection is embedded when designing own function blocks and parameters from the embedded FB’s VAR_INPUT CONSTANT area are to be provided with initial values, it is time to consider the using of SetInitialValue . The udiPublishingInterval is set in WriterGroup function block. For a description of the individual parameters, please refer to the VAR_INPUT CONSTANT section of Connection . InOut: Scope Name Type Initial Return SetInitialValue ERROR Input itfAsyncProperty IAsyncProperty itfTSNContext ITSNContext uiPublisherId UINT itfIPAddress IIPAddress uiPort UINT itfPublisherIP IIPAddress uiPublisherPort UINT itfSubscriberIPSet IIPAddressSet itfConnectionDiagnostics IConnectionDiagnostics 0
DataSet (FB) ¶ FUNCTION_BLOCK PUBLIC ABSTRACT DataSet IMPLEMENTS IDataSet , IGroupElement, IDataSet_Internal A DataSet can be thought of as a list of Variable Values. For publishing, a DataSet will be encoded into a DataSetMessage . One or more DataSetMessages are combined to form the payload of a NetworkMessage . See IDataSet for more details. A DataSet must be connected either to a Writer or to a Reader . Not connected to both at the same time! How to design a DataSet In the area of CODESYS Forge you will find an example of two different DataSet designs. A DataSet can be a simple listing of variables, or a complex structure with several variants of variable groups. Take a look to a simple DataSet design (DataMessage). It contains one member of any possible data type. The next example (DataMessage2) is sligtly more complex and integrates three different structures as variants of a UNION . The complete example DataSetDesign can be downloaded from the CODESYS Forge ( https://forge.codesys.com ). See: DataSet at OPC Foundation InOut: Scope Name Type Input itfReader IReader itfWriter IWriter Output vtVersion VersionTime Methods: PrepareValues SetInitialValue Structure: PrepareValues (Method) SetInitialValue (Method)
DataSet.PrepareValues (METH) ¶ METHOD PROTECTED PrepareValues : ERROR For safe handling of variables, the adresses of the references to these values must be calculated once per PLC cycle. This method must be implemented application specific in a way, that all adresses of the variables listed in this DataSet are calculated. InOut: Scope Name Type Return PrepareValues ERROR
Reader.SetInitialValue (METH) ¶ METHOD FINAL SetInitialValue : ERROR SetInititalValue is a helper method in cases a static initialization in the context of a declaration can not working properly due the initialization sequences of the compiler. As soon as the FB Reader is embedded when designing own function blocks and parameters from the embedded FB’s VAR_INPUT CONSTANT area are to be provided with initial values, it is time to consider the using of SetInitialValue . For a description of the individual parameters, please refer to the VAR_INPUT CONSTANT section of Reader . InOut: Scope Name Type Return SetInitialValue ERROR Input uiPublisherId UINT uiWriterGroupId UINT uiDataSetWriterId UINT itfReaderDiagnostics IReaderDiagnostics
ReaderGroup (FB) ¶ FUNCTION_BLOCK PUBLIC FINAL ReaderGroup EXTENDS Component IMPLEMENTS IReaderGroup , IGroup, IGroupElement, IReaderGroup_Internal This Function Block is used to represent the configuration parameters for Reader Groups . See IReaderGroup for more details. If necessary create a ReaderGroupDiagnostics instance and connect it to itfReaderGroupDiagnostics . It will offer the diagnostic data of an Reader Group via the itfDiagnostics output. See: ReaderGroup at OPC Foundation . InOut: Scope Name Type Comment Inherited from Output eErrorID ERROR Reason for STATE.ERROR Component xActive BOOL True 🠖 STATE.OPERATIONAL Component eState State See: State Transition Diagram at STATE Component Input Const itfReaderGroupDiagnostics IReaderGroupDiagnostics Input itfConnection IConnection Output itfDiagnostics IReaderGroupDiagnostics itfReaderGroup IReaderGroup Methods: SetInitialValue Structure: SetInitialValue (Method)
ReaderGroup.SetInitialValue (METH) ¶ METHOD FINAL SetInitialValue : ERROR SetInititalValue is a helper method in cases a static initialization in the context of a declaration can not working properly due the initialization sequences of the compiler. As soon as the FB ReaderGroup is embedded when designing own function blocks and parameters from the embedded FB’s VAR_INPUT CONSTANT area are to be provided with initial values, it is time to consider the using of SetInitialValue . For a description of the individual parameters, please refer to the VAR_INPUT CONSTANT section of ReaderGroup . InOut: Scope Name Type Return SetInitialValue ERROR Input itfReaderGroupDiagnostics IReaderGroupDiagnostics
Writer (FB) ¶ FUNCTION_BLOCK PUBLIC FINAL Writer EXTENDS Component IMPLEMENTS IWriter , IGroupElement, IWriter_Internal This Function Block is used to represent the Data Set Writer Parameters. See IWriter for more details. If necessary create a WriterDiagnostics instance and connect it to itfWriterDiagnostics . It will offer the diagnostic data of an Data Set Writer via the itfDiagnostics output. See: DataSetWriter at OPC Foundation . InOut: Scope Name Type Comment Inherited from Output eErrorID ERROR Reason for STATE.ERROR Component xActive BOOL True 🠖 STATE.OPERATIONAL Component eState State See: State Transition Diagram at STATE Component Input Const uiDataSetWriterId UINT itfWriterDiagnostics IWriterDiagnostics Input itfWriterGroup IWriterGroup Output itfDiagnostics IWriterDiagnostics itfWriter IWriter Methods: SetInitialValue Structure: SetInitialValue (Method)
Writer.SetInitialValue (METH) ¶ METHOD FINAL SetInitialValue : ERROR SetInititalValue is a helper method in cases a static initialization in the context of a declaration can not working properly due the initialization sequences of the compiler. As soon as the FB Writer is embedded when designing own function blocks and parameters from the embedded FB’s VAR_INPUT CONSTANT area are to be provided with initial values, it is time to consider the using of SetInitialValue . For a description of the individual parameters, please refer to the VAR_INPUT CONSTANT section of Writer . InOut: Scope Name Type Return SetInitialValue ERROR Input uiDataSetWriterId UINT itfWriterDiagnostics IWriterDiagnostics