Set different states on the controller. Also used to start an active job.
Name | Description |
---|---|
SetServos | Turn servos on or off. |
SetHold | Set Hold on or off. |
SetCycleMode | Switch between Step, Cycle and Auto modes. |
DisplayStringToPendant | Show a string on the pendant screen. |
StartJob | Start the active job at the active line. |
Turn servos on or off. Must be in remote mode or play mode to turn on.
StatusInfo SetServos(SignalStatus signal)
signal
[in] Set On to activate servos and off to deactivate. See SignalStatus.
0 if successful, otherwise a StatusInfo object with a description of error.
StatusInfo status{};
auto c = YMConnect::OpenConnection("192.168.1.31", status);
status = c->ControlCommands->SetServos(SignalStatus::On);
std::cout << status << std::endl;
YMConnect::CloseConnection(c);
Output
Code (0): OK
Set Hold on or off.
If a hold is turned on by YMConnect, It must be turned off by YMConnect.
StatusInfo SetHold(SignalStatus signal)
signal
[in] Set On to activate Hold and off to deactivate. See SignalStatus.
0 if successful, otherwise a StatusInfo object with a description of error.
StatusInfo status{};
auto c = YMConnect::OpenConnection("192.168.1.31", status);
status = c->ControlCommands->SetHold(SignalStatus::On);
std::cout << status << std::endl;
YMConnect::CloseConnection(c);
Output
Code (0): OK
Switch between Step, Cycle and Auto modes.
StatusInfo SetCycleMode(CycleMode cycleSelect)
cycleSelect
[in] The cycle mode to switch to. See CycleMode.
0 if successful, otherwise a StatusInfo object with a description of error.
StatusInfo status{};
auto c = YMConnect::OpenConnection("192.168.1.31", status);
status = c->ControlCommands->SetCycleMode(CycleMode::Automatic);
std::cout << status << std::endl;
YMConnect::CloseConnection(c);
Output
Code (0): OK
Show a string on the pendant screen.
StatusInfo DisplayStringToPendant(const std::string& message)
displayString
[in] The string to display on the pendant screen. Maximum length is 30 characters.
0 if successful, otherwise a StatusInfo object with a description of error.
StatusInfo status{};
auto c = YMConnect::OpenConnection("192.168.1.31", status);
status = c->ControlCommands->DisplayStringToPendant("Hello World!");
std::cout << status << std::endl;
YMConnect::CloseConnection(c);
Output
Code (0): OK
Start the active job at the active line. This function can also be used to continue a job
that has been paused.
StatusInfo StartJob()
None.
0 if successful, otherwise a StatusInfo object with a description of error.
StatusInfo status{};
auto c = YMConnect::OpenConnection("192.168.1.31", status);
status = c->ControlCommands->StartJob();
std::cout << status << std::endl;
YMConnect::CloseConnection(c);
Output
Code (0): OK