Open And Close Commands; Zcommands - Mitsubishi Melsec A User Manual

Table of Contents

Advertisement

6. AD51 PROGRAMMING NOTES
/MELSE
6.3.4 OPEN and CLOSE commands
Note the following precautions when using the
OPEN
and
CLOSE
commands.
(1)
The channel specified as that for the console b y
DIP
switch
SW16
and the channel selected for the printer on the printer
setting screen are automatically opened b y the
AD51 OS.
The communication mode for other channels must be set in the
user program using the
OPEN
command. These t w o channels
default t o closed.
(2)
The
OPEN
command
is used t o specify the communication
control at the
RS-232C
or
RS-422
port. I t also initializes the
AD51
send and receive buffers. Executing this command there-
fore re-defines the communication mode for the specified port
and clears both
AD51
buffers at that port.
(3)
The
CLOSE
command initializes the
AD51
communication
control and buffers in the same way as the
OPEN
command
however i n this case the port
is left in a readlwrite disable state.
POINT
I
Before using the CLOSE command, ensure that the transmit
buffer is empty be using subroutine "STC". Data w i l l be lost
if
the buffer is initialized while it
s t i l l
contains data.
(4) OPEN
and
CLOSE
commands arecommon t o all tasks. Therefore,
any channel opened b y one task can be used in subsequent tasks
without having t o repeat the
OPEN
command.
D
6.3.5 Z commands
The
ZMOV, ZRD1, ZRD2, ZWRl
and
ZWR2
commands are n o t
available for
AD51, PC CPU
transactions. Access t o the
PC CPU
data is via system subroutines. For details refer t o section
3.2.2.

Advertisement

Table of Contents
loading

Table of Contents