This program demonstrates using YMConnect to start a job on a robot controller. The controller needs to be switched to Remote mode in order to turn servos on. This code is the same for Windows or Linux.
#include "YMConnect.h"
void main()
{
StatusInfo status{};
//Open up the connection to the controller.
auto c = YMConnect::OpenConnection("192.168.1.31", status);
//This sets the active job to one called "Test" with the line number of 0.
status = c->Job->SetActiveJob("Test", 0);
//Turn on the servos.
status = c->ControlCommands->SetServos(SignalStatus::On);
//Start the job.
status = c->ControlCommands->StartJob();
//Remember to close the connection at the end of the program.
YMConnect::CloseConnection(c);
}
Comments
0 comments
Please sign in to leave a comment.