tecgihan_driver.dma03_driver module
- class tecgihan_driver.dma03_driver.DMA03Driver
Bases:
object
Serial port I/O class for DMA-03 for Robot amplifier.
- class tecgihan_driver.dma03_driver.DMA03DriverForRobot(debug=False, frequency=1000, init_zero=False, timeout=1.0, serial_number=None, location=None)
Bases:
DMA03Driver
Command I/O class for DMA-03 for Robot amplifier.
- close()
Close the serial port.
Close the serial port after stopping the amplifier and the data conversion process.
- get_data()
Get engineering data.
- Returns:
- Tuple[float, float, float, float]:
float: Time of reading data from the serial port.
float: Value of X-axis force.
float: Value of Y-axis force.
float: Value of Z-axis force.
- get_for_robot()
Get the amplifier has functions for robot usage or not.
- Returns:
- Tuple[str, bool]:
str: Reply for the command.
bool: True if for Robot, False if not for robot.
- get_fs()
Get a list of 3 int data of FS (Full Scale) from the amplifier.
- Returns:
List[int]: List of 3 int FS [X,Y,Z] data.
- get_itf()
Get a list of 3x3 float data of ITF from the amplifier.
ITF means Interference coefficients.
- Returns:
list float: List of 3x3 float ITF data
- is_connected()
Return the serial port is connected or not.
- Returns:
bool: True if connected, False otherwise.
- set_for_robot()
Set the amplifier to robot mode if available or to non-robot mode.
- Returns:
str: Reply for the command or error message if failure.
- set_frequency(frequency: int)
Set sensing frequency to the amplifier.
- Args:
frequency (int): Freqency [Hz] of the amplifier sensing.
- Returns:
bool: True on success, False on failure.
- Note:
The set data are Stored in non-volatile memory in the amplifier.
- set_fs(val_list: list[int])
Set 3 int data of FS (Full Scale) to the amplifier.
- Args:
val_list (list[int]): List of 3 float FS [X,Y,Z] data.
- Returns:
bool: True on success, False on failure.
- Note:
The set data are stored in non-volatile memory in the amplifier.
- set_itf(val_list: list[float])
Set 3x3 float data for ITF in the amplifier.
ITF means Interference coefficients.
- Args:
val_list (list[float]): list of 3x3 float for ITF to set in the amplifier.
- Returns:
bool: True on success, False on failure.
- Note:
The set data are stored in non-volatile memory in the amplifier.
- set_zero()
Start zero force adjustment and store them.
- Returns:
str: Reply for the command.
- Note:
The adjustment takes around 2 seconds after sending the command.
The adjustment data are stored in non-volatile memory in the amplifier.
- start()
Send START command to the amplifire and start the data conversion.
- Returns:
str: Reply for the command.
- stop()
Send STOP command to the amplifier and stop the data conversion.
- Returns:
str: Reply for the command.