Faulhaber Serial Com Test
Version 1
A Qt interface to test Faulhaber MCBL 3006 motion controller
|
Graphical interface for controlling Faulhaber MCBL 3006 Motion Controllers. More...
#include "FaulhaberSerialComTestWidget.h"
Public Slots | |
void | sendCommand () |
Send a command to a controller. More... | |
void | checkParameters () |
Check the controllers parameters. More... | |
void | stopRobot () |
Stop all the motors. More... | |
Public Member Functions | |
FaulhaberSerialComTestWidget (QWidget *parent=NULL) | |
Constructor. More... | |
virtual | ~FaulhaberSerialComTestWidget () |
Protected Member Functions | |
bool | sendRequest (QString pCommand) |
Send a command to a controller. More... | |
bool | receiveRequest (int &pData) |
Read the COM port. More... | |
bool | queryController (QString pQuery, int &pData) |
Send a command and get the answer. More... | |
int | check (int motor, QString param, int expectedValue) |
Check the value of a parameter. More... | |
Private Attributes | |
Ui::FaulhaberSerialComTestWidget | ui |
Graphical user interface. More... | |
QSharedPointer< FaulhaberSerial > | mCOMPort |
Serial COM port. More... | |
QSharedPointer< ErrorHandler > | mErrorHandler |
Error handler. More... | |
This class creates a graphical interface to communicate with Faulhaber MCBL 3006 Motion Controllers. It is based on QWidget provided in Qt5. It provides simple methods for sending commands to Faulhaber motors. It allows to control a set of n motors through a unique serial COM port.
FaulhaberSerialComTestWidget::FaulhaberSerialComTestWidget | ( | QWidget * | parent = NULL | ) |
Creates the graphical interface and open the COM port.
|
virtual |
|
protected |
Verifies if the value saved in a controller for a given parameter corresponds to the expected value.
[in] | motor | Node number of the motor. |
[in] | param | Parameter to check. |
[in] | expectedValue | Expected value of the parameter. |
|
slot |
Check if the parameters saved in the controllers match with a set of predefined parameters. The following motor parameters are checked :
|
protected |
Send a command to a controller and wait for its reply.
[in] | pQuery | Command to send. |
[out] | pData | Data received from the controller. |
|
protected |
Read the COM port to get data comming from a controller.
[out] | pData | Data received from the controller. |
|
slot |
Sends the command written in the interface to the controller and wait for a reply. When received, the reply is displayed in the interface.
|
protected |
Check the command syntax and send it the a controller through the COM port.
[in] | pCommand | Command to send to the controller. |
|
slot |
Stop all the motors by sending a "nV0" command to each controller (with n the number of the motor).
|
private |
|
private |
|
private |