Rockwell Automation AutoMax R-Net Processor Module User Manual

Page 27

Advertising
background image

4Ć11

returned status will contain an error code. Refer to figure 4.6 for error

codes returned by the GATEWAY_CMD_OK@ function.

Error

Code

Description

00 =

Error Free

01 =

Invalid Command Number

02 =

Invalid Parameter/Incorrect Parameter Number

03 =

Address Out of Range

04 =

Count Error

05 =

Reserved for System Use

06 =

Reserved for System Use

07 =

Reserved for System Use

08 =

Illegal Data in Response Message

09 =

Response Timeout Error

10 =

Reserved for System Use

:

22 =

Reserved for System Use

23 =

Illegal Register Number

24 =

Illegal Number of Registers

25 =

Illegal Command Number

26 =

Illegal Point

28 =

Illegal Slot Number

Figure 4.6Ć GATEWAY_CMD_OK@ Returned Status Error Codes

The task's next instruction will not be executed until the response is

returned or the GATEWAY_CMD_OK@ function times out. Therefore,

the GATEWAY_CMD_OK@ function should not be used in a scanned

task (i.e., a task that can time out).
The format of the GATEWAY_CMD_OK@ functions is as follows:
GATEWAY_CMD_OK@(STATUS%, CMD_CODE%, AM_DROP%,

&

AM_REG$, GTWY_VAR!, NUM_REGS$)
where:
STATUS% is an integer variable name only. It defines the variable

name where the resulting gateway command status is stored. The

status value will contain a zero if successful or an error code if

unsuccessful.
CMD_CODE% is a variable name or expression. This is the command

(1Ć4) sent to the AutoMax RĆNet Processor module.
AM_DROP% is a variable name or expression. This is the device for

which the command is intended. The slot number for the AutoMate is

always encoded in the high byte of the word; the low byte contains

the drop number. (For AutoMate 15/15E and 20/20E Processors, the

slot number is always 0.)
AM_REG$ is a variable name or expression. This variable is a string

describing the starting register in the AutoMate which is to be read or

written.
GTWY_VAR! is a variable name (used with the VARPTR! function) or

expression. This is the physical address of the first register in the

AutoMax RĆNet Processor module's AutoMate image area from which

or to which data is to be read or written.
NUM_REGS% is a variable name or expression. This defines the

number of registers or bits to be transferred.

Advertising