User`s manual
5-6 Series 90™-30 CPU with Embedded PROFIBUS Interface – November 2004 GFK-2334A
5
Get Device Status (1)
The Get Device Status Command retrieves detailed status information for the specified
device.
Get Device Status Command Block – Basic Example
The following command block accomplishes the following:
Get Device Status for Device 1.
Return the COMMREQ Status Words to %R10—%R13.
Return the Device Status to %R251-%R259.
Word Dec (Hex) Definition
Word 1 5 (0005) Length of command Data Block
Word 2 0 (0000) Always 0 (no-wait mode request)
Word 3 8 (0008) Memory type of COMMREQ status word (%R)
Word 4 9 (0009) COMMREQ status word address minus 1 (%R10)
Word 5 0 (0000) Reserved
Word 6 0 (0000) Reserved
Word 7 1 (0001) Get Device Status command number
Word 8 8 (0008) Memory type to write response (%R)
Word 9 250 (00FA) Starting Address to write response (response written to
%R251)
Word 10 9 (0009) Maximum size of response area
Word 11 1 (0001) Slave number (0—125)
(Word 7) Command Code: Word 7 specifies the Command code for the COMMREQ to
be executed. Get Device Status = 1.
(Word 8) Local PLC - Memory Type: Words 8—9 specify the location in the PLC where
the response will be written. Values for Word 8 are listed on page 5-5.
(Word 9) Response Memory Starting Address: Word 9 is a 0-based offset that determines
the starting address in the PLC in which the response is to be written. The value entered is
the offset (0-based) from the beginning of PLC memory for the memory type and mode
specified in Word 8. This offset will be either in bits, bytes, or words depending on the mode
specified (for example, if Word 8=16 and Word 9=2, then the starting address will be %I17).
Valid ranges of values depend on the PLC’s memory ranges.
(Word 10) Response Memory Size: Word 10 specifies the size of the memory block for
the response. The COMMREQ has built-in future expansion space in the response field.
The Response Memory Size (including the future expansion space) is 9 words. The user
is responsible for assuring that this area is large enough to contain the requested data
without overwriting other application data. It is recommended that the future expansion
space be allocated initially, to avoid problems if future firmware upgrades use more than 9
words for the response.
(Word 11) Slave Number: Word 11 specifies the address of the device the COMMREQ is
retrieving device status from. If the address of the master or a slave that is not on the bus
is entered a COMMREQ Status Word response of 4 will be returned.










