ID : 371
Comm.Close
Function
To close the line designated for data communication.
Syntax
Comm.Close line number[, mode]
Guaranteed entry
- Line number
- Designate a line number to close by integer type data. If "-1" is specified, all lines opened are closed at Comm.Close execution.
- Mode
- Specify the line to be closed has been opened by own task or other task, by integer type data.This is an optional value. This should be "-1" if this is omitted.
This entry is available in Ver.1.7.* or higher.
-
Designated value Description 0 Close lines opened by own task. 1 Close lines opened by other tasks as well as own task.
This mode is used to close lines remaining unclosed at the termination of the task from other tasks.-1 When the line number is larger than 0. Same as "0". Close lines opened by own task. When the line number is "-1" Same as "1". Close lines opened by other tasks as well as own task.
Description
The line designated for data communication is closed.
Related Terms
Comm.Open, Comm.Output, Comm.Input, Comm.Clear, Comm.Count, Comm.State, Data Communication
Attention
This command creates heavy load on CPU.
Avoid using this command frequently in repeat instruction when you create program.
Example
'!TITLE "DENSO Robot Program"
Sub Sample_CommClose
Comm.Close 1
End Sub
ID : 371