Robotics Library  0.7.0
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
rl::hal::MitsubishiR3 Class Reference

Mitsubishi Electric R3 protocol. More...

#include <MitsubishiR3.h>

Inheritance diagram for rl::hal::MitsubishiR3:
Inheritance graph
[legend]

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)
 

Detailed Description

Mitsubishi Electric R3 protocol.

Member Typedef Documentation

◆ MechInfo

typedef bool rl::hal::MitsubishiR3::MechInfo[3]

Mech info (Mech 1, Mech 2, Mech 3).

Member Enumeration Documentation

◆ HandSts

Enumerator
HANDSTS_NOTUSED 
HANDSTS_OPEN 

Hand open.

HANDSTS_CLOSED 

Hand closed.

◆ HandType

Enumerator
HANDTYPE_NOTUSED 
HANDTYPE_SINGLE 

Single-solenoid.

HANDTYPE_DOUBLE 

Double-solenoid.

◆ TaskCond

Enumerator
TASKCOND_START 

START.

TASKCOND_ALWAYS 

ALWAYS.

TASKCOND_ERROR 

ERROR.

Constructor & Destructor Documentation

◆ MitsubishiR3()

rl::hal::MitsubishiR3::MitsubishiR3 ( const ::std::string &  address,
const unsigned short int &  port = 10001 
)

◆ ~MitsubishiR3()

rl::hal::MitsubishiR3::~MitsubishiR3 ( )
virtual

Member Function Documentation

◆ close()

void rl::hal::MitsubishiR3::close ( )
virtual

Implements rl::hal::Com.

◆ doCalib()

void rl::hal::MitsubishiR3::doCalib ( CalibState state)

The install status is read.

Parameters
[out]stateInstall state

◆ doCntl()

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.

Parameters
[in]doOnOFF / ON

◆ doDatinst() [1/2]

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.

Parameters
[in]j1Joint 1 data
[in]j2Joint 2 data
[in]j3Joint 3 data
[in]j4Joint 4 data
[in]j5Joint 5 data
[in]j6Joint 6 data
[in]checksumChecksum

◆ doDatinst() [2/2]

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.

Parameters
[in]j1Joint 1 data
[in]j2Joint 2 data
[in]j3Joint 3 data
[in]j4Joint 4 data
[in]j5Joint 5 data
[in]j6Joint 6 data
[in]j7Joint 7 data
[in]j8Joint 8 data
[in]j8Joint 8 data
[in]checksumChecksum

◆ doDstate()

MitsubishiR3::StopState rl::hal::MitsubishiR3::doDstate ( )

The stop state is read.

Parameters
[out]stateStop state

◆ doEclr()

void rl::hal::MitsubishiR3::doEclr ( )

Clear program contents.

It is effective in the edit slot.

◆ doEmdat()

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.

Parameters
[in]programLine data and positional data (<line or position>[0b<line or position>...])

◆ doErrormes()

std::string rl::hal::MitsubishiR3::doErrormes ( const int &  errorNo)

The content of the error is read.

Parameters
[in]errorNoError number
Returns
Content of the error

◆ doExec()

void rl::hal::MitsubishiR3::doExec ( const ::std::string &  instruction)

The instruction is executed directly.

Parameters
[in]instructionInstruction of MELFA-BASIC IV or MOVEMASTER commands

◆ doHnd()

void rl::hal::MitsubishiR3::doHnd ( const bool &  doOpen,
const int &  handNo 
)

The hand is openend and closed.

Parameters
[in]doOpenCLOSE / OPEN
[in]handNoHand number (1 - 8) is specified

◆ doHndsts()

std::array< MitsubishiR3::Hand, 8 > rl::hal::MitsubishiR3::doHndsts ( )

The setting and the output of the hand are read.

Parameters
[out]stateHand state

◆ doInEquals()

void rl::hal::MitsubishiR3::doInEquals ( const ::std::size_t &  inNo,
const ::std::string &  inVal 
)

The input signal is pseudo-input.

Parameters
[in]inNoInput signal number
[in]inValPseudo-input signal value by 4 hex number fixation

◆ doLoad()

void rl::hal::MitsubishiR3::doLoad ( const ::std::string &  programName)

Open the program for edit.

Parameters
[in]programNameEdit program name

◆ doNew()

void rl::hal::MitsubishiR3::doNew ( )

The program is closed annulling the content of the edit.

◆ doOutEquals()

void rl::hal::MitsubishiR3::doOutEquals ( const ::std::size_t &  outNo,
const ::std::string &  outVal 
)

The output signal is compelling output.

Parameters
[in]outNoOutput signal number
[in]outValOutput signal value by 4 hex number fixation

◆ doRstalrm()

void rl::hal::MitsubishiR3::doRstalrm ( )

The error is reset.

◆ doRstpwr()

void rl::hal::MitsubishiR3::doRstpwr ( )

Power supply reset (reboot) of the controller is executed.

◆ doRun()

void rl::hal::MitsubishiR3::doRun ( const ::std::string &  programName,
const bool &  doModeCycle = false 
)

The program is started.

Parameters
[in]programNameProgram name
[in]doModeCycleRepeat start / cycle start

◆ doSave()

void rl::hal::MitsubishiR3::doSave ( )

The content of the edit is preserved and the program is closed.

◆ doSlotinit()

void rl::hal::MitsubishiR3::doSlotinit ( )

The program resets all slots.

◆ doSrv()

void rl::hal::MitsubishiR3::doSrv ( const bool &  doOn)

The servo power supply is turned on and off.

Parameters
[in]doOnOFF / ON

◆ doState()

MitsubishiR3::RunState rl::hal::MitsubishiR3::doState ( )

The run state is read.

Parameters
[out]stateRun state

◆ doStop()

void rl::hal::MitsubishiR3::doStop ( )

The start is stopped.

◆ doStpsig()

MitsubishiR3::StopSignalState rl::hal::MitsubishiR3::doStpsig ( )

The state of the stop signal is read.

Parameters
[out]stateStop signal state

◆ loadProgram()

void rl::hal::MitsubishiR3::loadProgram ( const ::std::string &  name,
const ::std::string &  program 
)

◆ open()

void rl::hal::MitsubishiR3::open ( )
virtual

Implements rl::hal::Com.

◆ startProgram()

void rl::hal::MitsubishiR3::startProgram ( const ::std::string &  name)

◆ stopProgram()

void rl::hal::MitsubishiR3::stopProgram ( )

Member Data Documentation

◆ socket

Socket rl::hal::MitsubishiR3::socket
private

The documentation for this class was generated from the following files: