917
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Network Instructions
3
Network Instructions
Note 1 If you use communications instructions inside interrupt tasks (regardless of whether you specify communications
ports or use automatic port allocation), use the DI and EI instructions to prohibit executing interrupt tasks when exe-
cuting communications instructions with automatic port allocation in cyclic tasks, as shown below.
2 If it is possible that more than eight communications instructions will be executed at the same time, always check to
be sure there is an available communications port before executing a communications instruction, even when using
automatic port allocation.
a (Executing)
Cyclic Task
c (Standby)
d (Execution completed)
c (Standby)
@Communications
instruction
a (Executing)
@
MOV
A218
b (Port)
If there are communications instructions in any
interrupt tasks, prohibit execution of interrupt
tasks between DI and EI instructions.
DI
EI
@
MOVL
A216
TST
A214
b (Port)
MOVL
IR0
,IR0
#0000
Network communications
error processing
Port: F
e (Code storage
location)
e (Code storage
location)
Execution
condition
d (Execution
completed)
Use A202.15 (Communications Port Allocation Enabled Flag) and
execute communications only when a communications port is available.
A202.15
KEEP
a (Executing)