9 -1 4 N ETWORK C O M M U N I C AT I O N I NSTRUCTIONS

9 -1 4 N ETWORK C O M M U N I C AT I O N I NSTRUCTIONS

Local area networks (LANs) provide communication channels between independent computers (referred to as nodes) located in a small radius. Because they connect different computers, LANs have created a need for instructions that communicate and exchange information between the PLCs in a network. Therefore, PLC manufacturers now offer network communi- cation instructions , which transfer information like contact status, output coil status, and register status between PLCs. These network instructions are often specific to the manufacturer’s family of PLCs.

Table 9-11 describes typical instructions used in a PLC network environ- ment. These instructions are very easy to implement; however, the program- mer must enforce compliance with the PLC network’s rules. Also, the programmer should assign registers and organize the program to avoid confusion on the network.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC Programming C HAPTER 3 Programming

s p e c i f i c n o d e i n a n e t w o r k Table 9-11. Network communication instructions.

Once a PLC executes a network communication instruction and updates it at the EOS, the processor passes the information to the network hardware (modules or internal boards) for processing and transmission. The format of the instruction may differ, depending on the controller—some controllers use data transfer instructions to access the network, while others use specific instructions. Therefore, the instructions presented here are guidelines to illustrate implementation.

The organization of a network depends on how it is configured. In some controllers, the network interface is built into the main CPU, while in others, it is in an interface module. Regardless of format, both network interfaces perform the same function—network communications. If a PLC’s network interface is installed in the I/O racks, the manufacturer may provide one of a number of ways to set up that particular PLC for the network. Some PLCs may configure the network during the configuration stage, when the network module slot location is specified. Other controllers may automatically recog- nize where the network interface is located. Yet in other PLCs, a network software instruction, similar to a block transfer in or block transfer out instruction, specifies the network module’s slot location.

The output coils and contacts in a network may be referred to as network outputs and network contacts, while the registers in a network may be called network registers . Network outputs are internal outputs that are often located in a special area of the data table, along with the network registers. These network elements may be part of an internal storage area with additional LAN capabilities. For example (see Figure 9-118), if a PLC has 512 possible

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC Programming C HAPTER 3 Programming

Languages 9

internal outputs, 64 of them may be used as network outputs; likewise, if it has 128 storage registers, 32 of them may be used as network registers. These network-mapped addresses, if used, will be sent automatically if the network is active. Chapter 18 explains local area network operation and configuration more extensively.

512 Real I/O

64 compatible internal outputs with network addresses

32 compatible storage registers with network

addresses R0100

Storage R0137

through R0137

Registers R0277

Figure 9-118. Mapping of network-compatible addresses with all numbers in octal.

Now, let’s explore the operational function of some network instructions. In this discussion, we will assume that the programmable controller specifies the slot location of the network interface during the total system configura- tion. If this was not the case, then the PLC would require a slot entry specification for each instruction.

ZCL N NET

ETWORK O UTPUT

A network output instruction, shown in Figure 9-119, is used in conjunction with a network contact to pass one-bit status information from a PLC to the network. If continuity exists in the logic path of the network output, the network output instruction will turn ON its corresponding reference address. It will then send the information about the status of the reference address to the network interface for LAN transmission. Depending on the controller, the reference address must be a valid network coil. After transmission, the status of the output is available to all network stations or nodes (PLCs).

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC Programming C HAPTER 3 Programming

Languages 9

During the read section

At the EOS, the

of the scan, the proces-

PLC #1 processor sends

PLC #2 sor of PLC #2 reads the

the status of all

status of all network out-

network coils used

puts and uses this data

in PLC #1.

in its program. Contacts

10 12 Net 100 Coil

10 12 Net 100 Coil

Figure 9-119. Operation of a network output coil and a network contact instructions. Note that contact 20 in PLC #2 is a local contact.

NET

N ETWORK C ONTACT

LBL

A network contact instruction captures the status information from a network output. The reference address of the network contact must be the same as that of an active network output; otherwise, the contact (examine ON or examine OFF) will never be evaluated. The reference must also be a valid reference address, which may differ among PLC manufacturers.

Figure 9-119 illustrated the operation of a network contact instruction used in conjunction with a network output instruction. In this instruction, the processor obtains information from the network as it reads the inputs, during which it reads the status buffer of the network module as though it were a small data table. If the referenced network output address is logic 1, the controller will perform an evaluation and open or close the referenced contacts to provide or remove continuity. This evaluation depends on how the network contact is programmed (normally open or normally closed).