Programming options
5.2 Structuring your user program is easy
Easy Book
50
Manual, 05/2009, A5E02486774-01
Parameter
Description
Subnet
Name of the Subnet to which the device is connected. Click the "Add new subnet"
button to create a new subnet. "Not connected" is the default.
Two connection types are possible:
•
The "Not connected" default provides a local connection.
•
A subnet is required when your network has two or more devices.
IP address
Assigned IP address for the CPU
Subnet mask
Assigned subnet mask
Use IP router
Click the checkbox to indicate the use of an IP router
IP protocol
Router address
Assigned IP address for the router, if applicable
In a PROFINET network, each device is assigned a unique Media Access Control address
(MAC address) by the manufacturer for identification. Each device must also have an IP
address. This address allows the device to deliver data on a more complex, routed network.
A subnet is a logical grouping of connected network devices. A mask (also known as the
subnet mask or network mask) defines the boundaries of a subnet. The only connection
between different subnets is via a router. Routers are the link between LANs and rely on IP
addresses to deliver and receive data packets.
After completing the configuration,
download the project to the CPU.
The IP address for the CPU and
for the router (if applicable) are
configured when you download the
project.
5.2
Structuring your user program is easy
When you create a user program for the automation tasks, you insert the instructions for the
program into code blocks:
●
An OB is a code block that typically contains the main program logic. The OB responds to
a specific event in the CPU and can interrupt the execution of the user program. The
different OBs perform specific functions, such as for startup tasks, for handling interrupts
and errors, or for executing specific program code at specific time intervals.
●
An FB is a subroutine that is executed when called from another code block (OB, FB, or
FC). The calling block passes parameters to the FB and also identifies a specific data