Robotics Library
0.7.0
|
Mitsubishi Electric R3 protocol. More...
#include <MitsubishiR3.h>
Classes | |
struct | CalibState |
struct | EditSts |
class | Exception |
struct | Hand |
struct | RunState |
struct | RunSts |
struct | StopSignalState |
struct | StopState |
struct | StopSts |
Public Types | |
enum | HandSts { HANDSTS_NOTUSED = -1, HANDSTS_OPEN = 1, HANDSTS_CLOSED = 2 } |
enum | HandType { HANDTYPE_NOTUSED = -1, HANDTYPE_SINGLE = 0, HANDTYPE_DOUBLE = 1 } |
enum | TaskCond { TASKCOND_START, TASKCOND_ALWAYS, TASKCOND_ERROR } |
typedef bool | MechInfo[3] |
Mech info (Mech 1, Mech 2, Mech 3). More... | |
Public Member Functions | |
MitsubishiR3 (const ::std::string &address, const unsigned short int &port=10001) | |
virtual | ~MitsubishiR3 () |
void | close () |
void | doCalib (CalibState &state) |
The install status is read. More... | |
void | doCntl (const bool &doOn) |
Operation enable or disable. More... | |
void | doDatinst (const ::std::string &j1, const ::std::string &j2, const ::std::string &j3, const ::std::string &j4, const ::std::string &j5, const ::std::string &j6, const ::std::string &checksum) |
The origin is set by the data input. More... | |
void | doDatinst (const ::std::string &j1, const ::std::string &j2, const ::std::string &j3, const ::std::string &j4, const ::std::string &j5, const ::std::string &j6, const ::std::string &j7, const ::std::string &j8, const ::std::string &checksum) |
The origin is set by the data input. More... | |
StopState | doDstate () |
The stop state is read. More... | |
void | doEclr () |
Clear program contents. More... | |
void | doEmdat (const ::std::string &program) |
More line and position are registered in the program. More... | |
::std::string | doErrormes (const int &errorNo) |
The content of the error is read. More... | |
void | doExec (const ::std::string &instruction) |
The instruction is executed directly. More... | |
void | doHnd (const bool &doOpen, const int &handNo) |
The hand is openend and closed. More... | |
::std::array< Hand, 8 > | doHndsts () |
The setting and the output of the hand are read. More... | |
void | doInEquals (const ::std::size_t &inNo, const ::std::string &inVal) |
The input signal is pseudo-input. More... | |
void | doLoad (const ::std::string &programName) |
Open the program for edit. More... | |
void | doNew () |
The program is closed annulling the content of the edit. More... | |
void | doOutEquals (const ::std::size_t &outNo, const ::std::string &outVal) |
The output signal is compelling output. More... | |
void | doRstalrm () |
The error is reset. More... | |
void | doRstpwr () |
Power supply reset (reboot) of the controller is executed. More... | |
void | doRun (const ::std::string &programName, const bool &doModeCycle=false) |
The program is started. More... | |
void | doSave () |
The content of the edit is preserved and the program is closed. More... | |
void | doSlotinit () |
The program resets all slots. More... | |
void | doSrv (const bool &doOn) |
The servo power supply is turned on and off. More... | |
RunState | doState () |
The run state is read. More... | |
void | doStop () |
The start is stopped. More... | |
StopSignalState | doStpsig () |
The state of the stop signal is read. More... | |
void | loadProgram (const ::std::string &name, const ::std::string &program) |
void | open () |
void | startProgram (const ::std::string &name) |
void | stopProgram () |
Public Member Functions inherited from rl::hal::Com | |
Com () | |
virtual | ~Com () |
bool | isConnected () const |
Private Attributes | |
Socket | socket |
Additional Inherited Members | |
Protected Member Functions inherited from rl::hal::Com | |
void | setConnected (const bool &connected) |
Mitsubishi Electric R3 protocol.
typedef bool rl::hal::MitsubishiR3::MechInfo[3] |
Mech info (Mech 1, Mech 2, Mech 3).
rl::hal::MitsubishiR3::MitsubishiR3 | ( | const ::std::string & | address, |
const unsigned short int & | port = 10001 |
||
) |
|
virtual |
|
virtual |
Implements rl::hal::Com.
void rl::hal::MitsubishiR3::doCalib | ( | CalibState & | state | ) |
The install status is read.
[out] | state | Install state |
void rl::hal::MitsubishiR3::doCntl | ( | const bool & | doOn | ) |
Operation enable or disable.
When the command which needs the operation right such as program start, servo ON and more is used, the operation right should be made effective.
[in] | doOn | OFF / ON |
void rl::hal::MitsubishiR3::doDatinst | ( | const ::std::string & | j1, |
const ::std::string & | j2, | ||
const ::std::string & | j3, | ||
const ::std::string & | j4, | ||
const ::std::string & | j5, | ||
const ::std::string & | j6, | ||
const ::std::string & | checksum | ||
) |
The origin is set by the data input.
[in] | j1 | Joint 1 data |
[in] | j2 | Joint 2 data |
[in] | j3 | Joint 3 data |
[in] | j4 | Joint 4 data |
[in] | j5 | Joint 5 data |
[in] | j6 | Joint 6 data |
[in] | checksum | Checksum |
void rl::hal::MitsubishiR3::doDatinst | ( | const ::std::string & | j1, |
const ::std::string & | j2, | ||
const ::std::string & | j3, | ||
const ::std::string & | j4, | ||
const ::std::string & | j5, | ||
const ::std::string & | j6, | ||
const ::std::string & | j7, | ||
const ::std::string & | j8, | ||
const ::std::string & | checksum | ||
) |
The origin is set by the data input.
[in] | j1 | Joint 1 data |
[in] | j2 | Joint 2 data |
[in] | j3 | Joint 3 data |
[in] | j4 | Joint 4 data |
[in] | j5 | Joint 5 data |
[in] | j6 | Joint 6 data |
[in] | j7 | Joint 7 data |
[in] | j8 | Joint 8 data |
[in] | j8 | Joint 8 data |
[in] | checksum | Checksum |
MitsubishiR3::StopState rl::hal::MitsubishiR3::doDstate | ( | ) |
The stop state is read.
[out] | state | Stop state |
void rl::hal::MitsubishiR3::doEclr | ( | ) |
Clear program contents.
It is effective in the edit slot.
void rl::hal::MitsubishiR3::doEmdat | ( | const ::std::string & | program | ) |
More line and position are registered in the program.
It is effective in the edit slot.
[in] | program | Line data and positional data (<line or position>[0b<line or position>...]) |
std::string rl::hal::MitsubishiR3::doErrormes | ( | const int & | errorNo | ) |
The content of the error is read.
[in] | errorNo | Error number |
void rl::hal::MitsubishiR3::doExec | ( | const ::std::string & | instruction | ) |
The instruction is executed directly.
[in] | instruction | Instruction of MELFA-BASIC IV or MOVEMASTER commands |
void rl::hal::MitsubishiR3::doHnd | ( | const bool & | doOpen, |
const int & | handNo | ||
) |
The hand is openend and closed.
[in] | doOpen | CLOSE / OPEN |
[in] | handNo | Hand number (1 - 8) is specified |
std::array< MitsubishiR3::Hand, 8 > rl::hal::MitsubishiR3::doHndsts | ( | ) |
The setting and the output of the hand are read.
[out] | state | Hand state |
void rl::hal::MitsubishiR3::doInEquals | ( | const ::std::size_t & | inNo, |
const ::std::string & | inVal | ||
) |
The input signal is pseudo-input.
[in] | inNo | Input signal number |
[in] | inVal | Pseudo-input signal value by 4 hex number fixation |
void rl::hal::MitsubishiR3::doLoad | ( | const ::std::string & | programName | ) |
Open the program for edit.
[in] | programName | Edit program name |
void rl::hal::MitsubishiR3::doNew | ( | ) |
The program is closed annulling the content of the edit.
void rl::hal::MitsubishiR3::doOutEquals | ( | const ::std::size_t & | outNo, |
const ::std::string & | outVal | ||
) |
The output signal is compelling output.
[in] | outNo | Output signal number |
[in] | outVal | Output signal value by 4 hex number fixation |
void rl::hal::MitsubishiR3::doRstalrm | ( | ) |
The error is reset.
void rl::hal::MitsubishiR3::doRstpwr | ( | ) |
Power supply reset (reboot) of the controller is executed.
void rl::hal::MitsubishiR3::doRun | ( | const ::std::string & | programName, |
const bool & | doModeCycle = false |
||
) |
The program is started.
[in] | programName | Program name |
[in] | doModeCycle | Repeat start / cycle start |
void rl::hal::MitsubishiR3::doSave | ( | ) |
The content of the edit is preserved and the program is closed.
void rl::hal::MitsubishiR3::doSlotinit | ( | ) |
The program resets all slots.
void rl::hal::MitsubishiR3::doSrv | ( | const bool & | doOn | ) |
The servo power supply is turned on and off.
[in] | doOn | OFF / ON |
MitsubishiR3::RunState rl::hal::MitsubishiR3::doState | ( | ) |
The run state is read.
[out] | state | Run state |
void rl::hal::MitsubishiR3::doStop | ( | ) |
The start is stopped.
MitsubishiR3::StopSignalState rl::hal::MitsubishiR3::doStpsig | ( | ) |
The state of the stop signal is read.
[out] | state | Stop signal state |
void rl::hal::MitsubishiR3::loadProgram | ( | const ::std::string & | name, |
const ::std::string & | program | ||
) |
|
virtual |
Implements rl::hal::Com.
void rl::hal::MitsubishiR3::startProgram | ( | const ::std::string & | name | ) |
void rl::hal::MitsubishiR3::stopProgram | ( | ) |
|
private |