Welcome, Guest. Please login or register.
Did you miss your activation email?
February 08, 2012, 12:11:17 PM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Industrial Robot Help and Discussion Center
| |-+  KUKA Robot Forum (Moderators: Werner Hampel, Martin H, SkyeFire)
| | |-+  make an original structure-type
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: make an original structure-type  (Read 501 times)
florian82
Guest
« on: March 16, 2010, 05:05:46 PM »

Hi,

I am trying to make an original structure-type ( BASE ) which grouped variables (vartype : frame) with this instruction :

Struc BASE FRAME zmax, zwork, zsecu

In my main program I declared :

DEF test()
BASE B

INI
...
B.zmax={X 1000, Y 1000, Z 1000, C 0}
...
END

but there is an error ...
could you help me please Huh?
Logged
TygerDawg
Full Member
***
Offline Offline

Posts: 205


« Reply #1 on: March 17, 2010, 01:49:26 PM »

Isn't "BASE" already a reserved keyword in KRL?  You can't use it for what your doing, can you?
Logged

TygerDawg
Blue Technik
Virtuoso Robotics Engineering
www.bluetechnik.com
mookie
Global Moderator
*****
Offline Offline

Gender: Male
Posts: 331



« Reply #2 on: March 17, 2010, 02:10:07 PM »

you only forgot to declare it

Code:
STRUC Base Frame zMax,zWork,zSecu
DECL Base B

That should work for you
Logged
florian82
Guest
« Reply #3 on: March 17, 2010, 03:12:29 PM »

thanks for your answer^^

to fix the first problem I have changed "BASE" with another name (site), and I declared it like you show me, but the problem persists...
In fact when I write for example:

STRUC site FRAME Zmax, Zwork, Zsecu
DECL site B
B.Zwork={X 1000, Y 1000, Z 1000, C 0}
B.Zsecu=B.Zwork
B.Zsecu.Z=B.work.Z + 100
PTP B.Zsecu

this is this error : XYZABC site non programmed
Logged
mookie
Global Moderator
*****
Offline Offline

Gender: Male
Posts: 331



« Reply #4 on: March 17, 2010, 03:28:38 PM »

Quote
author=florian82 link=topic=3979.msg16605#msg16605 date=1268835149]
thanks for your answer^^

to fix the first problem I have changed "BASE" with another name (site), and I declared it like you show me, but the problem persists...
In fact when I write for example:

STRUC site FRAME Zmax, Zwork, Zsecu
DECL site B
B.Zwork={X 1000, Y 1000, Z 1000, C 0}
B.Zsecu=B.Zwork
B.Zsecu.Z=B.work.Z + 100
PTP B.Zsecu

this is this error : XYZABC site non programmed

its because your missing values for a and b.. do this
Code:
STRUC site FRAME Zmax, Zwork, Zsecu
This
Code:
DECL site B = {zMax{x 0,y 0,z 0,a 0,b 0,c 0},zWork{x 0,y 0,z 0,a 0,b 0,c 0},zSecu{ x 0,y 0,z 0,a 0,b 0,c 0}}

Or This
Code:
DECL site B;

b.zMax = $Nullframe
b.zWork = $NullFrame
b.zSecu = $Nullframe
B.Zwork={X 1000, Y 1000, Z 1000, C 0}
B.Zsecu=B.Zwork
B.Zsecu.Z=B.work.Z + 100
PTP B.Zsecu
« Last Edit: March 17, 2010, 05:49:04 PM by SkyeFire » Logged
florian82
Guest
« Reply #5 on: March 17, 2010, 04:16:09 PM »

To understand the problem I tried this 2 programs but the result is the same they don't work....

DEF test ()

STRUC site FRAME Zmax, Zwork, Zsecu

DECL site B = {zMax{x 0,y 0,z 0,a 0,b 0,c 0},zWork{x 0,y 0,z 0,a 0,b 0,c 0},zSecu{ x 0,y 0,z 0,a 0,b 0,c 0}}
B.Zwork={X 1000, Y 1000, Z 1000, C 0}
B.Zsecu=B.Zwork
B.Zsecu.Z=B.work.Z + 100
PTP B.Zsecu
END

ERROR : I can't do this :
-  DECL site B = {zMax{x 0,y 0,z 0,a 0,b 0,c 0},zWork{x 0,y 0,z 0,a 0,b 0,c 0},zSecu{ x 0,y 0,z 0,a 0,b 0,c 0}}
B.Zwork={X 1000, Y 1000, Z 1000, C 0}
-  speed undefined axe A1



So I write this program :

DEF test2 ()

STRUC site FRAME zmax, zwork, zsecu
DECL site B

$VEL_AXIS[1]=100 ;Definition of the axis velocities
$VEL_AXIS[2]=100
$VEL_AXIS[3]=100
$VEL_AXIS[4]=100
$VEL_AXIS[5]=100
$VEL_AXIS[6]=100
$ACC_AXIS[1]=100 ;Definition of the axis accelerations
$ACC_AXIS[2]=100
$ACC_AXIS[3]=100
$ACC_AXIS[4]=100
$ACC_AXIS[5]=100
$ACC_AXIS[6]=100

B.zwork={X 0,Y 0,Z 0,A 0,B 0,C 0}
B.zsecu={X 0,Y 0,Z 0,A 0,B 0,C 0}
B.zwork = {X 1000, Y 1000, Z 1000, A 0}
B.zsecu = B.zwork
B.zsecu.Z = B.zwork.Z + 100
PTP B.zsecu
END

ERROR: XYZABC site non programmed
Logged
florian82
Guest
« Reply #6 on: March 17, 2010, 06:05:25 PM »

Hi!

Thanks for your advice!
In fact, i was editing my program in KRC editor and I saved it on a floppy. Then, I put the floppy into the KRC, copied the src file and launch it but there was the error "site non programmed"
In fact I had to open the file from the floppy with the HMI and then copy all the lines of the program, not just copy the file!
Create a new module and paste the program in this new module and it's working now  icon_wink
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!