Unions (Native C++) - Siemens Simatic S7-1500 Function Manual

Hide thumbs Also See for Simatic S7-1500:
Table of Contents

Advertisement

7.8.5

Unions (Native C++)

7.8.5.1
UIP
Description
Contains an IPv4 address.
Table 7- 391 UIP - Native C++
Syntax
Member
Example
S7-PLCSIM Advanced
Function Manual, 12/2017, A5E37039512-AB
union UIP
{
DWORD IP;
BYTE IPs[4];
};
DWORD IP:
The IP address in a single DWORD
BYTE IPs[4]:
The four elements of IP in descending order
Example for an IP address: 192.168.0.1
UIP.IP = 0xC0A80001
UIP.IPs[3] = 192, UIP.IPs[2] = 168, UIP.IPs[1] = 0, UIP.IPs[0] = 1
User interfaces (API)
7.8 Data types
307

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents