We have KRC4 8.5.7 HF1 and robot is KR 90 R3100 extra HA. The robot will be used for welding application.
The end customer wants us to write a basic program so that robot can go to homeposition etc.
The routine(s) for the welding will be programmed later on by the customer.
The welding must be in a separate source file (from home to welding start point, start welding, until end of welding).
The customer wants to create for every different workpiece he has to weld a new source and corresponding dat-file.
So as time goes by, more and more src-dat files will be added. These files and the routine for welding inside the src-file will have
a typical naming : f.i. welding1.src, welding2.src, etc.
We should at some place in our main program call this routine in the welding source file.
Normally calling a routine in a program is hardcoded.
Is there any possibility to call a routine based on the content of a string variable (in case of krc4 it will be char-array)?
Char-array will be written manually from kcp or from plc communication, and our main program will then call the routine with the name inside that variable.
Call program indirectly
-
Plc_User -
October 1, 2019 at 1:20 PM -
Thread is Unresolved
-
-
AFAIK, calling function by variable is not yet possible in KRL. I've hear there were some changes in KSS 8.5 with programs residing on the drive, instead of RAM; maybe you can load different subprograms with the same name?
Otherwise, look into Directory Loader.
-
Hello,
is there an update to this topic?
-
It is possible to do things like that, but you have to change the method of calling/running programs.
You will not have one main program like f.e. CELL.SRC that runs the whole time.
You have to use robot in EXT mode, and use a PLC, or you have to connect some inputs to outputs of the robot, to control auto extern signal by SPS.SUB.
And you have to create a logic in SPS.SUB that start/stop/cancel/select the appropriate program in conjunction with PLC. With that logic you can start a program with a variable name.
This way in can be done since KRC1.