Communication - Mitsubishi Electric CR750-Q Instruction Manual

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

Advertisement

4.1.5 Communication

Data can be exchanged with an external device, such as a personal computer.
*Command word
Command word
Open
Close
Print#
Input#
On Com GoSub
Com On
Com Off
Com Stop
*Statement example
Statement example
Open "COM1:" AS #1................................
Close #1 ....................................................
Close .........................................................
Print#1,"TEST" ..........................................
Print#2,"M1=";M1 ......................................
Print#3,P1..................................................
Print#1,M5,P5............................................
Input#1,M3 ................................................
Input#1,P10 ...............................................
Input#1,M8,P6 ...........................................
On Com(1) GoSub *SUB3.........................
On Com(2) GoSub *RECV ........................
Com(1) On.................................................
Com(2) Off.................................................
Com(1) Stop ..............................................
*Related functions
Subroutine........................................................................................................
Interrupt............................................................................................................
Opens the communication line.
Closes the communication line.
Outputs the data in the AscII format. CR is output as the end code.
Inputs the data in the AscII format. The end code is CR.
Defines the subroutine to be called when an interrupt is generated from the communication line.
The interrupt is generated when data is input from an external device.
Enables the interrupt process from the communication line.
Disables the interrupt process from the communication line. The interrupt will be invalid even if it
occurs.
Stops the interrupt process from the communication line. If there is an interrupt, it is saved, and
is executed after enabled.
Opens the communication line COM1 as file No. 1.
Closes file No. 1.
Closes all files that are open.
Outputs the character string "TEST" to file No. 1.
Output the character string "M1=" and then the M1 value to file No. 2.
Output data example: "M1 = 1" + CR (When M1 value is 1)
Outputs the position variable P1 coordinate value to file No. 3.
Output data example: "(123.7, 238.9, 33.1, 19.3, 0, 0)(1, 0)" +CR
(When X = 123.7, Y=238.9, Z=33.1, A=19.3, B=0, C=0, FL1=1, FL2=0)
Outputs the numeric variable M5 value and position variable coordinate value to file No. 1.
M5 and P5 are separated with a comma (hexadecimal, 2C).
Output data example: "8, (123.7, 238.9, 33.1, 19.3, 0, 0)(1, 0)"+CR
(When M5=8, P5 X=123.7, Y=238.9, Z=33.1, A=19.3, B=0, C=0, FL1=1, FL2=0)
Converts the input data into a value, and substitutes it in numeric variable M3.
Input data example: "8" + CR (when value 8 is to be substituted)
Converts the input data into a value, and substitutes it in position variable P10.
Input data example: "8, (123.7, 238.9, 33.1, 19.3, 0, 0)(1, 0)"+CR
(P5 will be X= 123.7, Y=238.9, Z=33.1, A=19.3, B=0, C=0, FL1=1, FL2=0)
Converts the first data input into a value, and substitutes it in numeric variable M8. Converts the data
following the command into a coordinate value, and substitutes it in position variable P6. M8 and P6 are
separated with a comma (hexadecimal, 2C)
Input data example: "7,(123.7, 238.9, 33.1, 19.3, 0, 0)(1, 0)"+CR
(The data will be M8 = 7, P6 X=123.7, Y=238.9, Z=33.1, A=19.3, B=0, C=0, FL1=1, FL2=0)
Defines to call step *SUB3 subroutine when data is input in communication line COM1.
Defines to call subroutine at label RECV step when data is input in communication line COM2.
Enables the interrupt from communication line COM1.
Disables (prohibits) the interrupt from communication line COM2.
Stops (holds) the interrupt from communication line COM1.
Function
Explanation
Explanation
Explanation page
Page 116, "(4) Subroutine"
Page 115, "(3) Interrupt"
MELFA-BASIC V functions 4-119
4MELFA-BASIC V

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents