TwiceAsNice  2019-02-18
Classes | Public Member Functions | Private Member Functions | List of all members
Basda::MoConCard Class Reference

This is the implementation of the MoCon card commands. More...

#include <Card.h>

Inheritance diagram for Basda::MoConCard:
Inheritance graph
Collaboration diagram for Basda::MoConCard:
Collaboration graph

Classes

struct  MoConCardEvent
 This is the implementation of the handler for the incoming events and function errors. More...
 

Public Member Functions

 MoConCard (std::string _name, Nice::JointPtr _config, MPIACoreProtocolPtr _protocol)
 Constructor. More...
 
 ~MoConCard ()
 Destructor. More...
 
void lockCard ()
 This method lock the card for an exclusive access for one client. More...
 
void unlockCard ()
 This method unlock the card. More...
 
void setMultiUpdateSettings (const int _modules)
 This method define which motor have to be move synchronously when the method moveMultiUpdate() is called. More...
 
void moveMultiUpdate ()
 This command starts the motors synchronously. More...
 
void setDigitalOutBit (const unsigned int _selectID, const unsigned int _bit)
 This methods sets a bit on the digital out bus. More...
 
void setDigitalOutByte (const unsigned int _selectID, const unsigned int _byte)
 This methods sets a byte on the digital out bus. More...
 
void setDigitalOutWord (const unsigned int _selectID, const unsigned int _word)
 This methods sets a word on the digital out bus. More...
 
void setDigitalOutLong (const unsigned int _selectID, const unsigned int _long)
 This methods defines all bits on the digital bus. More...
 
unsigned int getDigitalInBit (const unsigned int _selectID)
 This methods reads a bit from the digital bus. More...
 
unsigned int getDigitalInByte (const unsigned int _selectID)
 This methods reads a byte from the digital bus. More...
 
unsigned int getDigitalInWord (const unsigned int _selectID)
 This methods reads a word from the digital bus. More...
 
unsigned int getDigitalInLong (const unsigned int _selectID)
 This methods reads all bits from the digital bus. More...
 
void setTimeTraceSampleRate (const unsigned int _sampleRate)
 This methods sets the sample rate of the time based trace. More...
 
void setTimeTraceNumberOfSamples (const unsigned int _numberOfSamples)
 This methods sets the number of samples of the time based trace. More...
 
void setTimeTraceSampleMode (const Basda::ValueTraceSampleMode::Constant _mode)
 This methods sets the sample mode of the time based trace. More...
 
void timeTraceStart ()
 This methods starts the time based trace. More...
 
void timeTraceStop ()
 This methods stops the time based trace. More...
 
void clearTimeTraceBuffer ()
 This methods clear and freed the data buffer of the time based trace. More...
 
int getTraceInfo (Nice::JointPtr _config)
 This method returns the current status of the time based trace. More...
 
void setEventTraceSampleRate (const unsigned int _sampleRate)
 This methods sets the sample rate of the event based trace. More...
 
void eventTraceStart ()
 This methods starts the event based trace. More...
 
void eventTraceStop ()
 This methods stops the event based trace. More...
 
 MoConCard (std::string _name, Nice::JointPtr _config, MPIACoreProtocolPtr _protocol)
 Constructor. More...
 
 ~MoConCard ()
 Destructor. More...
 
void lockCard ()
 This method lock the card for an exclusive access for one client. More...
 
void unlockCard ()
 This method unlock the card. More...
 
void setMultiUpdateSettings (const int _modules)
 This method define which motor have to be move synchronously when the method moveMultiUpdate() is called. More...
 
void moveMultiUpdate ()
 This command starts the motors synchronously. More...
 
void setDigitalOutBit (const unsigned int _selectID, const unsigned int _bit)
 This methods sets a bit on the digital out bus. More...
 
void setDigitalOutByte (const unsigned int _selectID, const unsigned int _byte)
 This methods sets a byte on the digital out bus. More...
 
void setDigitalOutWord (const unsigned int _selectID, const unsigned int _word)
 This methods sets a word on the digital out bus. More...
 
void setDigitalOutLong (const unsigned int _selectID, const unsigned int _long)
 This methods defines all bits on the digital bus. More...
 
unsigned int getDigitalInBit (const unsigned int _selectID)
 This methods reads a bit from the digital bus. More...
 
unsigned int getDigitalInByte (const unsigned int _selectID)
 This methods reads a byte from the digital bus. More...
 
unsigned int getDigitalInWord (const unsigned int _selectID)
 This methods reads a word from the digital bus. More...
 
unsigned int getDigitalInLong (const unsigned int _selectID)
 This methods reads all bits from the digital bus. More...
 
void setTimeTraceSampleRate (const unsigned int _sampleRate)
 This methods sets the sample rate of the time based trace. More...
 
void setTimeTraceNumberOfSamples (const unsigned int _numberOfSamples)
 This methods sets the number of samples of the time based trace. More...
 
void setTimeTraceSampleMode (const Basda::ValueTraceSampleMode::Constant _mode)
 This methods sets the sample mode of the time based trace. More...
 
void timeTraceStart ()
 This methods starts the time based trace. More...
 
void timeTraceStop ()
 This methods stops the time based trace. More...
 
void clearTimeTraceBuffer ()
 This methods clear and freed the data buffer of the time based trace. More...
 
int getTraceInfo (Nice::JointPtr _config)
 This method returns the current status of the time based trace. More...
 
void setEventTraceSampleRate (const unsigned int _sampleRate)
 This methods sets the sample rate of the event based trace. More...
 
void eventTraceStart ()
 This methods starts the event based trace. More...
 
void eventTraceStop ()
 This methods stops the event based trace. More...
 
- Public Member Functions inherited from Basda::MPIACoreCard
 MPIACoreCard (std::string _name, Nice::JointPtr _config, Basda::MPIACoreProtocolPtr _protocol)
 Constructor. More...
 
 ~MPIACoreCard ()
 Destructor. More...
 
std::string version ()
 The methods returns the current version string of the MPIA in-house electronic. More...
 
std::vector< unsigned int > getRegistration ()
 The methods returns all registered module and card that are registered at the MPIA in-house electronic. More...
 
void reset ()
 Resets the MPIA in-house electronic software and hardware. More...
 
void setXonXoff (const ValueSwitch::Constant _enable)
 Enables/disables the XOnXOff protocol. More...
 
bool getXonXoff ()
 Returns the status of the XOnXOff protocol. More...
 
void setSerialRate (const ValueSerialRate::Constant _baudRate)
 Sets the baud rate of the serial interface. More...
 
unsigned int getSerialRate ()
 Returns the current baud rate. More...
 
void setCANRate (const ValueCanRate::Constant _canRate)
 Sets the CAN rate of the CAN bus. More...
 
unsigned int getCANRate ()
 Returns the current CAN rate. More...
 
void setEventFlag (const ValueSwitch::Constant _eventMode)
 Sets the event message flag. More...
 
bool getEventFlag ()
 Returns the current event message flags. More...
 
void setInfoFlag (const ValueSwitch::Constant _infoMode)
 Sets the event message flag. More...
 
bool getInfoFlag ()
 Returns the current event message flags. More...
 
void setIPAddress (const std::string _ip)
 Sets the IP address of the MPIA in-house electronic. More...
 
std::string getIPAddress ()
 Returns the current IP address. More...
 
void setGateAddress (const std::string _gate)
 Sets the gate address of the MPIA in-house electronic. More...
 
std::string getGateAddress ()
 Returns the current gate address. More...
 
void setMaskAddress (const std::string _mask)
 Sets the mask address of the MPIA in-house electronic. More...
 
std::string getMaskAddress ()
 Returns the current mask address. More...
 
void setLinkTimeout (const unsigned int _timeout)
 Sets the Ethernet connection timeout. More...
 
int getLinkTimeout ()
 Returns the Ethernet connection timeout. More...
 
void waitForEvent ()
 Waits until an event is received in a certain time (timeout). More...
 
std::string getFatalError ()
 Returns the fatal error message. More...
 
void resetFatalError ()
 Resets the fatal error. More...
 
 MPIACoreCard (std::string _name, Nice::JointPtr _config, Basda::MPIACoreProtocolPtr _protocol)
 Constructor. More...
 
 ~MPIACoreCard ()
 Destructor. More...
 
std::string version ()
 The methods returns the current version string of the MPIA in-house electronic. More...
 
std::vector< unsigned int > getRegistration ()
 The methods returns all registered module and card that are registered at the MPIA in-house electronic. More...
 
void reset ()
 Resets the MPIA in-house electronic software and hardware. More...
 
void setXonXoff (const ValueSwitch::Constant _enable)
 Enables/disables the XOnXOff protocol. More...
 
bool getXonXoff ()
 Returns the status of the XOnXOff protocol. More...
 
void setSerialRate (const ValueSerialRate::Constant _baudRate)
 Sets the baud rate of the serial interface. More...
 
unsigned int getSerialRate ()
 Returns the current baud rate. More...
 
void setCANRate (const ValueCanRate::Constant _canRate)
 Sets the CAN rate of the CAN bus. More...
 
unsigned int getCANRate ()
 Returns the current CAN rate. More...
 
void setEventFlag (const ValueSwitch::Constant _eventMode)
 Sets the event message flag. More...
 
bool getEventFlag ()
 Returns the current event message flags. More...
 
void setInfoFlag (const ValueSwitch::Constant _infoMode)
 Sets the event message flag. More...
 
bool getInfoFlag ()
 Returns the current event message flags. More...
 
void setIPAddress (const std::string _ip)
 Sets the IP address of the MPIA in-house electronic. More...
 
std::string getIPAddress ()
 Returns the current IP address. More...
 
void setGateAddress (const std::string _gate)
 Sets the gate address of the MPIA in-house electronic. More...
 
std::string getGateAddress ()
 Returns the current gate address. More...
 
void setMaskAddress (const std::string _mask)
 Sets the mask address of the MPIA in-house electronic. More...
 
std::string getMaskAddress ()
 Returns the current mask address. More...
 
void setLinkTimeout (const unsigned int _timeout)
 Sets the Ethernet connection timeout. More...
 
int getLinkTimeout ()
 Returns the Ethernet connection timeout. More...
 
void waitForEvent ()
 Waits until an event is received in a certain time (timeout). More...
 
std::string getFatalError ()
 Returns the fatal error message. More...
 
void resetFatalError ()
 Resets the fatal error. More...
 

Private Member Functions

void addInternalProperties ()
 This method add some internal properties like command properties or status properties. More...
 
void getMotorControllerErrorNr ()
 This methods returns the motor controller error number. More...
 
void addInternalProperties ()
 This method add some internal properties like command properties or status properties. More...
 
void getMotorControllerErrorNr ()
 This methods returns the motor controller error number. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Basda::MPIACore
 MPIACore (std::string _name, Nice::JointPtr _config, const MPIACoreProtocolPtr _protocol)
 
 ~MPIACore ()
 
template<typename Type >
Type checkAttribute (const std::string &_node, const std::string &_attributeName, const Type &_default)
 
template<typename RT >
std::vector< RT > getVector (const std::string &_str)
 This is a generic method to convert a data string to a vector. More...
 
std::string name ()
 
 MPIACore (std::string _name, Nice::JointPtr _config, const MPIACoreProtocolPtr _protocol)
 
 ~MPIACore ()
 
template<typename Type >
Type checkAttribute (const std::string &_node, const std::string &_attributeName, const Type &_default)
 
template<typename RT >
std::vector< RT > getVector (const std::string &_str)
 This is a generic method to convert a data string to a vector. More...
 
std::string name ()
 
- Static Protected Member Functions inherited from Basda::MPIACore
template<typename RT >
static RT getValue (const std::string &_str)
 This is a generic method to convert a data string to a number. More...
 
template<typename RT >
static RT getValue (const std::string &_str)
 This is a generic method to convert a data string to a number. More...
 
- Protected Attributes inherited from Basda::MPIACore
std::string m_name
 
std::string m_address
 member of the connection address More...
 
unsigned int m_cardNo
 member of the card number More...
 
unsigned int m_moduleNo
 member of the module number More...
 
HandlerPtr m_handler
 
MPIACoreProtocolPtr m_protocol
 member of the protocol to communicate with the MPIA in-house electronic. More...
 
Nice::JointPtr m_config
 member of the root of the configuration tree More...
 
bool m_warning
 

Detailed Description

This is the implementation of the MoCon card commands.

The MPIA electronic rack can keep up to 8 motor controller cards, which can control up to 8 motors each. This class extends the MPIACoreCard class with the functionality of the motor controller card.

Different services can run using the different modules at the same card. In order to configure the motor controller a set of commands have to be called in a certain order. Thereby must be sure that no other service can interrupt the current programming and the execution of the programmed command. Hence this the card has to be locked first for an exclusive access and unlocked when the programming and the execution is done.

Author
Frank Kittmann
Version
09.06.29
Date
2009.06.29

Constructor & Destructor Documentation

◆ MoConCard() [1/2]

Basda::MoConCard::MoConCard ( std::string  _name,
Nice::JointPtr  _config,
Basda::MPIACoreProtocolPtr  _protocol 
)

Constructor.

◆ ~MoConCard() [1/2]

Basda::MoConCard::~MoConCard ( )
inline

Destructor.

◆ MoConCard() [2/2]

Basda::MoConCard::MoConCard ( std::string  _name,
Nice::JointPtr  _config,
MPIACoreProtocolPtr  _protocol 
)

Constructor.

◆ ~MoConCard() [2/2]

Basda::MoConCard::~MoConCard ( )
inline

Destructor.

Member Function Documentation

◆ addInternalProperties() [1/2]

void Basda::MoConCard::addInternalProperties ( )
private

This method add some internal properties like command properties or status properties.

◆ addInternalProperties() [2/2]

void Basda::MoConCard::addInternalProperties ( )
private

This method add some internal properties like command properties or status properties.

◆ clearTimeTraceBuffer() [1/2]

void Basda::MoConCard::clearTimeTraceBuffer ( )

This methods clear and freed the data buffer of the time based trace.

Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceSampleRate
setTimeTraceNumberOfSamples
setTimeTraceSampleMode
timeTraceStart
timeTraceStop
getTraceInfo

◆ clearTimeTraceBuffer() [2/2]

void Basda::MoConCard::clearTimeTraceBuffer ( )

This methods clear and freed the data buffer of the time based trace.

Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceSampleRate
setTimeTraceNumberOfSamples
setTimeTraceSampleMode
timeTraceStart
timeTraceStop
getTraceInfo

◆ eventTraceStart() [1/2]

void Basda::MoConCard::eventTraceStart ( )

This methods starts the event based trace.

Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setEventTraceSampleRate, eventTraceStop, getTraceInfo

◆ eventTraceStart() [2/2]

void Basda::MoConCard::eventTraceStart ( )

This methods starts the event based trace.

Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setEventTraceSampleRate, eventTraceStop, getTraceInfo

◆ eventTraceStop() [1/2]

void Basda::MoConCard::eventTraceStop ( )

This methods stops the event based trace.

Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setEventTraceSampleRate, eventTraceStart, getTraceInfo

◆ eventTraceStop() [2/2]

void Basda::MoConCard::eventTraceStop ( )

This methods stops the event based trace.

Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setEventTraceSampleRate, eventTraceStart, getTraceInfo

◆ getDigitalInBit() [1/2]

unsigned int Basda::MoConCard::getDigitalInBit ( const unsigned int  _selectID)

This methods reads a bit from the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit input bus, which can be freely programmed. In total is it a 32 bit input bus. This method reads a bit from that 32 bit input bus.

Parameters
_selectIDthe bit to read (0..31)
Returns
the read bit
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord, setDigitalOutLong
getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ getDigitalInBit() [2/2]

unsigned int Basda::MoConCard::getDigitalInBit ( const unsigned int  _selectID)

This methods reads a bit from the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit input bus, which can be freely programmed. In total is it a 32 bit input bus. This method reads a bit from that 32 bit input bus.

Parameters
_selectIDthe bit to read (0..31)
Returns
the read bit
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord, setDigitalOutLong
getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ getDigitalInByte() [1/2]

unsigned int Basda::MoConCard::getDigitalInByte ( const unsigned int  _selectID)

This methods reads a byte from the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit input bus, which can be freely programmed. In total is it a 32 bit input bus. This method reads a byte from that 32 bit input bus.

Parameters
_selectIDthe byte to read (0..3)
Returns
the read byte
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord
getDigitalInBit, getDigitalInWord, getDigitalInLong

◆ getDigitalInByte() [2/2]

unsigned int Basda::MoConCard::getDigitalInByte ( const unsigned int  _selectID)

This methods reads a byte from the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit input bus, which can be freely programmed. In total is it a 32 bit input bus. This method reads a byte from that 32 bit input bus.

Parameters
_selectIDthe byte to read (0..3)
Returns
the read byte
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord
getDigitalInBit, getDigitalInWord, getDigitalInLong

◆ getDigitalInLong() [1/2]

unsigned int Basda::MoConCard::getDigitalInLong ( const unsigned int  _selectID)

This methods reads all bits from the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit input bus, which can be freely programmed. In total is it a 32 bit input bus. This method reads all bits from that 32 bit input bus.

Parameters
_selectIDhave to be 0 to read all bits of that 32 bit input bus
Returns
all bits of the bus
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord
getDigitalInBit, getDigitalInByte, getDigitalInWord

◆ getDigitalInLong() [2/2]

unsigned int Basda::MoConCard::getDigitalInLong ( const unsigned int  _selectID)

This methods reads all bits from the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit input bus, which can be freely programmed. In total is it a 32 bit input bus. This method reads all bits from that 32 bit input bus.

Parameters
_selectIDhave to be 0 to read all bits of that 32 bit input bus
Returns
all bits of the bus
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord
getDigitalInBit, getDigitalInByte, getDigitalInWord

◆ getDigitalInWord() [1/2]

unsigned int Basda::MoConCard::getDigitalInWord ( const unsigned int  _selectID)

This methods reads a word from the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit input bus, which can be freely programmed. In total is it a 32 bit input bus. This method reads a word from that 32 bit input bus.

Parameters
_selectIDthe word to read (0..1)
Returns
the read word
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord
getDigitalInBit, getDigitalInByte, getDigitalInLong

◆ getDigitalInWord() [2/2]

unsigned int Basda::MoConCard::getDigitalInWord ( const unsigned int  _selectID)

This methods reads a word from the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit input bus, which can be freely programmed. In total is it a 32 bit input bus. This method reads a word from that 32 bit input bus.

Parameters
_selectIDthe word to read (0..1)
Returns
the read word
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord
getDigitalInBit, getDigitalInByte, getDigitalInLong

◆ getMotorControllerErrorNr() [1/2]

void Basda::MoConCard::getMotorControllerErrorNr ( )
private

This methods returns the motor controller error number.

In some cases the motor controller returns a Basda::MoCon::CheckSumException. This method read the error code from the MoCon and stored in the property

  • VAR.MC.ERROR

It reads the error on the MoCon and throws an exception, because it is still not defined how to handle that exception.

This method don't need to be locked, because this method is private and will be called from the internal methods only.

Exceptions
Basda::MoCon::CheckSumException
See also
Basda::MoCon::CheckSumException

◆ getMotorControllerErrorNr() [2/2]

void Basda::MoConCard::getMotorControllerErrorNr ( )
private

This methods returns the motor controller error number.

In some cases the motor controller returns a Basda::MoCon::CheckSumException. This method read the error code from the MoCon and stored in the property

  • VAR.MC.ERROR

It reads the error on the MoCon and throws an exception, because it is still not defined how to handle that exception.

This method don't need to be locked, because this method is private and will be called from the internal methods only.

Exceptions
Basda::MoCon::CheckSumException
See also
Basda::MoCon::CheckSumException

◆ getTraceInfo() [1/2]

int Basda::MoConCard::getTraceInfo ( Nice::JointPtr  _config)

This method returns the current status of the time based trace.

It returns the selected sample mode (SAMPLE_MODE), the status if the trace is still running (TRACING), the status if a buffer overflow (WRAP) was detected and the number of already logged data (TRACED_VALUES). All these data will be written back in the VAR property folder.

The received data will be stored in the following properties:

  • VAR.TRACE.INFO.SAMPLE_MODE
  • VAR.TRACE.INFO.TRACING
  • VAR.TRACE.INFO.WRAP
  • VAR.TRACE.INFO.TRACED_VALUES
Parameters
_configthe root of the configuration tree of the calling device to sort the response correctly
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceSampleRate
setTimeTraceNumberOfSamples
setTimeTraceSampleMode
timeTraceStart
timeTraceStop
clearTimeTraceBuffer
setEventTraceSampleRate
eventTraceStart
eventTraceStop

◆ getTraceInfo() [2/2]

int Basda::MoConCard::getTraceInfo ( Nice::JointPtr  _config)

This method returns the current status of the time based trace.

It returns the selected sample mode (SAMPLE_MODE), the status if the trace is still running (TRACING), the status if a buffer overflow (WRAP) was detected and the number of already logged data (TRACED_VALUES). All these data will be written back in the VAR property folder.

The received data will be stored in the following properties:

  • VAR.TRACE.INFO.SAMPLE_MODE
  • VAR.TRACE.INFO.TRACING
  • VAR.TRACE.INFO.WRAP
  • VAR.TRACE.INFO.TRACED_VALUES
Parameters
_configthe root of the configuration tree of the calling device to sort the response correctly
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceSampleRate
setTimeTraceNumberOfSamples
setTimeTraceSampleMode
timeTraceStart
timeTraceStop
clearTimeTraceBuffer
setEventTraceSampleRate
eventTraceStart
eventTraceStop

◆ lockCard() [1/2]

void Basda::MoConCard::lockCard ( )

This method lock the card for an exclusive access for one client.

All methods will be lock till the client with the exclusive access unlock this object.

Exceptions
Basda::MPIA::ModuleIsInUseException

◆ lockCard() [2/2]

void Basda::MoConCard::lockCard ( )

This method lock the card for an exclusive access for one client.

All methods will be lock till the client with the exclusive access unlock this object.

Exceptions
Basda::MPIA::ModuleIsInUseException

◆ moveMultiUpdate() [1/2]

void Basda::MoConCard::moveMultiUpdate ( )

This command starts the motors synchronously.

After the motors are marked for synchronous moving and the move command is selected, this method will start the movement of all motors at the same time.

Exceptions
Basda::MPIA::ModuleIsInUseException
See also
moveMultiUpdate
Basda::MoConModule::moveToAbsolutePosition
Basda::MoConModule::moveToReleativePosition
Basda::MoConModule::moveToHome

◆ moveMultiUpdate() [2/2]

void Basda::MoConCard::moveMultiUpdate ( )

This command starts the motors synchronously.

After the motors are marked for synchronous moving and the move command is selected, this method will start the movement of all motors at the same time.

Exceptions
Basda::MPIA::ModuleIsInUseException
See also
moveMultiUpdate
Basda::MoConModule::moveToAbsolutePosition
Basda::MoConModule::moveToReleativePosition
Basda::MoConModule::moveToHome

◆ setDigitalOutBit() [1/2]

void Basda::MoConCard::setDigitalOutBit ( const unsigned int  _selectID,
const unsigned int  _bit 
)

This methods sets a bit on the digital out bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit output bus, which can be freely programmed. In total is it a 32 bit output bus. This method sets a bit on that 32 bit output bus.

Parameters
_selectIDnumber (0..31) which bit has to be set
_bitset the bit to 0x0 - low or 0x1 - high
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutByte, setDigitalOutWord, setDigitalOutLong
getDigitalInBit, getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ setDigitalOutBit() [2/2]

void Basda::MoConCard::setDigitalOutBit ( const unsigned int  _selectID,
const unsigned int  _bit 
)

This methods sets a bit on the digital out bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit output bus, which can be freely programmed. In total is it a 32 bit output bus. This method sets a bit on that 32 bit output bus.

Parameters
_selectIDnumber (0..31) which bit has to be set
_bitset the bit to 0x0 - low or 0x1 - high
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutByte, setDigitalOutWord, setDigitalOutLong
getDigitalInBit, getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ setDigitalOutByte() [1/2]

void Basda::MoConCard::setDigitalOutByte ( const unsigned int  _selectID,
const unsigned int  _byte 
)

This methods sets a byte on the digital out bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 output bit bus, which can be freely programmed. In total is it a 32 output bit bus. This method sets a byte on that 32 bit output bus.

Parameters
_selectIDnumber (0..3) which byte has to be set
_byteset the byte (0x0..0xFF)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutWord, setDigitalOutLong
getDigitalInBit, getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ setDigitalOutByte() [2/2]

void Basda::MoConCard::setDigitalOutByte ( const unsigned int  _selectID,
const unsigned int  _byte 
)

This methods sets a byte on the digital out bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 output bit bus, which can be freely programmed. In total is it a 32 output bit bus. This method sets a byte on that 32 bit output bus.

Parameters
_selectIDnumber (0..3) which byte has to be set
_byteset the byte (0x0..0xFF)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutWord, setDigitalOutLong
getDigitalInBit, getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ setDigitalOutLong() [1/2]

void Basda::MoConCard::setDigitalOutLong ( const unsigned int  _selectID,
const unsigned int  _long 
)

This methods defines all bits on the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit output bus, which can be freely programmed. In total is it a 32 bit output bus. This method sets all bits on that 32 bit output bus.

Parameters
_selectIDhave to be 0 to set all bits in that 32 bit bus
_longset the long (0x0..0xFFFFFFFF)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord
getDigitalInBit, getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ setDigitalOutLong() [2/2]

void Basda::MoConCard::setDigitalOutLong ( const unsigned int  _selectID,
const unsigned int  _long 
)

This methods defines all bits on the digital bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 bit output bus, which can be freely programmed. In total is it a 32 bit output bus. This method sets all bits on that 32 bit output bus.

Parameters
_selectIDhave to be 0 to set all bits in that 32 bit bus
_longset the long (0x0..0xFFFFFFFF)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutWord
getDigitalInBit, getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ setDigitalOutWord() [1/2]

void Basda::MoConCard::setDigitalOutWord ( const unsigned int  _selectID,
const unsigned int  _word 
)

This methods sets a word on the digital out bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 output bit bus, which can be freely programmed. In total is it a 32 output bit bus. This method sets a word on that 32 bit output bus.

Parameters
_selectIDnumber (0..1) which word has to be set
_wordset the word (0x0..0xFFFF)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutLong
getDigitalInBit, getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ setDigitalOutWord() [2/2]

void Basda::MoConCard::setDigitalOutWord ( const unsigned int  _selectID,
const unsigned int  _word 
)

This methods sets a word on the digital out bus.

The motor controller card has 2 microcontroller that controlling the motor devices. The first 4 motors are driven by one chipset, the last 4 motors are driven by the second chipset. Each chipset has a 16 output bit bus, which can be freely programmed. In total is it a 32 output bit bus. This method sets a word on that 32 bit output bus.

Parameters
_selectIDnumber (0..1) which word has to be set
_wordset the word (0x0..0xFFFF)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setDigitalOutBit, setDigitalOutByte, setDigitalOutLong
getDigitalInBit, getDigitalInByte, getDigitalInWord, getDigitalInLong

◆ setEventTraceSampleRate() [1/2]

void Basda::MoConCard::setEventTraceSampleRate ( const unsigned int  _sampleRate)

This methods sets the sample rate of the event based trace.

The sample rate defines every which motor controller clock cycle a value has to be logged.

Note
Do not choose the value too less. The module needs time to send the logged value toward the clients.
Parameters
_sampleRatethe sample rate (1..65000)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
eventTraceStart, eventTraceStop, getTraceInfo

◆ setEventTraceSampleRate() [2/2]

void Basda::MoConCard::setEventTraceSampleRate ( const unsigned int  _sampleRate)

This methods sets the sample rate of the event based trace.

The sample rate defines every which motor controller clock cycle a value has to be logged.

Note
Do not choose the value too less. The module needs time to send the logged value toward the clients.
Parameters
_sampleRatethe sample rate (1..65000)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
eventTraceStart, eventTraceStop, getTraceInfo

◆ setMultiUpdateSettings() [1/2]

void Basda::MoConCard::setMultiUpdateSettings ( const int  _modules)

This method define which motor have to be move synchronously when the method moveMultiUpdate() is called.

Motors on the same card can be moved synchronously after these are marked. After that it has to be defined which move command has to be executed when the method moveMultiUpdate() is called.

Parameters
_modulesa byte where every bit marks its corresponding motor. (bit 0: motor 1, ... bit 7: motor 8)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
moveMultiUpdate
Basda::MoConModule::moveToAbsolutePosition
Basda::MoConModule::moveToReleativePosition
Basda::MoConModule::moveToHome

◆ setMultiUpdateSettings() [2/2]

void Basda::MoConCard::setMultiUpdateSettings ( const int  _modules)

This method define which motor have to be move synchronously when the method moveMultiUpdate() is called.

Motors on the same card can be moved synchronously after these are marked. After that it has to be defined which move command has to be executed when the method moveMultiUpdate() is called.

Parameters
_modulesa byte where every bit marks its corresponding motor. (bit 0: motor 1, ... bit 7: motor 8)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
moveMultiUpdate
Basda::MoConModule::moveToAbsolutePosition
Basda::MoConModule::moveToReleativePosition
Basda::MoConModule::moveToHome

◆ setTimeTraceNumberOfSamples() [1/2]

void Basda::MoConCard::setTimeTraceNumberOfSamples ( const unsigned int  _numberOfSamples)

This methods sets the number of samples of the time based trace.

Number of samples defines how many values have to be logged of each selected sample type.

Parameters
_numberOfSamplesthe number of samples
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceSampleRate
setTimeTraceSampleMode
timeTraceStart
timeTraceStop
clearTimeTraceBuffer
getTraceInfo

◆ setTimeTraceNumberOfSamples() [2/2]

void Basda::MoConCard::setTimeTraceNumberOfSamples ( const unsigned int  _numberOfSamples)

This methods sets the number of samples of the time based trace.

Number of samples defines how many values have to be logged of each selected sample type.

Parameters
_numberOfSamplesthe number of samples
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceSampleRate
setTimeTraceSampleMode
timeTraceStart
timeTraceStop
clearTimeTraceBuffer
getTraceInfo

◆ setTimeTraceSampleMode() [1/2]

void Basda::MoConCard::setTimeTraceSampleMode ( const Basda::ValueTraceSampleMode::Constant  _mode)

This methods sets the sample mode of the time based trace.

The Sample Mode defines whether the trace should continue with tracing from the beginning of the buffer after the end is reached (Rolling_Buffer) or whether the trace should stop (One_Time). Is the sample mode Rolling_Buffer is selected the trace will stop when the stop method is called.

Parameters
_modethe sample mode
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceSampleRate
setTimeTraceNumberOfSamples
timeTraceStart
timeTraceStop
clearTimeTraceBuffer
getTraceInfo
MPIA/Core/MoCon/CommandIDs.h

◆ setTimeTraceSampleMode() [2/2]

void Basda::MoConCard::setTimeTraceSampleMode ( const Basda::ValueTraceSampleMode::Constant  _mode)

This methods sets the sample mode of the time based trace.

The Sample Mode defines whether the trace should continue with tracing from the beginning of the buffer after the end is reached (Rolling_Buffer) or whether the trace should stop (One_Time). Is the sample mode Rolling_Buffer is selected the trace will stop when the stop method is called.

Parameters
_modethe sample mode
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceSampleRate
setTimeTraceNumberOfSamples
timeTraceStart
timeTraceStop
clearTimeTraceBuffer
getTraceInfo
MPIA/Core/MoCon/CommandIDs.h

◆ setTimeTraceSampleRate() [1/2]

void Basda::MoConCard::setTimeTraceSampleRate ( const unsigned int  _sampleRate)

This methods sets the sample rate of the time based trace.

The sample rate defines every which motor controller clock cycle a value has to be logged.

Parameters
_sampleRatethe sample rate (1..65000)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceNumberOfSamples
setTimeTraceSampleMode
timeTraceStart
timeTraceStop
clearTimeTraceBuffer
getTraceInfo

◆ setTimeTraceSampleRate() [2/2]

void Basda::MoConCard::setTimeTraceSampleRate ( const unsigned int  _sampleRate)

This methods sets the sample rate of the time based trace.

The sample rate defines every which motor controller clock cycle a value has to be logged.

Parameters
_sampleRatethe sample rate (1..65000)
Exceptions
Basda::MPIA::ModuleIsInUseException
See also
setTimeTraceNumberOfSamples
setTimeTraceSampleMode
timeTraceStart
timeTraceStop
clearTimeTraceBuffer
getTraceInfo

◆ timeTraceStart() [1/2]

void Basda::MoConCard::timeTraceStart ( )

◆ timeTraceStart() [2/2]

void Basda::MoConCard::timeTraceStart ( )

◆ timeTraceStop() [1/2]

void Basda::MoConCard::timeTraceStop ( )

◆ timeTraceStop() [2/2]

void Basda::MoConCard::timeTraceStop ( )

◆ unlockCard() [1/2]

void Basda::MoConCard::unlockCard ( )

This method unlock the card.

All methods will be unlocked. This can be done only by that client which has exclusive access.

Exceptions
Basda::MPIA::ModuleIsInUseException

◆ unlockCard() [2/2]

void Basda::MoConCard::unlockCard ( )

This method unlock the card.

All methods will be unlocked. This can be done only by that client which has exclusive access.

Exceptions
Basda::MPIA::ModuleIsInUseException

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