Is it possible to start a virtual controller from command line?

I have a machine that is constatnly running a virtual controller for various test purposes. I would like it to start the virtual machine automatically after a restart.
So, is it possible to start a virtual machine from commandline or by other means possible to schedule at startup of windows?
Best regards
Markus
So, is it possible to start a virtual machine from commandline or by other means possible to schedule at startup of windows?
Best regards
Markus
//Markus Näslund
Best Answers
-
scottdf93 United Kingdom ✭
Markus Näslund said:I have a machine that is constatnly running a virtual controller for various test purposes. I would like it to start the virtual machine automatically after a restart.
So, is it possible to start a virtual machine from commandline or by other means possible to schedule at startup of windows?
Best regards
Markus
using ABB.Robotics.RobotStudio.Stations;
RsIrc5Controller irc5= new RsIrc5Controller(directoryOfTheController);
await irc5Controller.StartAsync(VirtualControllerRestartMode.WarmStart, mechanisms, false);
-
Maxim Riabichev Sweden admin
Hello Markus,
Try this:
1. Add the dependencies RobotStudio.Services.RobApi and RobotStudio.Services.RobApi.Desktop
2. RobVcFactory.StartVC("PathToVC",VCStartType.WarmStart,VcStartOptions.Default);
Answers
If anybody knows a way to start a virtual controller with the RobotStudio SDK and a console application any help would be greatly appreciated.
This was the solution I managed to find:
RobotStudioAPI.Initialize();
ApiServices.Simulator = new RobotStudio.Services.Simulation.SimulatorService();
ApiServices.Controller = new RobotStudio.Services.Controller.ControllerService();
RsIrc5Controller c = new RsIrc5Controller("PathToVC");
Task tc = c.StartAsync(VirtualControllerRestartMode.WarmStart, null, false);
Thanks again, I will replace my solution with yours since it feels cleaner.
Br
Markus