Robot Program Pre Processor (uploader)

Hi,

We have had sample post-processors here on the forum for a while for exporting VC robot programs into native robot languages. Here is an add-on for doing the reverse. So now you can upload native robot program into VC simulation model. We start off with Kuka translator but more brands will hopefully be added in the future.

Install the addon by extracting the zip file to My Commands folder. Then restart the application and the “Upload” button shows up on the Program ribbon tab.

Package contains ReadMe.txt which has quick instructions on how to use different translators.

version_history_xxxx_xx_xx.txt shows the updates to the add-on.


Currently included uploaders:

  • Kuka (.src/.dat)
  • ABB (.mod)
  • Fanuc (.ls)
  • Yaskawa (.JBI)
---

Kuka translator lets you upload a single .src file. You can also include .dat file and $config.dat files in the same folder and add-on will recognize those. $config.dat is used to read base and tool data along with possible home positions.

The scope of the translator is limited. It can handle PTP/LIN/SPTP/SLIN motions, subroutine calls, binary input and output, IF and WHILE statements and simple data declarations and assignments. Translator uses regular expressions in parsing so there will be a small learning curve if you want to modify the parser.

-k

RobotUploader_2020_07_02.zip (33.9 KB)

version_history_2020_07_02.txt (371 Bytes)

1 Like

I added ABB uploader to OP attachment.

The scope of the uploader is very similar to Kuka uploader. You can load one .mod at a time but you can load other modules one by one and merge them into the existing program. When loading multiple modules load your main module last so that the subroutines exist for call references.

For DO/DI signal mapping you can use robotWrapper.SignalOutMapping and robotWrapper.SignalInMapping dictionaries. So add real_signal:sim_signal pairs (e.g. “doArcOn”:101) to those dictionaries to customize mapping to suit your cell. Without dictionary uploader tries to find signal index from the name (e.g. do12 => 12).

Uploader loads base and tool data from module and overrides current data. If this is unwanted just delete readBaseToolData() call on upload() function. The most common thing that can go wrong in the translation is the base/tool frame location. Uploader tries to find suitable node to attach the frame to but this requires that the kinematic structure on the simulation model matches the real device exactly. Mechanism names must match (e.g. positioner component name could be “STN1”). Also be aware of tracks as the robot world frame might not be at the same location as on the real cell when using tracks. In problem cases set frames manually and block readBaseToolData().

External axis value mapping can be changed on robotWrapper.ExAxisMapping. For example if the real cell has track as axis 7 (~E1) and positioner as axes 10 (~E4) and 11 (~E5) and on the sim model track is E1 and positioner is E2 and E3 then the ExAxMapping should be { 0:0, 3:1, 4:2, 1:3, 2:4, 5:5 } using zero-based indexing.

MoveC is loaded but only as two lin motions. Few comments surround that to notify that original motion was actually circular.

-k

Uploader for Fanuc added to OP attachment.

Fanuc uploader loads a single .LS file but you can also put POSREG.VA into the same folder and uploader will recognize it and position register inside it. You can load other .LS into the same simulation by choosing not to reset existing program.

There are limitations to the uploader. UFrame and UTool data is not loaded so you have the set those manually. Uploader will not translate all jumps but only the ones that form a loop and then it will form a while from it. Some program flow instructions like SELECT is not supported. In motions OFFSET and TOOL_OFFSET are not supported. This uploader doesn’t support Karel but only the .LS files.

The functionality is somewhat in line with other translators on this package and it matches the Fanuc downloader on the forum (https://forum.visualcomponents.com/forums/topic/post-processor-with-sample-translators/).

I couldn’t do tests with a real robot so any feedback on this is welcome.

-k

I added Yaskawa uploader to the OP.

Yaskawa can read PULSE and RECTAN jobs but there may be some issues with translating jobs from some systems. In case of problems please reply this thread about the issues and we try to update the translator. Please read ReadMe.txt in the package for details.

-k

Hello Keke!

I’ve found some minor issues, with Fanuc PP.
In my .ls the 0.xxx (float) values were printed out as .xxx or -.xxx
The PP could’t handle the Config and Location Names either.

P[1:“HOME”]{
GP1:
UF : 0, UT : 1, CONFIG : ‘N U T, 0, 0, 0’,
X = 621.034 mm, Y = .549 mm, Z = 172.662 mm,
W = -174.542 deg, P = -.934 deg, R = 107.944 deg
};

There were also problem with the IF statement.
It look like this:
1: LBL[1] ;
2: !home ;
3: PAYLOAD[1] ;
4:J P[1:HOME] 100% FINE ;
5: ;
6: DO[102:LEF.HOME]=ON ;
7: DO[101:LEF.FENT]=ON ;
8: ;
9: DO[103:LEF.UZEMKESZ]=ON ;
10: !------------------------ ;
11: ;
12: IF DI[101:CIKLUS START/lef indulht]=ON AND DI[106:LEFUJO AUTOMATABAN]=ON,JMP LBL[2] ;
13: ;
14: JMP LBL[1] ;
15: !gep fole all ;
16: ;
17: LBL[2] ;
18: ;
19:J P[2] 100% CNT100 ;
20:…

I hope this is useful. :slight_smile:

Hi @peter2szabo,

Thanks for the feedback. I’ll add those to my to-do list and try to come up with fix in near future.

BR, Keijo

Hi keke,

Are you planning to add a Mitsubishi uploader?
And DENSO uploader/downloader too.

Hi Bunta,

We don’t have Mitsubishi or Denso uploaders planned at this moment. Denso downloader could be something we could add in the future to our translators.

In general downloaders are easier to make and that’s why we have more of those. Uploading process can be a lot more complex because you may need to read in data from multiple sources like global variables stored somewhere else than the actual job file. Also native languages have a lot of commands that are not supported in VC such as JUMP-LABEL (or GOTO-LABEL). So translating them into VC program is really difficult. Downloading is easier as VC statements can usually be easily mapped to native robot commands.

-k

Hi keke,

Thank you for answering.
We look forward to future upgrades.