11-04-2016 01:42 AM
Hi
I am trying to create a auto robot downloader of all the robot operation to a specific place. I have had a look and there is a DCMUtilities that does only robot programs and not operations. Any help would be great thank
Regards
11-04-2016 05:52 AM
Hi,
I did something similar in the past maype this code helps you.
TxOlpControllerUtilities txOlpControllerUtilities = new TxOlpControllerUtilities();
foreach (TxRoboticProgram prog in TxApplication.ActiveDocument.RoboticProgramRoot.DirectChildPrograms)
{
string path = @"C:\temp\testprog.src";
ITxRoboticDownloader downloader = txOlpControllerUtilities.GetInterfaceImplementationFromController(prog.Robot.Controller.Name,
typeof(ITxRoboticDownloader),
typeof(TxControllerAttribute),
"NameOfController") as ITxRoboticDownloader;
downloader.Download(prog, path, true);
}
Good luck
Best regards
Patrick
11-04-2016 07:52 AM
Hi
Great thanks for the help. I am getting an error please see below with the below line. Which is strange because I am pulling the controller string directly from the robot
ITxRoboticDownloader downloader = OlpControllerUtil.GetInterfaceImplementationFromController(robot.Controller.Name, typeof(ITxRoboticDownloader), typeof(TxControllerAttribute), robot.Controller.Name);
11-04-2016 08:39 AM
Hi,
It looks like your Controller is not compatible with your PS version.
e.g. you have installed PS13.0 but you use kuka-krc-bmw controller for PS13.0.2.
The best will be to uninstall the actual controller via Windows -> Control Panel -> Programs and Features.
Download the correct robot controller from GTAC for you installed PS version.
Best regards
Patrick
11-06-2016 09:16 AM
RobSimCoder schrieb:
ITxRoboticDownloader downloader = OlpControllerUtil.GetInterfaceImplementationFromController(robot.Controller.Name, typeof(ITxRoboticDownloader), typeof(TxControllerAttribute), robot.Controller.Name);
The problem is in the last argument of the GetInterfaceImplementationFromController method. You pass the value of the property to the method instead of the property name.
Try
ITxRoboticDownloader downloader = OlpControllerUtil.GetInterfaceImplementationFromController(robot.Controller.Name, typeof(ITxRoboticDownloader), typeof(TxControllerAttribute), "ControllerName");
11-09-2016 03:54 AM
Hi
Great thank you this now works. But there are two thing it is not doing like the normal downloader.
1. It does not create the *.olp program.
2. It does not create the .dat global template file.
I have had a look but I cannot see how to pull this information from the robot setup and into the download.
Thanks again for the help
11-12-2016 10:35 AM
Does the command create a logfile?
If so, are there any informations about *.olp and *.dat template?
11-13-2016 09:37 AM
Do you mean, you do not get same generated files whether you download from Process Simulate / Select Operation / Download To Robot or via your command that uses the API?
In theory, there should be no difference.
11-13-2016 01:11 PM
I created a simple class to test the code.
The *.olp file is not created using the API.
There is an error message in the logfile.
The path to program.olp is completely wrong.
The correct path to the RobotsMachineDataFiles-Directory is D:\eMSysRoot\RobotsMachineDataFiles\
I passed E:\program.src as the path for the Download method.
Process Simulate is started in Visual Studio, and my code is in a directory on P:\
11-14-2016 03:53 AM
Strange. There is no reason download from API will find wrong machine data file folder (or at least a different one from download for PSR menus)...
Watch Replays of Previous Topics