GetLibVersionNumber (FUN) ¶ FUNCTION GetLibVersionNumber : DWORD This function has been automatically generated from the project information. InOut: Scope Name Type Return GetLibVersionNumber DWORD
IsLibReleased (FUN) ¶ FUNCTION IsLibReleased : BOOL This function has been automatically generated from the project information. InOut: Scope Name Type Return IsLibReleased BOOL
Sercos3HAL ¶ /// for internal use only
IPv4Address (FB) ¶ FUNCTION_BLOCK PUBLIC FINAL IPv4Address IMPLEMENTS IIPv4Address , IIPv4Address_Internal Encapsulates an IP address of version 4. Static initialization, as shown in the following code snippet. VAR myIPAddress : NBS.IPv4Address := ( ipAddress := '192.168.100.101' ); END_VAR Dynamic initialization, as shown in the following code snippet. myIPAddress.SetInitialValue ( '192.168.100.101' ); InOut: Scope Name Type Initial Input Const ipAddress IPADDRESS ‘’ Properties: CompressedIP ExplodedIP IPIsGlobal IPIsLinkLocal IPIsLoopback IPIsMultiCast IPIsPrivate IPIsReserved IPIsUnspecified IPLength IPVersion Methods: GetIPasByteArray SetInitialValue Structure: GetIPasByteArray (Method) IIPAddress CompressedIP (Property) ExplodedIP (Property) IPIsGlobal (Property) IPIsLinkLocal (Property) IPIsLoopback (Property) IPIsMultiCast (Property) IPIsPrivate (Property) IPIsReserved (Property) IPIsUnspecified (Property) IPLength (Property) IPVersion (Property) SetInitialValue (Method)
PingRequest (FB) ¶ FUNCTION_BLOCK PUBLIC FINAL PingRequest EXTENDS ETrigTo Checks the availability of the communication partner with a ping request. The time out value specifies the time to wait until reply InOut: Scope Name Type Comment Inherited from Input xExecute BOOL Rising edge: Starts defined operation FALSE : Resets the defined operation after ready condition was reached ETrigTo udiTimeOut UDINT Max. operating time for executing [µs], 0: No operating time limit ETrigTo Output xDone BOOL Ready condition reached ETrigTo xBusy BOOL TRUE : Operation is running ETrigTo xError BOOL TRUE : Error condition reached ETrigTo eErrorID ERROR ETrigTo Input Const itfAsyncProperty IAsyncProperty Input itfIPAddress IIPAddress IP address of the communication partner Output udiReplyTime UDINT Average reply time of the ping request in milliseconds Methods: RequestPing SetInitialValue SampleAction Structure: IActionProvider SampleAction (Method) RequestPing (Method) SetInitialValue (Method)
ResolveHostname (FB) ¶ FUNCTION_BLOCK PUBLIC FINAL ResolveHostname EXTENDS ETrigTo Attempts to resolve the sHostname to an IIPAddress . If an IP address is already specified as a parameter, its format is checked. The time out value has no effect for this function block. Below is an example of how to handle the itfIPAddress parameter. It is necessary to assign an instance of NBS.IPv4Address to a variable of type NBS.IIPAddress . VAR myResolver : NBS.ResolveHostname ; sHostname : STRING := 'www.codesys.com' ; myIPAddress : NBS.IPv4Address ; itfIPAddress : NBS.IIPAddress := myIPAddress ; udiCount : UDINT ; sIPAddress : NBS.IPADDRESS ; END_VAR myResolver ( sHostname := sHostname , itfIPAddress := itfIPAddress , udiCount => udiCount ); IF myResolver.xExecute AND myResolver.xDone THEN sIPAddress := myIPAddress.CompressedIP ; myResolver.xExecute := FALSE ; END_IF InOut: Scope Name Type Initial Comment Inherited from Input xExecute BOOL Rising edge: Starts defined operation FALSE : Resets the defined operation after ready condition was reached ETrigTo udiTimeOut UDINT Max. operating time for executing [µs], 0: No operating time limit ETrigTo Output xDone BOOL Ready condition reached ETrigTo xBusy BOOL TRUE : Operation is running ETrigTo xError BOOL TRUE : Error condition reached ETrigTo eErrorID ERROR ETrigTo Input Const itfAsyncProperty IAsyncProperty Input sHostname REFERENCE TO STRING udiIndex UDINT 0 Select a specific item, if more then one interface per hostname is avaiable Inout itfIPAddress IIPAddress Output udiCount UDINT The number of possible IP addresses for the sHostname specified Methods: ResolveHostname SetInitialValue SampleAction Structure: IActionProvider SampleAction (Method) ResolveHostname (Method) SetInitialValue (Method)
TCP ¶ TCP_Client (FunctionBlock) IClient Read (Method) SetAdapter (Method) Upgrade (Method) Write (Method) IOptionConsumer SetOptionProvider (Method) SetInitialValue (Method) TCP_Connection (FunctionBlock) IConnection GetClientAddress (Method) Read (Method) Write (Method) TCP_Processor (FunctionBlock) ITCPProcessor ProcessStream (Method) NonBlocking (Property) SetInitialValue (Method) TCP_Read (FunctionBlock) TCP_Reader (FunctionBlock) SetInitialValue (Method) TCP_Server (FunctionBlock) IOptionConsumer SetOptionProvider (Method) SetInitialValue (Method) TCP_Stream CreateSegment (Function) CreateSegmentPool (Function) SegmentPool (FunctionBlock) IDisposable ObjectDispose (Method) ISegmentPool GetSegment (Method) SetInitialValue (Method) Stream (FunctionBlock) IStream Read (Method) Write (Method) TCP_Write (FunctionBlock) TCP_Writer (FunctionBlock) SetInitialValue (Method)
TCP_Client (FB) ¶ FUNCTION_BLOCK PUBLIC FINAL TCP_Client EXTENDS LCon IMPLEMENTS IClient , IOptionConsumer Implements a TCP Client. To connect to a TCP Server at the endpoint defined with itfIPAddress and uiPort the input xEnable should set to TRUE . While setup the connection xBusy is TRUE but xActive is FALSE . After the connection is established xActive and xBusy is TRUE and the itfConnection output is valid. After closing the connection from the server side xActive becomes FALSE itfConnection become invalid and xDone becomes TRUE . itfConnection can be used as input itfConnection for function blocks TCP_Write , TCP_Writer , TCP_Read and TCP_Reader . InOut: Scope Name Type Initial Comment Inherited from Input xEnable BOOL TRUE : Activates the defined operation FALSE : Aborts/resets the defined operation LCon Output xDone BOOL Ready condition reached LCon xBusy BOOL TRUE : Operation is running LCon xError BOOL TRUE : Error condition reached LCon eErrorID ERROR LCon Input Const itfAsyncProperty IAsyncProperty itfTLSContext ITLSContext itfTSNContext ITSNContext Input udiTimeOut UDINT 0 Defines the time (µs) after which the connection setup aborts with active xError . itfIPAddress IIPAddress The related server address (With ResolveHostname , the conversion from a hostname to an ip address is possible) uiPort UINT The related server port Output xActive BOOL TRUE if a Connection is established itfConnection IConnection The established connection to the related server Valid, as long xActive = TRUE Methods: SetInitialValue Read SetAdapter SetOptionProvider Upgrade Write Structure: IClient Read (Method) SetAdapter (Method) Upgrade (Method) Write (Method) IOptionConsumer SetOptionProvider (Method) SetInitialValue (Method)
TCP_Connection (FB) ¶ FUNCTION_BLOCK PUBLIC FINAL TCP_Connection EXTENDS LCon IMPLEMENTS IConnection , IConnection_Internal Encapsulates the connection between client and server The TCP_Server function block will activate a related TCP_Connection function block, if a client has successfully connected to its server. itfConnection can be used as input itfConnection for function blocks TCP_Write , TCP_Writer , TCP_Read and TCP_Reader . InOut: Scope Name Type Comment Inherited from Input xEnable BOOL TRUE : Activates the defined operation FALSE : Aborts/resets the defined operation LCon Output xDone BOOL Ready condition reached LCon xBusy BOOL TRUE : Operation is running LCon xError BOOL TRUE : Error condition reached LCon eErrorID ERROR LCon Input itfServer IServer The related TCP_Server function block (One server function block can manage more than one connection function block). Output xActive BOOL TRUE if a Connection is established itfConnection IConnection The established connection to the related client Valid, as long xActive = TRUE Methods: GetClientAddress Read Write Structure: IConnection GetClientAddress (Method) Read (Method) Write (Method)
TCP_Processor (FB) ¶ FUNCTION_BLOCK ABSTRACT TCP_Processor EXTENDS LConC IMPLEMENTS ITCPProcessor Provides the ability to evaluate or manipulate the flow of segments between TCP_Reader and TCP_Writer via the specific implementation of the AsyncAction method. InOut: Scope Name Type Comment Inherited from Input xEnable BOOL TRUE : Activates the defined operation FALSE : Aborts/resets the defined operation LConC Output xBusy BOOL TRUE : Operation is running LConC xError BOOL TRUE : Error condition reached LConC eErrorID ERROR LConC Input Const itfAsyncProperty IAsyncProperty itfSegmentPool ISegmentPool Input itfReader IStream Output itfWriter IStream udiCount UDINT Properties: NonBlocking Methods: SetInitialValue ProcessStream Structure: ITCPProcessor ProcessStream (Method) NonBlocking (Property) SetInitialValue (Method)