Correct that is an important note which I did not mention: ASCII upload is always the way to go if you have the option installed. It provides full functionality while the mnemonic approach has limitations.
Posts by JT
-
-
See attached code which contains a non supported build-in. Not all movement types are supported but it might do the trick for your application.
Fanuc is not keen on supporting movement in Karel. Their vision is that all generated points should be teached by a qualified operator in TP. Karel logic programs can then call these teached movement TP programs.
But FANUC seems to forget that in some cases you have to use the readily available robot kinematic model on the controller to compute or convert points during operation, so it is easier to let the controller generate the TP programs without any link to a PC/software. On the opposite of the attached code typically a software is used to create the TP program structure and points offline which is then uploaded to the controller. In the latter if anything goes wrong the software is to blame and not the controller. I guess it is a question of liability.Have fun!
-
This tool can save/restore sysvar data to/from a logfile. Advantages are:
-Corrupt sysvar: No need to restore the complete sysvar, only robot specific data.
-Uniformity: Copy data from robot to robot.
-RG: Copy sysvar data from roboguide to robot.Sysvar copyable data contains:
-Space check!
-Payloads
-Axis Limits
-Sys config
-Refpos
-UALM
-Uframes
-LineTracking
-Host commA downside is that restoring data from USB/MC might take up to 30 min. Be patient...
(R30i A/B tool)Have Fun!
-
Had more than a few questions to recompile it for older controller versions. Now compiled with v6.40-1 or usable for RJ3iB up to R30iB+
Have fun!
-
A single iteration 4 points method made in Karel. At this moment I don't see any usefull application for it, but it might help give insights.
Have fun!
-
This program can retrieve passwords/userlevels and DCS code on R30iB, R30iA, RJ3iC(old R30iA) and RJ3iB.
It's useless on a controller when you are not logged in at a higher userlevel. In the operator userlevel it is not possible to transfer and run a karel file.Have fun!
-
Post-debugging: When the robot is in fault -> take a backup AoA and have a look to the summary.dg file.
Under tasks states you can find the history data, below an example where JOB1 is started, JOB1 calls JOB2 in line3, JOB2 calls JOB3 in line4, JOB3 calls JOB4 in line 4, JOB4 goes in error due to a motion limit. it is paused at line 3.TASK STATES:
1 JOB1 PAUSED @ 3 in JOB4 of JOB4
****** History Data ******
Routine depth: 3 Routine: JOB4
Line: 3 Program: JOB4 Type: TPRoutine depth: 2 Routine: JOB3
Line: 4 Program: JOB3 Type: TPRoutine depth: 1 Routine: JOB2
Line: 4 Program: JOB2 Type: TPRoutine depth: 0 Routine: JOB1
Line: 3 Program: JOB1 Type: TP -
Set $SCR_GRP[1].$M_POS_ENB to true and reboot.
$SCR_GRP[1].$MCH_SPD will give calculated TCP speed.The variable is not very accurate (spikes) and refresh rate is low, so for most applications you should still need to order the mentioned option. At least you can start testing now.
-
Or you could use a PIP-file in case memory-management is an issue, it offers following functionality:
-Read and write data at the same time. (a Karel program fills the buffer while another retrieves information of interest)
-Rolling bufferThe max buffer size is determined by the PERM cmos memory (menu>statu>memory) if 'cmos_flag=TRUE' is enabled. 700kb equals +- 20 000 lines of 40 char logging data.
PROGRAM pip_write
%NOLOCKGROUP
%NOPAUSE= COMMAND + TPENABLE + ERRORVAR
out_file:FILE
console:FILE
cmos_flag: BOOLEAN
n_sectors: INTEGER
record_size: INTEGER
form_dict: STRING[32]
form_ele: INTEGER
STATUS:INTEGER
i: INTEGERBEGIN
FORCE_SPMENU(TP_PANEL,SPI_TPUSER,1)--activate user
WRITE(CHR(128),CR)--clear user screen
cmos_flag=TRUE -- CMOS_flag if set to TRUE will put the pipe data in CMOS. By default pipe data is in DRAM.
-- If CMOS_FLG = False; n_sectors will stay default 8 ==> 8 * 1024 = 8192 characters
-- Put CMOS_FLG = TRUE to change the n_sectors. (example 32 ===> 32 * 1024 = 32768 bytes of logfile)
n_sectors = 700 --n_sectors number of 1024 byte sectors to allocate to the pipe. The default is 8
record_size = 0 --record_size the size of a binary record in a pipe. If set to 0 the pipe is treated as ASCII
form_dict = 'test'
form_ele = 1
PIPE_CONFIG( 'PIP:JT_1.dat', cmos_flag, n_sectors, record_size, form_dict, form_ele, STATUS) --need to be called before file is openOPEN FILE out_file ('rw', 'PIP:JT_1.dat')-- open file for write to device PIP:
STATUS = IO_STATUS(out_file)
WRITE TPDISPLAY('status open file for write',STATUS,CR)
FOR i = 0 TO 20005 DO
WRITE out_file ('nr', i , ' - Data that I am logging', CR)
ENDFOR
STATUS = IO_STATUS(out_file)
WRITE TPDISPLAY('status after writing',STATUS,CR)
CLOSE FILE out_fileEND pip_write
-
To check the file size you can use the FILE_LIST built-In procedure:
----------------------------------------------------------
--- Display a directory listing of files on the MC drive:
file_spec = 'MC:\*.*' -- All files in MC drive
n_skip = 0 -- First time do not skip any files
format = 4 -- Return list in filename.filetype size date time - format
WRITE ('Doing FILE list',CR)
REPEAT -- UNTIL all files have been listed
FILE_LIST(file_spec, n_skip, format, ary_nam, n_files, STATUS)
IF (STATUS <>0 ) THEN -- Error occurred
WRITE ('FILE_LIST builtin failed WITH STATUS = ',STATUS,CR)
ELSE
displ_list(n_files) -- Write the names to the TP USER menu
n_skip = n_skip + n_files -- Skip the files we already got.
ENDIF
UNTIL (ARRAY_LEN(ary_nam) <> n_files) -- When n_files does not equal
----------------------------------------------------------------------------The file size is written in:
ary_nam :ARRAY[100] OF STRING[40] -- Returned names format: filename.filetype size date time
and always starts with char 21Date and time is only supported if the device supports timestamping. I guess this is related to a controller SW-version...