Mitsubishi Electric CR750-Q Instruction Manual page 294

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

4MELFA-BASIC V
Open (Open)
[Function]
Open the file or communication lines.
[Format]
Open[] "<File Descriptor>" [][For <Mode>][]AS[] [#] <File No.>
[Terminology]
<File Descriptor>
File type
File
Communi-
cation line
Note1) It is specification in the case of using the real-time external control by the Ethernet interface. Specify
the IP address which takes absolute position data by the "Mxt" command following "ENET:".
<Mode>
<File No.>
[Reference Program]
(1) Communication line.
1 Open "COM1:" AS #1
2 Mov P_01
3 Print #1,P_Curr
40Input #1,M1,M2,M3
5 P_01.X=M1
6 P_01.Y=M2
7 P_01.C=Rad(M3)
8 Close
9 End
(2) File operation. (Create the file "temp.txt" to the controller and write "abc")
1 Open "temp.txt" FOR APPEND AS #1
2 Print #1, "abc"
3 Close #1
[Explanation]
(1) Opens the file specified in <File name> using the file number. Use this file No. when reading from or writ-
ing to the file.
(2) A communication line is handled as a file.
[Related instructions]
Close
(Close),
Print
4-274 Detailed explanation of command words
Describe a file name (including communication lines).
*To use a communication line, set "<Communication Line File Name>:"
*When not using a communications line, set "<File Name>"
File name
Describe with 16 characters or less.
COM1: The setting in the "COMDEV" parameter.
:
COM8: The setting in the "COMDEV" parameter.
Note1)
ENET:192.168.0.2
MXT: QRBUS<CPU No.2 to 4>"
Select the number among 2 to 4 for the CPU
module No. to specify the master robot CPU.
Designate the method to access a file.
*Omitted = random mode. This can be omitted when using a communication line.
*Input = input mode. Inputs from an existing file.
*Output = output mode (new file). Creates a new file and outputs it there.
*Append = Output mode (existing file). Appends output to the end of an existing file.
Specify a constant from 1 to 8.
To interrupt from communication line: 1 to 3.
' Open standard RS-232C line as file No. 1.20 Mov P_01
' Output current position to external source.
"(100.00,200.00,300.00,400.00)(7.0)" format
' Receive from external source with "101.00,202.00,303.00" AscII for-
mat.
' Copy to global data.
' Close all opened files.
(Print),
Input (Input), Mxt (Move External)
Access method
Input, Output, Append
Omitted = random mode only
Mxt command
Mxt command

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents