INET_NTOA block

Short summary

Name

INET_NTOA

→POU type

→function

Category

more system blocks, network blocks, block with internal error diagnostic

Graphical interface

images/download/thumbnails/414780514/INET_NTOA-version-1-modificationdate-1534501939490-api-v2.png

Available since

  • version 1.105.0 (for logi.CAD 3) and version 3.15.0 of logi.RTS
    images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/warning.svg This block is supported for these →target systems or platforms:

  • version 1.109.0 (for logi.CAD 3) and version 3.19.0 of logi.RTS
    images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/warning.svg This block is supported for these target systems or platforms:

    • Raspberry Pi, Revolution Pi

    • platform WindowsX86 (incl. the built-in PLC under Windows)

    • platform LinuxX86

Functionality

The block converts the Internet host address, given in a network byte order, into an IPv4 dotted-decimal notation.

Inputs, outputs, return value


Identifier

→Data type

Description

Inputs:

inetAddr

STRING

IPv4 address in network byte order

Outputs:

rc

UDINT

return code of the function call:

  • 16#00000000: The operation is successful.

  • 16#81000008: The IPv4 address is invalid.

Return value:

DWORD

returns IPv4 address in dotted format ('127.0.0.1')


Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Internal error diagnostic for block

The block checks the following error cases:

The IPv4 address is invalid.

In such an error case, the output ENO of the block is set to value FALSE (or an equivalent). Moreover, the output rc returns the appropriate code (see the above table).

Example for usage within ST-editor

The example under "UDP_Open block" does not contain a usage of this block but of other blocks. Please study those in order to get to know how to use this block.

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.