Thanks.
The problem is solved.
It must be "LOAD ('UD1:\'+prog_name+'.pc', 0, LoadSTATUS)" instead of "LOAD (prog_name+'.pc', 0, LoadSTATUS)"
Thanks.
The problem is solved.
It must be "LOAD ('UD1:\'+prog_name+'.pc', 0, LoadSTATUS)" instead of "LOAD (prog_name+'.pc', 0, LoadSTATUS)"
Hi everyone!
Can't understand where is my mystake in using LOAD program instruction.
PROGRAM testkarel
VAR
prog_name :STRING[12]
ListSTATUS :INTEGER
LoadSTATUS :INTEGER
prog_type IN DRAM :INTEGER
n_match IN DRAM :INTEGER
n_skip IN DRAM :INTEGER
format IN DRAM :INTEGER
ary_nam IN DRAM :ARRAY[5] OF STRING[20]
BEGIN
prog_name = 'perch_init' -- Only interested in PERCH_INIT program
prog_type = 6 -- Interested only in PC type files
n_skip = 0 -- First time do not skip any files
format = 1 -- Return just the filename
PROG_LIST(prog_name, prog_type, n_skip, format, ary_nam, n_match, ListSTATUS)
LOAD (prog_name+'.PC', 0, LoadSTATUS)
END testkarel
Display More
As relult, I have:
ListSTATUS = 0
ary_nam[1]='perch_init'
LoadSTATUS=2014 - file not found.
Can't understand, what's the problem
hmmmm... that is weird. what KSS?
KSS 8.5.7 HF1
Still does not explain why mount command was reporting success....
Hm, looks like a bug...
Quotetry to map something that is on existing machine, maybeon C:\ then on D:\
Do you mean trying to get access to the machine on which I execute KRL program?
If yes, I did this way. Firstly on D:\ and then on C:\. I executed the program on Rob1 (ip 192.168.200.154) and used the code:
CWRITE($FCT_CALL, State, Mode, "krl_mount", "/TestMount", "//192.168.200.154/D/Backup", "KUKAUser", "0E76390E88C27932C9816D326AF12CEA2B")
Is that right?
Hi, panic mode
Thanks, it works.
But now I have another issue.
I have two robots. I want to have access to the files on Rob2 from Rob1 (using KRL program). The both robots are connected to the company network and I have access to them from my office laptop.
I executed khash.exe on Rob2 and got the encrypted password (For encryption I used the standard kuka password: 68kuka1secpw59)
Now I try to create a mount point by calling krl_mount() function:
CWRITE($FCT_CALL, State, Mode, "krl_mount", "/TestMount", "//192.168.200.155/D/Backup", "KUKAUser", "0E76390E88C27932C9816D326AF12CEA2B")
But CWRITE returns the error: Operation failed: invalid user, incorrect password, mount point
not available, file not available, etc.
Don't understand what I do wrong. Maybe I should use the other data for USERNAME and PASSWORD?
Hi, guys.
Can someone help me to understand the use of the program khash.exe? It's not clear for me from CREAD, CWRITE manual.
QuoteThe program khash.exe in the directory C:\KRC\UTIL\Hash of the robot controller
is available for encrypting the password. The program khash.exe must
be executed on the Windows shell cmdk.exe and entry of the password is required.If, for example, the password for the user is “kuka”, the encryption program on
the Windows shell is called as follows: khash.exe kukaThe encrypted password that must be used when calling krl_mount() in the
KRL program is then displayed on the Windows shell.
1. I can't find cmdk.exe in the system. I so understand I can use cmd.exe? Ok. I execute khash.exe on the Windows shell cmd.exe (see the attached image). Where should I look for the encrypted password.
2. Which password should I use? For example, I have two robots in my network (rob1 and rob2). I want to have an access from rob1 to the file on the D drive of the rob2 (by CWRITE). On which robot should I execute khash.exe to get the encrypted password? Or it makes no differance?
Unfortunately, it's limited. I mean, these variables...
Hi everyone!
Does anyone know is it possible to simulate inputs and group inputs on KSS 8.5.6?
RELEASE Statement
Purpose: Releases all motion control of the robot arm and auxiliary or extended axes from the KAREL
program so that they can be controlled by the teach pendant while a KAREL program is running.
Under what conditions can we have this: program had motion control before TP is ON + teach pendant is ON + KAREL program is running after TP is ON?
And from the remarks to the B.1 SETTING UP DIGITAL OUTPUT PORTS FOR PROCESS MONITORING program:
Release motion control from the KAREL program to the TP control. Robot can be moved to desired Perch position without disturbing the flow of this KAREL task.
How is it possible?
QuoteNo, it won't work. Just read what the manual says - programs CAN NOT lock any motion group for %NOPAUSE to work.
You might try writing a program with %NOPAUSE (or Ignore Pause set to true), which in turn will RUN (not CALL) a program with a motion group - I think it might work.
Yes, it works. Thank u very much.
But, if the combination %NOPAUSE and no %NOLOCKGROUP directive doesn't work, how to understand the example B.1 SETTING UP DIGITAL OUTPUT PORTS FOR PROCESS MONITORING from KAREL manual? They use this combination and they use RELEASE and ATTACH commands in the program.
QuoteHave you used %NOLOCKGROUP directive in the Karel program?
No. I use the program instructions RELEASE and ATTACH to release and attach motion control from/to the KAREL program. Theoretically it must work. But practically....
Hi, pmt257...
Thank u for help.
Now it's work. But the reason why it didn't work before is unknown.
It worked the next day without problems. And it doesn't depend on whether it's a parent program or a subprogram.
But with KAREL programs this feature still doesn't work. I try to understand the reason...
Hello everybody.
In the TP program header information there is an attribute:
Ignore Pause
If the program type has been set to NONE, you can use ignore pause to specify whether the program
will continue to run even when an error occurs, a command is issued (such as pushing EMERGENCY
STOP or HOLD), or the teach pendant is enabled. Ignore pause is allowed only in programs that do
not have motion groups specified such as an I/O monitoring program. This means that programs that
use ignore pause cannot contain any motion instructions.
There is something like that in a KAREL program:
%NOPAUSE Translator Directive
Purpose: Specifies a mask for pausing
Syntax : %NOPAUSE = ERROR + COMMAND + TPENABLE
Details:
• The bits for the mask are as follows:
ERROR : ignore pause error severity
COMMAND : ignore pause command
TPENABLE : ignore paused request when TP enabled
• Any combination of ERROR, COMMAND, and TPENABLE can be specified.
• If the program is paused by itself, the %NOPAUSE directive will be ignored and program
execution will be paused.
• This directive is only effective for programs with %NOLOCKGROUP. If the program has motion
control, the %NOPAUSE Directive will be ignored and program execution will be paused.
But I can't understand under what conditions it works. I tried run programs (TP or KAREL) with all these settings in AUTO mode and then turned on Teach Pendant and the running program went into PAUSE state.
Can anybody help me to understand the reason?
Hello, guys...
In the KAREL Reference Manual there is the example:
PROGRAM testTPmotion
VAR
home_pos :XYZWPR
BEGIN
WRITE ('HOME POSITION is not recorded', CR)
WRITE ('RELEASing motion control to TP.', CR)
WRITE ('Please move robot to desired Perch Pos', CR)
-- Wait until the DEADMAN switch is HELD and
-- TP is TURNED ON to move robot from TP
--GOTO label_1
WHILE ((TPIN[248] = ON) OR (TPIN[247] = ON)) DO -- TPIN[247] TPIN[248] = Right/Left DEADMAN switch
WRITE TPPROMPT (CHR(128), CHR (137), 'Hold down the DEADMAN switch')
DELAY 500
ENDWHILE
--label_1::
-- Release motion control from the KAREL program to the
-- TP control. Robot can be moved to desired Perch
-- position with out disturbing the flow of this KAREL task.
RELEASE
WHILE (TPIN[249] = OFF) DO -- TPIN[249] = ON/OFF switch
WRITE TPPROMPT (CHR(128), CHR(137), 'Turn OFF TP after move is done')
DELAY 1000
ENDWHILE
-- KAREL program execution will not continue passed ATACH
-- statement until the TP is turned OFF
-- Wait until the TP is TURNED OFF after move from TP is completed
WHILE (TPIN[249] = ON) DO
DELAY 2000
ENDWHILE
-- At this point the robot is positioned to the desired
-- Perch position. Get the motion control back
-- from TP and recored the perch position
ATTACH
home_pos = CURPOS (0, 0, 1)
END testTPmotion
Display More
According to this example, as I understand, when robot is in AUTO mode and this program is running, if perch position is not recorded, under some conditions I can turn TP off and move the robot.
Did somebody try this program? Today I did it, but when turning TP on I have the error message: "TP enabled in AUTO mode".
What's wrong with this example? Or may be I got this program wrong?
Paths don't contain any nodes by default, you have to add them first using APPEND_NODE().Then you can use it.
Thank u very much. It works
Maybe just because you didn't declare what structure you want to use for PATH, there KAREL can not find "node_pos " variable.
I'm not sure. I have to declare the structure if I declare the path variable with the clause NODEDATA following the word PATH.
QuoteA PATH can be declared with either, neither, or both of the following clauses following the
word PATH:
— NODEDATA = node_struct_name, specifying the data structure constituting a path node.
— PATHHEADER = header_struct_name, specifying the structure constituting the path header.
If not...
QuoteIf NODEDATA is not specified, it defaults to the STD_PTH_NODE structure described in
Appendix A.
QuoteDisplay MoreSTD_PTH_NODE Data Type
Purpose: Defines a data type for use in PATHs.
Syntax : STD_PTH_NODE = STRUCTURE
node_pos : POSITION in GROUP[1]
group_data : GROUP_ASSOC in GROUP[1] (no longer used)
common_data : COMMON_ASSOC (no longer used)
ENDSTRUCTURE
Details:
• If the NODEDATA clause is omitted from the PATH declaration, then STD_PTH_NODE will
be the default.
• Each node in the PATH will be of this type.
But, from KAREL reference manual:
QuoteDisplay MorePATH Data Type
Purpose: Defines a variable or routine parameter as PATH data type
Syntax : PATH
Details:
• A PATH is a varying length list of elements called path nodes, numbered from 1 to the number of
nodes in the PATH.
• No valid operators are defined for use with PATH variables.
• A PATH variable is indexed (or subscripted) as if it were an ARRAY variable. For example,
tool_track[1] refers to the first node of a PATH called tool_track .
And there is the example from the manual:
TYPE
node_struct = STRUCTURE
node_posn: XYZWPR IN GROUP[1]
aux_posn: JOINTPOS IN GROUP[2]
weld_time: INTEGER
weld_current: INTEGER
ENDSTRUCTURE
hdr_struct = STRUCTURE
uframe1: POSITION
utool: POSITION
speed: REAL
ENDSTRUCTURE
VAR
path_1a: PATH PATHHEADER = hdr_struct, NODEDATA = node_struct
path_1b: PATH NODEDATA = node_struct, PATHHEADER = hdr_struct
path_2: PATH NODEDATA = node_struct -- no header
path_3: PATH -- NODEDATA is STD_PTH_NODE
path_4: PATH PATHHEADER = hdr_struct -- NODEDATA is STD_PTH_NODE
The following example shows how elements of the NODEDATA and PATHHEADER structures
can be referenced.
PATH Data Type
-- Using declarations for path_1a:
-- Using NODEDATA fields:
path_1a[1].node_posn = CURPOS(0, 0)
cnt_dn_time = path_1a[node_no].weld_time
-- Using PATHHEADER fields:
path_1a.utool = tool_1
Display More
Hi.
I have a very simple program code in KAREL
1 PROGRAM test
2
3 VAR
4
5 test_path: PATH
6
7
8 BEGIN
9
10 test_path[1].node_pos = CURPOS(0, 0)
11
12 END test
Display More
The program compiles succesfully. But when running it gives the error for 10th line: VARS-024 Bad variable or register index.
Can't find the problem.