4Ć12
4.6
Sample Application Program
The following application program example illustrates the use of the
GATEWAY_CMD_OK@ function to initiate a Read Point command.
As described in section 4.4, RĆNet network variables on the RĆNet
Processor module must be defined before they can be accessed by
an application task. Below is an example of a configuration task
required for defining RĆNet network variables in AutoMax Version 1.0,
2.0, and DCS 5000 systems. Note that AutoMax Version 3.0 systems
do not require you to write a configuration task; all variables are
defined using the Software Configurator in the Programming
Executive software. In the following configuration task, DSTPNT
defines the slot and register number of the AutoMax RĆNet Processor
module where the data will be written.
10
TASK RDPNT[TYPE=BASIC, PRIORITY=5, SLOT=1, &
CRITICAL=FALSE]
20
RNETDEF DSTPNT@[SLOT=5, REGISTER=405.04]
30
END
BASIC or Control Block Task:
In this program, command code 1 (Read Point) is used to read the
value of bit location 55.04 of an AutoMate Processor located in slot 1
of node 3 of the RĆNet network. The value of this bit location is then
transferred back to the AutoMax RĆNet Processor that initiated the
command and is written to bit location 405.04 in the AutoMate image
area.
10
LOCAL STATUS%, CMD_CODE%, AM_DROP%,
&
GTWY_VAR!, NUM_REGS%, BOOL@, AM_REG$
15
COMMON DSTPNT@
20
CMD_CODE%=1
30
AM_DROP%=103H
40
AM_REG$="55.04"
50
GTWY_VAR! = VARPTR!(DSTPNT@)
60
NUM_REGS% = 1
70
BOOL@ = GATEWAY_CMD_OK@(STATUS%,
&
CMD_CODE%, AM_DROP%, AM_REG$, GTWY_VAR!,&
NUM_REGS%)
80
DELAY 2 SECONDS
90
GO TO 70
32767
END
Summary of Contents for AutoMax R-Net
Page 1: ... ...
Page 4: ... 5 0 Diagnostics And Troubleshooting 5Ć1 ...
Page 5: ... ...
Page 6: ... 2 0 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 ...
Page 12: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd ...
Page 16: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd ...
Page 32: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd ...
Page 34: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd ...
Page 36: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd ...
Page 37: ... Appendix D Node Number Conversion Chart ...
Page 38: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd ...
Page 40: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd ...
Page 41: ...fafadfdfdasfdsfdsdsdfdsfdsfdsfsdfdsa afdfdsfdsfdfdsfdsfsadfda asfdfaddfdd ...