Author Topic: Scrolling a large file on the KCP  (Read 4207 times)

Wall-E

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 159
    • View Profile
Scrolling a large file on the KCP
« on: January 16, 2016, 05:00:43 PM »
I knew there was a size limit to krc2 program, and bam ! I hit it today.
It's around 30 000 lines :(
Next time, I guess I'll use the split function in the KUKA-prc code settings.

At some point, I needed to move up and select a previous line in the program on the KCP, and found out that the elevator on the side was completely wonky.
It either brought me back at the start of the program, or would just scroll super-slowly.
I suppose that this is because of the large number of lines, but is there a way to move to a specific line number by just typing that number ?
Couldn't find it...

Cheers,

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 581
    • View Profile
    • Robots in Architecture
Re: Scrolling a large file on the KCP
« Reply #1 on: January 17, 2016, 04:37:08 PM »
Hmmm... I would try attaching a keyboard, then you should be able to use the arrow keys, as well as the page up/down buttons (next to print, delete, etc.)
You may need to get a PS/2 keyboard, though USB could work as well, depending on the age of your controller.

Best,
Johannes


Wall-E

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 159
    • View Profile
Re: Scrolling a large file on the KCP
« Reply #2 on: January 18, 2016, 12:20:03 PM »
Thanks for the answer Johannes,

The keyboard might help indeed...
But now, I have a big program that I had to split in multiple files.
I suppose that the scrolling will be better in each individual file, thanks to the fewer lines.

Yet, I have a problem when loading these files on the controller :
I have 10 files in total, the first one is 2kb (the one that calls the others), and the next 9 ones are between 300 and 600 kb.
The copy process works for a few of them but then, I get "No physical memory" error messages, and also "(filename).SRC is not correctly copied. Error in line 5448".

Must I understand that there is a physical limit to the size of the sum of the files ?
It's a 5.5mb total ; Shouldn't Windows XP be able to handle this ?
Is there a software setting for this somewhere in the KUKA "Konfigurator" ?

Boy... I wish I was rich and could afford a more recent controller....

By the way, what does "Improve compatibility with older KRC" mean ?
What do you consider as the "baseline" KRC , then ?

Cheers,


Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 581
    • View Profile
    • Robots in Architecture
Re: Scrolling a large file on the KCP
« Reply #3 on: January 18, 2016, 12:27:29 PM »
Hello,

5.5MB is already quite much and will run into memory limits. For really huge jobs you will need software like CAMRob or KUKA.CNC, they circumvent the memory issues.
Consider removing old files from your robot folder - basically everything you put in there gets compiled and counts against your memory. Splitting files only helps with the lag, but the total memory is the same.
Quite frankly I don't know the exact version "cut-off", but there are issues with the BAS command in older controllers and ticking the box changes one line in the KRL file. If you can run KRL files with the default settings you don't need it.
KUKA|prc also contains an Reduce Toolpath component that works with LIN movements - may be helpful in your case!

Best,
Johannes

Wall-E

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 159
    • View Profile
Re: Scrolling a large file on the KCP
« Reply #4 on: January 18, 2016, 01:04:57 PM »
Thanks Johannes, this is extremely useful.
I can delete or move a few programs indeed.
The fact that the controler compiles every program in the folder doesn't seem very smart on Kuka's part, but I suppose they have a good reason...

Cheers,

Wall-E

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 159
    • View Profile
Re: Scrolling a large file on the KCP
« Reply #5 on: January 22, 2016, 09:39:16 PM »
Hi Johannes,

I tried the "Reduce Filesize - Skip redundent positions" with a new program, and I found that the file size was divided by 2.
So I decided to crank up the number of holes and exported new files.
Unfortunately, the files created with this option are systematicaly rejected (compilation error).
Is this feature compatible with KRC2 ?

Cheers,

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 581
    • View Profile
    • Robots in Architecture
Re: Scrolling a large file on the KCP
« Reply #6 on: January 22, 2016, 11:04:07 PM »
Hello,

That shouldn't happen, please send me an eMail with the file in question and I can double-check it. Usually the controller will also give you the number of the line where the error occurred - that should be helpful as well.
It's also possible to be related to the filename or e.g. something you entered into a Custom KRL component.
I don't think it's connected to the KRC2 controller, though!

Best,
Johannes

Wall-E

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 159
    • View Profile
Re: Scrolling a large file on the KCP
« Reply #7 on: January 25, 2016, 11:03:30 PM »
Hi Johannes ,

any luck with my files ?

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 581
    • View Profile
    • Robots in Architecture
Re: Scrolling a large file on the KCP
« Reply #8 on: January 26, 2016, 08:28:57 AM »
Hello,

I got your eMail, but haven't had time to do anything in KUKA|prc about it. Most likely I'll get to it tomorrow.
If you've got time with the robot, you can try removing the comma after the E4.
Please note that I've never gotten a definitive answer if a reduced file is smaller in memory (i.e. when it's being executed, of course it's smaller on the disk) than a non-reduced file.

Best,
Johannes

Wall-E

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 159
    • View Profile
Re: Scrolling a large file on the KCP
« Reply #9 on: January 26, 2016, 09:44:13 AM »
Hi Johannes,

the E4 ?
Anyway, even by doubling the data, this memory limitation is quite a disappointment.
I guess that at the time of KRC2, robots were mostly used to stack pallets and make a couple of spot welds...

There has to be some kind of hack for this...

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 581
    • View Profile
    • Robots in Architecture
Re: Scrolling a large file on the KCP
« Reply #10 on: January 27, 2016, 09:53:50 AM »
Well, there is KUKA CAMRob which does exactly that - no idea how much it costs, though.
There the movements are written into a CSV or BIN file which is read in real-time without putting it all into memory.

Best,
Johannes

Yijiang Huang

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 1
    • View Profile
Re: Scrolling a large file on the KCP
« Reply #11 on: April 25, 2016, 06:25:42 PM »
Hi everyone,

I am working on a .src file that has 30mb in size. I knew that there's a size-limit for single .src file because the file should be loaded in VxWorks (RealTime OS), which has a restricted RAM size. However, thank god that our brilliant PRC has the functionality of <Splitting KRL for *** lines each> which automatically split my program into severak sub-programs, which all have size under 8 mb limitation.

However, when I get so happy to think that I can finally run my programs with ease, I cannot copy and paster them in KRC:/R1 folder and the system showed me

-- "No user memory available."

and only successfully loaded one of the files into R1 folder. I cleaned my KRC:/ folder from bottom to the top but still cannot load my programs in KRC directory.

I understand that there should be a over-all size limitation because it needs some spare RAM to process and guarantee safety. But it is too restrictive to only allow users to utilize 8 mb for all.

I am using Kuka KR10-1100 and has a KRC4-compact controller.

Is there some thing wrong with my KRC or it is a common problem? If it does, what is the reason to implement <Split functionality>, since even if we split the program into several smaller one, we still cannot load them in the KRC RAM?

The "Main Programs" are showed as followed:

&ACCESS RVP
&REL 1
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF Foshan ( )

EXT Foshan_1()
EXT Foshan_2()
EXT Foshan_3()

;FOLD INI
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;ENDFOLD (INI)

;FOLD STARTPOSITION - BASE IS 0, TOOL IS 1, SPEED IS 5%, POSITION IS A1 5,A2 -90,A3 100,A4 5,A5 10,A6 -5,E1 0,E2 0,E3 0,E4 0
$BWDSTART = FALSE
PDAT_ACT = {VEL 5,ACC 100,APO_DIST 50}
FDAT_ACT = {TOOL_NO 1,BASE_NO 0,IPO_FRAME #BASE}
BAS (#PTP_PARAMS,5)
PTP  {A1 5,A2 -90,A3 100,A4 5,A5 10,A6 -5,E1 0,E2 0,E3 0,E4 0}
;ENDFOLD

;FOLD LIN SPEED IS 0.1 m/sec, INTERPOLATION SETTINGS IN FOLD
$VEL.CP=0.1
$APO.CVEL=70
;ENDFOLD
;FOLD RESET OUTPUTS TO DEFAULT VALUES (FALSE for DIGITAL, 0 for ANALOGUE
$OUT[1]=FALSE
$OUT[2]=FALSE
$OUT[3]=FALSE
$OUT[4]=FALSE
$OUT[5]=FALSE
$OUT[6]=FALSE
$OUT[7]=FALSE
$OUT[8]=FALSE
$ANOUT[1]=0.0
$ANOUT[2]=0.0
$ANOUT[3]=0.0
$ANOUT[4]=0.0
;ENDFOLD

Foshan_1()
Foshan_2()
Foshan_3()

END
-----------------------------------------------------------------
PS: There are some "unofficial tricks" to expand your single-file size limitation. Please refer: https://www.robot-forum.com/robotforum/kuka-robot-forum/krc4-no-physical-memory-cold-start-required/, Meigo62's reply.

I've tested it to expand the file limitation from dword:2000 to dword:4000 (4000 * 4kb = 15.6mb), but *BE CAREFUL* not to push it too high because this might crash your system and make it unable to connect the IP. (and take you some time to return to normal)

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 581
    • View Profile
    • Robots in Architecture
Re: Scrolling a large file on the KCP
« Reply #12 on: April 26, 2016, 12:35:33 AM »
Hello,

The file-splitting is mostly helpful for a responsive KCP - as all programs are loaded into memory, it does not make a large difference.
Personally I would rather create multiple files that you start one after another. An easy way to do that is to split the list of movements into several sub-lists of KUKA|prc commands. For each list, create a file-name. Now if you right-click the core component and choose "Expose Save Toggle" you can enter a name for every file and should get one file for each sub-project.
You may need some additional retract/approach movements to make it save.

Best,
Johannes