Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 60
![background image](/manuals/580318/60/background.png)
6Ć20
Task ABC
10 EVENT NAME=GAIN_OVER
.
.
.
90 IF GAIN>MAX_GAIN THEN SET GAIN_OVER
.
.
.
Task XYZ
30 EVENT NAME=GAIN_OVER
.
.
.
105 WAIT ON GAIN_OVER
.
.
.
6.6.3
OPEN CHANNEL Statement
The OPEN CHANNEL statement equates a logical name with a data
channel between two application tasks in the system. This statement
enables tasks to communicate with each other using INPUT and
PRINT statements. When a channel is opened between two tasks
and one task PRINTs to the other, the information is going to the
waiting task, not to a printer or serial port. When one task INPUTs
data from another, the data is being read from the other task that
has opened the channel.
The OPEN CHANNEL statement has two formats depending upon
which task it is being used in. The task sending data through the
channel must use the OPEN CHANNEL FOR OUTPUT format. The
task reading data from the channel must use the OPEN CHANNEL
FOR INPUT format. Multiple tasks can open the same channel for
output purposes and write data to it, but only one channel may open
the channel for input purposes and read from it.
Format for task writing to a channel:
OPEN CHANNEL FOR OUTPUT AS FILE #n, TYPE = (type)
Format for task reading from a channel:
OPEN CHANNEL FOR INPUT AS FILE #n, TYPE = (type), DEPTH = depth
n
= logical number assigned to the channel; range = 1Ć255;
the PRINT and INPUT statements must reference the same
number to identify this particular channel.
type = variable type or list of types that are to be passed through
the channel; multiple types must be separated by a
comma; this information allows the system to format each
piece of data when it passes it from one task to another.
I = single integer
D = double integer
R = real
S= string
B = boolean