Consulting The Last Key Accepted By The Cnc - Fagor CNC 8060 Installation Manual

Hide thumbs Also See for CNC 8060:
Table of Contents

Advertisement

I n s t a l l a t i o n m a n u a l .
8.3

Consulting the last key accepted by the CNC.

The (V.)G.KEY variable keeps the code of the last key accepted by the CNC (press key code).
This variable can be read and written from the PLC and read from the program and interface.
To read the variable from the PLC, use the command CNCRD.
Reading variables from the PLC.
The command CNCRD saves the code of the key in the register R100. The PLC activates the M100
mark when the operation begins and keeps it active until the operation ends.
{condition} = CNCRD(G.KEY,R100,M100)
8.4
Keyboard simulation via the PLC.
To simulate the keyboard from the PLC, write the code of the key in the variable (V.)G.KEY.
Each key is assigned two codes; one for pressing it and another one for releasing it. For each
key that the PLC sends, both codes must be written; it is recommended to use a delay of
at least 200 ms between both codes (for safety). To write the variable from the PLC, use the
command CNCRD.
Writing variables from the PLC.
The command CNCWR writes the value of the R101 register in the variable. The PLC activates the
M101 mark when the operation begins and keeps it active until the operation ends.
{condition} = CNCWR(R101,G.KEY,M101)
Uppercase and lowercase letters.
One key can have more than one character. To send the first character (lowercase), use the
indicated codes; for the second character (uppercase), add the code corresponding to the
[SHIFT] key, in the following way. When sending the two codes, it is recommended to use
a delay of at least 200 ms between each (for safety).
1
Send the code associated for pressing the [SHIFT] key.
2
Send the code associated with pressing the letter key.
3
Send the code associated for releasing the [SHIFT] key.
4
Send the code associated with releasing the letter key.
Initialize the records.
() = MOV $1E R200 ; Press the [A] key
() = MOV $9E R201 ; Release the [A] key
() = MOV $2A R202 ; Press the [SHIFT] key
() = MOV $AA R203 ; Release the [SHIFT] key
The first user key (B0KEYBD1) sends the character "a".
DFU B0KEYBD1 = CNCWR(R200,G.KEY,M200) = TG1 200 200
T200 = M300
DFD M300 = CNCWR(R201,G.KEY,M201) = TG1 201 200
T201 = M301
The second user key (B1KEYBD1) sends the character "A".
DFU B1KEYBD1 = CNCWR(R202,G.KEY,M202)
= CNCWR(R200,G.KEY,M203)
= TG1 202 200
T202 = M302
DFD M302 = CNCWR(R201,G.KEY,M204)
= CNCWR(R203,G.KEY,M205)
= TG1 203 200
T203 =M303
8.
CNC 8060
CNC 8065
(R
: 1709)
EF
·525·

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cnc 80658060 t power8060 l8060 m fl8060 t fl8060 m power ... Show all

Table of Contents