Panasonic FP Series Programming Manual page 250

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

STRING_TO_IPADDR
_STEPSAVER
This function converts a STRING in IP address format into a value of the data type DWORD.
Description
The function uses for approx. 50 steps of generated code the basic instruction F76_A2BIN (see
page 637). The instruction expects that each octet consists of three characters with leading zeros.
Otherwise the PLC delivers an operation error.
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
Example:
Permissible format:
'Octet1.Octet2.Octet3.Octet4[Space]', e.g.: ' [192.168.206.4] '
Permissible characters:
Octets 1-4
Availability of STRING_TO_IPADDR_STEPSAVER (see page 1331)
PLC types
 If the format is wrong the result is 0.
 The conversion is such that the first octet represents the lowest byte
of the IP address and the fourth octet the highest byte of the ET-LAN
address. The format corresponds to the standard format as used in
"Standard Socket Application Interfaces", for example.
Data types
Data type
STRING
DWORD
STRING (IP-Address Format 00a.0bb.0cc.ddd) to DWORD
Decimal numbers "0"-"9", maximal 3 positions, with or without leading
zeros in the range 0-255
Comment
input variable
output variable
Conversion instructions
249

Advertisement

Table of Contents
loading

Table of Contents