Get Port Address And Set Port Address Instructions - Siemens SIMATIC S7-200 System Manual

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Get Port Address and Set Port Address Instructions

The Get Port Address instruction (GPA) reads the station
address of the S7-200 CPU port specified in PORT and
places the value in the address specified in ADDR.
The Set Port Address instruction (SPA) sets the port station
address (PORT) to the value specified in ADDR. The new
address is not saved permanently. After a power cycle, the
affected port returns to the last address (the one that was
downloaded with the system block).
Error conditions that set ENO = 0:
H 0006 (indirect address)
H 0004 (attempted to perform a Set Port Address instruction in an
interrupt routine)
Table 6-14
Valid Operands for the Get Port Address and Set Port Address Instructions
Inputs/Outputs
ADDR
PORT
Data Type
Operands
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
(A constant value is valid only for the Set Port Address instruction.)
BYTE
Constant
S7-200 Instruction Set
for CPU 221, CPU 222, CPU 224:
for CPU 224XP, CPU 226:
Chapter 6
0
0 or 1
95

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents