ASCII IF Specification R-J3iC (EN)
ASCII IF Specification R-J3iC (EN)
Specification
1
R-J3iC Controller ASCII Interface Specification 24/06/07
1 Preface
In this function, robot moves on the path that is optimized by external PC. To optimize the
robot path, the software MERCATOR is used and ASCII files are transferred between R-J3iB
controller and PC.
2
R-J3iC Controller ASCII Interface Specification 24/06/07
2 Function
2.1 File transfer
2.1.1 Communication
The ASCII files are sent and received between PC and R-J3iB controller. PC and R-
J3iB controller are connected by Ethernet, and ASCII files are transferred by FTP
protocol and Socket Message communication (SM communication). In SM
communication, special protocol between MERCATOR and R-J3iB controller is
used.
When the path record command and the optimized path execution command in TP
program is executed, file transfer between PC and R-J3iB controller is executed
according to the following system variable.
=1: R-J3iB gets file from PC by FTP protocol at path record start.
R-J3iB sends files to PC by FTP protocol at path record end.
R-J3iB gets file from PC by FTP protocol at optimized path execution start.
And it is needed to set client and server tag number which is set for this function to
the following system variables.
3
R-J3iC Controller ASCII Interface Specification 24/06/07
4
R-J3iC Controller ASCII Interface Specification 24/06/07
2. RECORD**.IBG(**: 1-16)
This is one of the files that store the recorded position data. This file is made at
the end of recording. This file includes the following data.
Header
PLC point that needs to be recorded. (Copy from SENSPS**.TXT)
Total actual FOLGE program
Motion data in interpolation cycle (rated values of path planner in
Cartesian coordinates) (Maximum number of data is 20,000 lines.)
Additional data specified from the file SENSPS**.TXT.
5
R-J3iC Controller ASCII Interface Specification 24/06/07
3. R_ISTW**.IBG(**: 1-16)
This is one of the files that store the recorded position data. This file is made at
the end of recording. This file includes the following data.
Header
PLC point that needs to be recorded. (Copy from SENSPS**.TXT)
Total actual FOLGE program
Motion data in interpolation cycle (actual values of path planner in
Cartesian coordinates) (Maximum number of data is 20,000 lines.)
Additional data specified from the file SENSPS**.TXT.
4. R_ACHSW**.IBG(**: 1-16)
This is one of the files that store the recorded position data. This file is made at
the end of recording. This file includes the following data.
Header
PLC point that needs to be recorded. (Copy from SENSPS**.TXT)
Total actual FOLGE program
Motion data in interpolation cycle (actual joint values of all axis)
(Maximum number of data is 20,000 lines.)
Additional data specified from the file SENSPS**.TXT.
5. IBGN**.IBG(**: 1-16)
This is the optimized path data file. This file is transferred from PC to R-J3iB at
the start of running of the optimized path. This file includes the following data.
Header
PLC point that needs to be recorded. (Copy from SENSPS**.TXT)
Total actual FOLGE program
Optimized motion data in interpolation cycle. (Cartesian coordinate)
(Maximum number of data is 20,000 lines.)
Optimized additional data specified from the file SENSPS**.TXT.
6
R-J3iC Controller ASCII Interface Specification 24/06/07
If communication error occurs in above cases, the warning is issued but the
program execution is not stopped. In case of IBGN REC start and IBGN REC end,
the designated IO is output. If you want to stop the program execution with an
alarm, set the system variable $IBGN_FTP.$IGNR_COMER to FALSE.
7
R-J3iC Controller ASCII Interface Specification 24/06/07
SENSPS**.TXT file and record files can not be saved and loaded.
Note
A) You cannot backup files during file transfer by program execution.
B) All IBGN**.IBG files on current device can be saved and loaded. You cannot
spfcify file to save or load.
C) You cannot load a file if a line in the file has more than 256 characters.
8
R-J3iC Controller ASCII Interface Specification 24/06/07
1* * (all files)
2* KL (all KAREL source)
3* CF (all command files)
4* TX (all text files)
5* LS (all KAREL listings)
6* DT (all KAREL data files)
Press DIR to generate directory
[ TYPE] [ DIR ] LOAD [ BACKUP] [ UTIL ]>
JOINT 10 %
C1:\*.* 16/43
11 IBGN01 IBG ********
12 IBGN02 IBG ********
13 IBGN03 IBG ********
14 IBGN04 IBG ********
9
R-J3iC Controller ASCII Interface Specification 24/06/07
2.3.2 Deletion
Set device to “MD:” in file screen. Then generate directory of IBG files as you did
in previous section.
Usually, you cannot select this device in “Set device” sub menu.
To display MD: in “Set device” submenu, change $MD_SEL to 1.
JOINT 10 %
MD:\*.* 16/43
11 IBGN01 IBG ********
12 IBGN02 IBG ********
13 IBGN03 IBG ********
14 IBGN04 IBG ********
CAUTION
Don’t delete any other kind of files in MD: You must delete IBG files
only. Otherwise, system may not work properly.
D) Press next key and press COPY(F2). File copy screen is displayed.
10
R-J3iC Controller ASCII Interface Specification 24/06/07
Load and copy of IBG files may fail if you do when you shouldn’t do.
For example, you cannot load IBG file if IBGN START[ ] using one of IBG files.
11
R-J3iC Controller ASCII Interface Specification 24/06/07
2.4 Program
Following new instructions of TP program are used for this function.
The start and end point of the recording section in TP program are taught by
these instructions. In the section from IBGN REC start to IBGN REC end, motion
data and additional data specified in SENSPS**.TXT are recorded in
interpolation cycle.
IF(DI[i] and DI[j]) IBGN REC start[n] (n: File number 1-16)
In case that recording is executed while the robot moves along the optimized
path, recording start instruction must be taught before the start instruction of
optimized path running.
Only following speed unit can be used in the motion instructions between IBGN
REC start and IBGN REC end. If another speed unit is used, an alarm occurs
and that motion instruction cannot be recorded.
Joint motion : %
Linear, circular motion : mm/sec,cm/min,inch/min
In case that the speed unit is cm/min or inch/min, the speed value is converted
to mm/sec, then recorded.
12
R-J3iC Controller ASCII Interface Specification 24/06/07
The start and end point of the optimized path execution section in TP program
are taught by these instructions. In the section from IBGN start to IBGN end,
robot tracks the optimized path data and output additional data in interpolation
cycle.
A file number can be used only one time in a TP program. The same file number
cannot be used at another place in the same TP program.
In case that some IBGN commands is taught in a program, teach one or more
motion instructions between IBGN start command and previous IBGN end
command without fail.
1. At first, DI[1] is set to OFF and DI[2] is set to ON, then execute the
program in order to record the path.
2. When IBGN REC start is executed (Line 3), SENSPS03.txt is transferred
from PC to R-J3iB.
3. When IBGN REC end is executed (Line 8), following three files are made.
RECORD03.IBG
R_ISTW03.IBG
R_ACHSE03.IBG
13
R-J3iC Controller ASCII Interface Specification 24/06/07
14
R-J3iC Controller ASCII Interface Specification 24/06/07
The additional data to record, such as IO data, are specified SENSPS**.TXT file. This
file is transferred from PC to R-J3iB controller at the start of recording. If
SENSPS**.TXT file can not be read when IBGN REC start instruction is executed, the
program is paused by alarm.
Following three kinds of motion data are recorded. And these data are stored in the
following files.
These files are made at the end of recording. While the recorded data are stored to
these files, robot motion stopped. When auto file transfer is disabled, these files are
created on Memory Carrd(MC:). If memory card is not inserted at the end of recording,
an alarm occurs.
If one of the following events occurs during recording, a warning is issued and
designated DO is turned ON. In that case, the program execution is continued, but
record files are not made.
CALL instruction is executed.
Program control is returned from subprogram.
15
R-J3iC Controller ASCII Interface Specification 24/06/07
16
R-J3iC Controller ASCII Interface Specification 24/06/07
In case that IBGN REC start is executed with single step mode, record files are not
made. In that case, a warning is issued when IBGN REC start is executed.
When IBGN REC start is taught but IBGN REC end is not taught, if the program is
executed, recording is executed from IBGN REC start to the program end.
When IBGN REC start is executed, if previous recording has not finished, previous
recording is terminated then new recording is started.
There must be one or more motion instruction from top of the program to the first IBGN
REC start instruction. If motion instruction is not executed before IBGN REC start is
executed, an alarm occurs.
17
R-J3iC Controller ASCII Interface Specification 24/06/07
The optimized path and the additional data to execute, such as IO data, are specified
IBGN**.IBG file. This file is transferred from PC to R-J3iB controller at the start of IBGN
execution. If IBGN**.IBG file cannot be read when IBGN start instruction is executed,
the program is paused by alarm.
During communication and reading the file, robot motion is stopped. So, even if
termination type of motion instruction immediately before IBGN start is CNT, robot
decelerates and locates at the taught position.
In the section between IBGN start and IBGN end, motion instructions taught in TP
program are ignored. In that section, only the motion and restoring data described in
IBGN**.IBG are executed.
In case that IBGN start is executed with single step mode, the program is executed
until the robot moves to the end of the optimized path, then the program is paused.
In the following case, the robot moves on the optimized path in the reverse direction by
backward execution.
In case that the backward execution is started after the program is paused
while the optimized path is executed.
In case that the backward execution is started after the robot reaches to the
destination position of the optimized path by single step execution.
18
R-J3iC Controller ASCII Interface Specification 24/06/07
The backward execution of the optimized path has the following restrictions.
When the program is paused while the robot moves on the optimized path by
backward execution, forward execution cannot be done. If the backward
execution of the optimized path is started, forward execution cannot be done
until the robot reaches to the start position of the optimized path.
Output of PLC points does not execute during backward execution.
In case that the program is paused while robot moves on the optimized path, DRY-
RUN function can be executed. Please refer to the specification of DRY-RUN.
When the optimized path is executed with T1 mode, the maximum speed of robot
motion is under 250mm/sec.
The first point in IBGN file must be the same position as the destination of the motion
instruction that is taught immediately before IBGN start. When IBGN start is executed,
if the first point in IBGN file is different form the current robot position, an alarm occurs
and the program is paused.
When IBGN start is executed, if the value of ITP time and tool center point is different
from the value described in IBGN file, an alarm occurs and the program is paused.
19
R-J3iC Controller ASCII Interface Specification 24/06/07
When the program is restarted after the program is paused during the optimized path
execution, if robot is out of the optimized path, the robot returns the optimized path
and then robot moves on the optimized path.
When the configuration data of all position data in the optimized path file are not same,
the alarm MOTN-156 PM: Configuration changed occurs.
20
R-J3iC Controller ASCII Interface Specification 24/06/07
2.7 Restrictions
32M bytes DRAM CPU card (A05B-2450-H012) is needed.
In the TP program that has IBGN instructions, the number over 30,000 can not be
used as the label number for JUMP/LABEL instructions.
2. Following data affect OFFSET and TOOL OFFSET instruction. Statuses of the
following items are fixed. Robot uses those of when recording ended.
A) Value of PR[ ]
B) “Ignore Offset Command” and “Ignore Tool Offset” in SETUP GENERAL
3. User frame and tool frame to interpret PR[ ] for offset/Tool offset are those that
are selected when recording ended.
The following options can be loaded with ASCII Interface function, but cannot
be used at the same time as ASCII Interface function.
Continuous turn Torque Limit
Touch Sensor Soft Float
Weaving Coordinate Motion
MIG EYE Robot Link
Line Tracking ARC related function
ARC Sensor Approach Deterrence for Dual robot
Root Path Memorization Approach Deterrence for Robot Link
AVC
21
R-J3iC Controller ASCII Interface Specification 24/06/07
22
R-J3iC Controller ASCII Interface Specification 24/06/07
(deg)
$DBG_MASK 0 No use.
23
R-J3iC Controller ASCII Interface Specification 24/06/07
$EXE_IO_TYP 0 No use
$EXE_IO_NUM 0 No use
24
R-J3iC Controller ASCII Interface Specification 24/06/07
25
R-J3iC Controller ASCII Interface Specification 24/06/07
26
R-J3iC Controller ASCII Interface Specification 24/06/07
on.
$RESERVE 0 No use.
$ENABLED 0 No use
$DBG_MASK 0 No use
$COMP_SWITCH 0 No use
27
R-J3iC Controller ASCII Interface Specification 24/06/07
28
R-J3iC Controller ASCII Interface Specification 24/06/07
29
R-J3iC Controller ASCII Interface Specification 24/06/07
2.9 Alarm
Code Cause
The item “IPO TAKT” or “Wzk” does not exist in the header of
1
IBGN**.IBG.
3 The item “;” does not exist after the program data in IBGN**.IBG.
SPS, which indicates the start of record condition, does not exist in
9
IBGN**.IBG.
The sum total of IO data and analog data designated in record
10
condition excess the maximum in IBGN**.IBG or SENSPS**.TXT.
The sum total of IO data designated in record condition excess the
11
maximum in IBGN**.IBG or SENSPS**.TXT.
The sum total of analog data designated in record condition excess
12
the maximum in IBGN**.IBG or SENSPS**.TXT.
The type of IO data or analog data designated in record condition is
13
not correct in IBGN**.IBG or SENSPS**.TXT.
The type of IO data or analog data designated in record condition is
14
not correct in IBGN**.IBG or SENSPS**.TXT.
30
R-J3iC Controller ASCII Interface Specification 24/06/07
31
R-J3iC Controller ASCII Interface Specification 24/06/07
32
R-J3iC Controller ASCII Interface Specification 24/06/07
33
R-J3iC Controller ASCII Interface Specification 24/06/07
34
R-J3iC Controller ASCII Interface Specification 24/06/07
35
R-J3iC Controller ASCII Interface Specification 24/06/07
36
R-J3iC Controller ASCII Interface Specification 24/06/07
37
R-J3iC Controller ASCII Interface Specification 24/06/07
38
R-J3iC Controller ASCII Interface Specification 24/06/07
39
R-J3iC Controller ASCII Interface Specification 24/06/07
Example of SENSPS**.TXT
1FFFF
2
E 1 : Aufnahme Start
E 2 : IBGN Start
A 1 : analog 1
A 5 : A5
F 5 : Aufzeichnung Start
M 24 : Testmerker
t 3 : t3
40
R-J3iC Controller ASCII Interface Specification 24/06/07
41
R-J3iC Controller ASCII Interface Specification 24/06/07
42
R-J3iC Controller ASCII Interface Specification 24/06/07
2. Record condition
Title Data Content
Robot fills in this item.
This line indicates that now the portion from
x SPS
SENSPSxx.TXT begins.
3. Program data
Title Data Content
Robot fills in this item.
N ;
(Example)
1:J P[1] PKT_Nr=1
2:L P[5] PKT_Nr=2
3: IBGN REC START[1] PKT_Nr=3
43
R-J3iC Controller ASCII Interface Specification 24/06/07
44
R-J3iC Controller ASCII Interface Specification 24/06/07
4. Record data
Title Data Content
This item indicates which data is valid in this file.
The coding is hexadecimal.
n+m
CODE
+1
Refer to “CODE” in record condition file.
5. Data format
Item Data Unit
XYZ Position location mm Floating number with 4 digits after comma.
(J1-J6) (Position data) (deg) ( In the file R_ACHSW01-16, the joint data (J1-J6)
are recorded as the position data. )
Floating number with 4 digits after comma.
45
R-J3iC Controller ASCII Interface Specification 24/06/07
E1-E6 Position of the deg Floating number with 6 digits after comma.
additional axis The data from E4 to E6 is always set to 0.
I/O 1-32 PLC data Information on PLC in long hexadecimal data type.
This data is filled up from left to right with the
status of ports described in the SENSPSxx.TXT.
I/O 33- PLC data Information on PLC in long hexadecimal data type.
64 This data is filled up from left to right with the
status of ports described in the SENSPSxx.TXT.
BIT0 : FRONT/BACK
BIT1 : UP/DOWN
BIT2 : LEFT/RIGHT
BIT3 : FLIP/NON-FLIP
46
R-J3iC Controller ASCII Interface Specification 24/06/07
Pkt_Nr Serial number of Point number to which the robot approaches in the
position original FOLGE*** program.
47
R-J3iC Controller ASCII Interface Specification 24/06/07
**** Header Information **** ( This line does not exist in real file.)
AHLENERK.7ACHS;
Dateiformat : 1.1;
Datum : 9.12.2002;
IPO TAKT : 15;
Start : 3;
Stop : 65;
Roboter : VRS_1 VERSION002.01a vom 26.11.02 VRS1_AB;
Sensor : BAHNVIS_3.41 Nr. : 1;
PC : ;
PC - Software : ;
Analog : hex;
Wkz : tool 0.000 mm, 0.000 mm, 0.000 mm, 0.00 Grd, 0.00 Grd, 0.00 Grd;
IBGN Datei Nr : 0 Aktiv : 0;
**** Record condition **** ( This line does not exist in real file.)
SPS :
E 1 : Aufnahme Start
E 2 : IBGN Start
A 1 : analog 1
A 5 : A5
F 5 : Aufzeichnung Start
M 24 : Testmerker
S 1 : Senden
S 15 : Start
S 16 : Aufzeichnung Start
S 30 : pt
t 3 : t3
**** Program data **** ( This line does not exist in real file.)
;
/*PKT_Nr : X Y Z a b c Interpolation Vb Ve Aa Ae Genau Status Turn //Kommentar*/
Folge: 78
0 : 1827.1077 -310.8549 988.4280 -87.623158 -28.336284 -91.416794 PTP 100 0 100 100 0 0 0 //
1 : 1827.1664 -310.7703 988.5379 -87.625841 -28.324034 -91.416126 PTP 100 0 100 100 0 0 0 //
2 : 1827.1077 -310.8549 988.4280 -87.623158 -28.336284 -91.416794 PTP 100 0 100 100 0 0 0 //
3 : 1826.9729 -310.6933 977.9237 -87.596391 -28.387352 -91.418695 LIN 66 0 800 800 0 0 0 //
4 : 1819.7736 -303.5348 978.0617 -87.602303 -28.371515 -91.417564 LIN 40 40 800 800 2 0 0 //
---------
48
R-J3iC Controller ASCII Interface Specification 24/06/07
**** Record data / Optimized Path data **** ( This line does not exist in real file.)
10503;
1826.9729 -310.6933 977.9237 -87.596387 -28.387351 -91.418695 0 0 0 0 0 0 80000000 0 0000 0 0 0 0 0 4
1826.9723 -310.6927 977.9237 -87.596387 -28.387351 -91.418695 0 0 0 0 0 0 80000000 0 0000 0 0 0 0 0 4
1826.9699 -310.6904 977.9237 -87.596387 -28.387346 -91.418695 0 0 0 0 0 0 80000000 0 0000 0 0 0 0 0 4
1826.9638 -310.6842 977.9239 -87.596397 -28.387331 -91.418695 0 0 0 0 0 0 80000000 0 0000 0 0 0 0 0 4
1826.9510 -310.6714 977.9241 -87.596416 -28.387303 -91.418685 0 0 0 0 0 0 80000000 0 0000 0 0 0 0 0 4
1826.9281 -310.6488 977.9245 -87.596426 -28.387252 -91.418685 0 0 0 0 0 0 80000000 0 0000 0 0 0 0 0 4
1826.8918 -310.6128 977.9253 -87.596454 -28.387172 -91.418676 0 0 0 0 0 0 80000000 0 0000 0 0 0 0 0 4
1826.8386 -310.5597 977.9263 -87.596492 -28.387055 -91.418666 0 0 0 0 0 0 80000000 0 0000 0 0 0 0 0 4
1826.7642 -310.4859 977.9276 -87.596559 -28.386893 -91.418666 0 0 0 0 0 0 80000000 0 0000 0 0 0 0 0 4
-----------
49
R-J3iC Controller ASCII Interface Specification 24/06/07
50
R-J3iC Controller ASCII Interface Specification 24/06/07
7. After setting, please turn off and on the power of R-J3iB controller.
51
R-J3iC Controller ASCII Interface Specification 24/06/07
Appendix B) Procedure to define and start FTP Client and Socket Message client
1. Before definition of FTP client and SM client, please set up TCP/IP parameter.
2. Press MENUS key and select SETUP in the menu.
3. Press F1 [TYPE] and select Host Comm in the menu.
1/8
Tag Protocol Remote State
1 C1: ******** **********[UNDEFINED]
2 C2: ******** **********[UNDEFINED]
3 C3: ******** **********[UNDEFINED]
4 C4: ******** **********[UNDEFINED]
5 C5: ******** **********[UNDEFINED]
6 C6: ******** **********[UNDEFINED]
7 C7: ******** **********[UNDEFINED]
8 C8: ******** **********[UNDEFINED]
5. Move cursor to the tag which is used for this function. And Press F3 DETAIL key.
52
R-J3iC Controller ASCII Interface Specification 24/06/07
Comment: ****************
Protocol name: ********
Port name: *****
Mode: *************************
Current
State: UNDEFINED
Remote: ****************************
Path:
6. Move the cursor to item “Protocol name” and press F4 [CHOICE]. Select FTP or SM in
the menu.
7. Move the cursor to Startup Remote and press enter key. Then, enter host name for FTP
server PC or SM server PC.
8. Move the cursor to Startup State and press F4 [CHOICE]. Select START in the menu.
9. Press F2 [ACTION] and select DEFINE in the menu. Confirm that Current State change
to DEFINED.
10. Press F2 [ACTION] again and select START in the menu. Confirm that Current State
change to STARTED.
Comment: ****************
Protocol name: FTP
Port name: *****
Mode: *************************
Current
State: STARTED
Remote: HOST_PC
Path:
Startup
State: START
Remote: HOST_PC
Path: *********************************
Options
Error Reporting: OFF
Inactivity Timeout: 15 min
53
R-J3iC Controller ASCII Interface Specification 24/06/07
11. If you need, set up Username and Password for FTP client by the following procedure.
If you do not change, the username is “anonymous” and the password is “guest” in
default setting.
[ TYPE ] LIST
54
R-J3iC Controller ASCII Interface Specification 24/06/07
15. Move cursor to the username you want to change and press enter. Enter the username
using the function key. This item is case sensitive. If you want to enter username in
capital letters, press the function key with shift key.
16. Move cursor to the password that corresponds to that username and press enter. Enter
the password using the function key. This item is case sensitive. If you want to enter
password in capital letters, press the function key with shift key.
17. If you need, enter the password timer. Move the cursor to the corresponding timer and
enter the timer value. If you set the password timer, the password is reset to “guest”
after the setting time. The unit of this value is minute. If the timer is set to 0, the
password is not reset.
18. If you want to change the port number of FTP server, please set the port number to the
system variables $SERV[3].$PORT.
55
R-J3iC Controller ASCII Interface Specification 24/06/07
1/8
Tag Protocol Remote State
1 S1: FTP ********** [STARTED ]
2 S2: FTP ********** [STARTED ]
3 S3: ******** **********[UNDEFINED]
4 S4: ******** **********[UNDEFINED]
5 S5: ******** **********[UNDEFINED]
6 S6: ******** **********[UNDEFINED]
7 S7: ******** **********[UNDEFINED]
8 S8: ******** **********[UNDEFINED]
5. Move cursor to the tag which is used for this function. And Press F3 DETAIL key.
56
R-J3iC Controller ASCII Interface Specification 24/06/07
Comment: ****************
Protocol name: ********
Port name: *****
Mode: *************************
Current
State: UNDEFINED
Remote: ****************************
Path:
6. Move the cursor to item “Protocol name” and press F4 [CHOICE]. Select SM in the
menu.
7. Move the cursor to Startup State and press F4 [CHOICE]. Select START in the menu.
8. Press F2 [ACTION] and select DEFINE in the menu. Confirm that Current State change
to DEFINED.
9. Press F2 [ACTION] again and select START in the menu. Confirm that Current State
change to STARTED.
Comment: ****************
Protocol name: SM
Port name: *****
Mode: *************************
Current
State: STARTED
Remote: ****************************
Path:
Startup
State: START
Remote: *********************************
Path: *********************************
Options
Error Reporting: OFF
Inactivity Timeout: 15 min
57