RobWorkProject  20.10.1-
Public Member Functions | List of all members
FanucVirtual Class Reference

Virtual Fanuc. More...

#include <FanucVirtual.hpp>

Inherits Fanuc.

Public Member Functions

 FanucVirtual (rw::models::SerialDevice *fanucModel, const rw::kinematics::State &state)
 Construct device. More...
 
virtual ~FanucVirtual ()
 Destructor.
 
virtual void setGlobalSpeed (int speed)
 sets the speed in percentage of the maximum speed. More...
 
virtual int getGlobalSpeed ()
 gets the speed in percentage of the maximum speed. More...
 
virtual void moveFineQ (rw::math::Q const &q)
 sends a move FINE command to the fanuc controller. The FINE command moves to the given Q and stops. More...
 
virtual void moveCntQ (rw::math::Q const &q)
 sends a move CNT command to the fanuc controller. The CNT command moves toward the given Q and blends toward the next move command if any is given before q is reached. More...
 
virtual bool isMoveComplete ()
 queries if the last move instuction is completed. Notice that the CNT move instruction completes before reaching the goal configuration. More...
 
virtual void setCntQSpeed (int speed)
 sets the speed of the moveCntQ instruction in percentage of the globalspeed. More...
 
virtual void setFineQSpeed (int speed)
 sets the speed of the moveFineQ instruction in percentage of the globalspeed. More...
 
virtual void setCntQAcc (int acc)
 sets the acceleration override of the moveCntQ instruction in percentage of "normal" acceleration were normal is 100%. More...
 
virtual void setFineQAcc (int acc)
 sets the acceleration override of the moveFineQ instruction in percentage of "normal" acceleration were normal is 100%. More...
 
virtual rw::math::Q getQ ()
 gets the joint configuration of the robot. The configuration is only updated by calls to the update function. More...
 
virtual rw::math::Q getdQ ()
 gets the joint configuration of the robot. The configuration is only updated by calls to the update function. More...
 
virtual void update ()
 updates all internal registers and transmits commands to the robot controller. More...
 
virtual bool connect ()
 connects to the robot controller More...
 
virtual bool isConnected ()
 returns if connected to fanuc controller More...
 
virtual void disconnect ()
 disconnects from the robot controller More...
 
virtual void callRobotProgram (unsigned int progNr)
 calls a program on the robot controller. More...
 
virtual void setCallArguments (float arg1, float arg2, float arg3)
 We allow 3 arguments to be setup before calling a robot program. More...
 
virtual bool isCallFinished ()
 checks if a call to a robot program on the controller is finished More...
 
bool notifyProgram ()
 notifies the robot controller by setting the notify register to 1.0 More...
 
bool isCallWaiting ()
 checks if the robot controller is waiting for a notify. More...
 
float getLastError ()
 check last occored error More...
 
- Public Member Functions inherited from Fanuc
virtual ~Fanuc ()
 destruct object
 
virtual void resetError ()=0
 resets the error status
 

Detailed Description

Virtual Fanuc.

This class represents a Virtual Fanuc

Constructor & Destructor Documentation

◆ FanucVirtual()

FanucVirtual ( rw::models::SerialDevice fanucModel,
const rw::kinematics::State state 
)

Construct device.

Parameters
fanucModel[in] the Device to work on
state[in] state of device

Member Function Documentation

◆ callRobotProgram()

virtual void callRobotProgram ( unsigned int  progNr)
virtual

calls a program on the robot controller.

Implements Fanuc.

◆ connect()

virtual bool connect ( )
virtual

connects to the robot controller

Returns
true if connect is succesfull, false otherwise

Implements Fanuc.

◆ disconnect()

virtual void disconnect ( )
virtual

disconnects from the robot controller

Implements Fanuc.

◆ getdQ()

virtual rw::math::Q getdQ ( )
virtual

gets the joint configuration of the robot. The configuration is only updated by calls to the update function.

Returns
the current joint configuration.

Implements Fanuc.

◆ getGlobalSpeed()

virtual int getGlobalSpeed ( )
virtual

gets the speed in percentage of the maximum speed.

The speed is always in the interval [0;100]

Implements Fanuc.

◆ getLastError()

float getLastError ( )
virtual

check last occored error

Returns
error code of last returned error

Implements Fanuc.

◆ getQ()

virtual rw::math::Q getQ ( )
virtual

gets the joint configuration of the robot. The configuration is only updated by calls to the update function.

Returns
the current joint configuration.

Implements Fanuc.

◆ isCallFinished()

virtual bool isCallFinished ( )
virtual

checks if a call to a robot program on the controller is finished

Implements Fanuc.

◆ isCallWaiting()

bool isCallWaiting ( )
inlinevirtual

checks if the robot controller is waiting for a notify.

Returns
true if robot controller is waiting for notify false otherwise

Implements Fanuc.

◆ isConnected()

virtual bool isConnected ( )
virtual

returns if connected to fanuc controller

Returns
true if connected, false otherwise

Implements Fanuc.

◆ isMoveComplete()

virtual bool isMoveComplete ( )
virtual

queries if the last move instuction is completed. Notice that the CNT move instruction completes before reaching the goal configuration.

Returns
true if last move instruction is complete false otherwise.

Implements Fanuc.

◆ moveCntQ()

virtual void moveCntQ ( rw::math::Q const &  q)
virtual

sends a move CNT command to the fanuc controller. The CNT command moves toward the given Q and blends toward the next move command if any is given before q is reached.

Parameters
q[in] The joint configuration to move to.

Implements Fanuc.

◆ moveFineQ()

virtual void moveFineQ ( rw::math::Q const &  q)
virtual

sends a move FINE command to the fanuc controller. The FINE command moves to the given Q and stops.

Parameters
q[in] The joint configuration to move to.

Implements Fanuc.

◆ notifyProgram()

bool notifyProgram ( )
inlinevirtual

notifies the robot controller by setting the notify register to 1.0

Returns
true if notify is posible, false otherwise.
Note
that the notification will happen at the next update

Implements Fanuc.

◆ setCallArguments()

virtual void setCallArguments ( float  arg1,
float  arg2,
float  arg3 
)
virtual

We allow 3 arguments to be setup before calling a robot program.

Parameters
arg1[in] first argument
arg2[in] second argument
arg3[in] third argument

Implements Fanuc.

◆ setCntQAcc()

virtual void setCntQAcc ( int  acc)
virtual

sets the acceleration override of the moveCntQ instruction in percentage of "normal" acceleration were normal is 100%.

Parameters
acc[in] the acceleration overide in percent ]0;500]

Implements Fanuc.

◆ setCntQSpeed()

virtual void setCntQSpeed ( int  speed)
virtual

sets the speed of the moveCntQ instruction in percentage of the globalspeed.

Parameters
speed[in] the speed in percent ]0;100]

Implements Fanuc.

◆ setFineQAcc()

virtual void setFineQAcc ( int  acc)
virtual

sets the acceleration override of the moveFineQ instruction in percentage of "normal" acceleration were normal is 100%.

Parameters
acc[in] the acceleration overide in percent ]0;500]

Implements Fanuc.

◆ setFineQSpeed()

virtual void setFineQSpeed ( int  speed)
virtual

sets the speed of the moveFineQ instruction in percentage of the globalspeed.

Parameters
speed[in] the speed in percent ]0;100]

Implements Fanuc.

◆ setGlobalSpeed()

virtual void setGlobalSpeed ( int  speed)
virtual

sets the speed in percentage of the maximum speed.

The speed can be set in the interval [0;100]

Implements Fanuc.

◆ update()

virtual void update ( )
virtual

updates all internal registers and transmits commands to the robot controller.

Implements Fanuc.


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