![]() |
PmxPythonLib V1.0.2.0
|
PMXで使用する関数や定義をひとまとまりにしたものです [詳解]
クラス | |
class | BuffPter |
送受信データ位置 [詳解] | |
class | CloneReverseType |
CloneReverseの値の定義 [詳解] | |
class | ComError |
データが返ってこないなどサーボモータ外に起因するエラー一覧の定義 [詳解] | |
class | ControlMode |
位置や速度制御等の切り替えの値を定義します [詳解] | |
class | EditBaudrate |
PMXで設定する通信速度の値を定義します [詳解] | |
class | EditParity |
PMXで設定するパリティの値を定義します [詳解] | |
class | MinimumLength |
コマンドの最低サイズ値の定義 [詳解] | |
class | PmxStatusErrorList |
PMXのステータスの返信/エラー状態の値 [詳解] | |
class | RamAddrList |
PMXサーボモータに格納されるメモリ内の先頭アドレスを定義します [詳解] | |
class | ReceiveDataOption |
MotorREAD等で使用する応答モードのリスト [詳解] | |
class | SendCmd |
送信コマンド一覧 [詳解] | |
class | TorqueSwitchType |
TorqueOnの値の定義 [詳解] | |
class | TrajectoryType |
PMXの時間制御で使用する加減速具合を設定します [詳解] | |
公開メンバ関数 | |
def | synchronize (self, txBuf, rxLen) |
「synchronize」関数は、サブクラスでオーバーライドする必要があるプレースホルダーです。 txBufのコマンドを送受信させます。 | |
def | synchronizeVariableRead (self, txBuf) |
「synchronizeVariableRead」関数は、サブクラスでオーバーライドする必要があるプレースホルダーです。 受信データ数がわからない場合でも送受信したい場合に使用します。 | |
def | synchronizeNoRead (self, txBuf) |
「synchronizeNoRead」関数は、サブクラスでオーバーライドする必要があるプレースホルダーです。 ブロードキャストIDなどデータが返ってこない時に使用します。 | |
def | setSerialParameters (self, int baudrate, parity, int timeout) |
「setSerialParameters」関数は、サブクラスでオーバーライドする必要があります。 通信速度、パリティ、タイムアウトでPC等上位側の通信設定を変更する際に使用します。 | |
def | MemREAD (self, int id, int addr, int size) |
MemREADコマンドでPMXサーボモータからデータを取得します。 | |
def | MemREADToByte (self, int id, int addr) |
MemREADで取得したデータをbyte(符号なし1byte)に変換して取得します。 | |
def | MemREADToInt16 (self, int id, int addr) |
MemREADで取得したデータをint16(符号あり2byte)に変換して取得します。 | |
def | MemREADToUint16 (self, int id, int addr) |
MemREADで取得したデータをUint16(符号なし2byte)に変換して取得します。 | |
def | MemREADToInt32 (self, int id, int addr) |
MemREADで取得したデータをint32(符号あり4byte)に変換して取得します。 | |
def | MemREADToUint32 (self, int id, int addr) |
MemREADで取得したデータをUint32(符号なし4byte)に変換して取得します。 | |
def | MemWRITE (self, int id, int baseAddr, dataByteArray, writeOpt=0) |
PMXサーボモータにMemWRITEコマンドを発行し、結果を取得します。 | |
def | MemWRITEToByte (self, int id, int baseAddr, int data, writeOpt=0) |
MemWRITEでbyte(符号なし1byte)のデータを書き込みます。 その結果のステータス情報を返信します。 | |
def | MemWRITEToInt16 (self, int id, int baseAddr, int data, writeOpt=0) |
MemWRITEでint16(符号あり2byte)のデータを書き込みます。 その結果のステータス情報を返信します。 | |
def | MemWRITEToUint16 (self, int id, int baseAddr, int data, writeOpt=0) |
MemWRITEでint16(符号なし2byte)のデータを書き込みます。 その結果のステータス情報を返信します。 | |
def | MemWRITEToInt32 (self, int id, int baseAddr, int data, writeOpt=0) |
MemWRITEでint32(符号あり4byte)のデータを書き込みます。 その結果のステータス情報を返信します。 | |
def | MemWRITEToUint32 (self, int id, int baseAddr, int data, writeOpt=0) |
MemWRITEでUint32(符号なし4byte)のデータを書き込みます。 その結果のステータス情報を返信します。 | |
def | LOAD (self, int id) |
PMXサーボモータのLOADコマンドを発行し、ステータス結果を取得します。 | |
def | SAVE (self, int id) |
PMXサーボモータのSAVEコマンドを発行し、ステータス結果を取得します。 | |
def | MotorREAD (self, int id, int receiveMode, controlMode=0x01) |
MotorREAD関数を発行し、応答モードに応じてデータを取得します。 | |
def | MotorWRITE (self, int id, int mototWRITEopt, controlMode=0x01, receiveMode=0, sendDataList=[]) |
MotorWRITE 機能は、モータの制御やトルクのオン/オフを切り替えるコマンドを送信し、モーターからステータスとデータを受信します。 | |
def | MotorWRITESingle (self, int id, int controlMode, int receiveMode, int targetVal) |
MotorWRITEでデータ指示一つの場合に使用します | |
def | MotorWRITEDouble (self, int id, int controlMode, int receiveMode, int targetVal1, int targetVal2) |
MotorWriteを使用して2変数を指示するときに使用します。 | |
def | MotorWRITETriple (self, int id, int controlMode, int receiveMode, int targetVal1, int targetVal2, int targetVal3) |
MotorWriteを使用して3変数を指示するときに使用します。 | |
def | SystemREAD (self, int id) |
SystemREAD 関数は、サーボからシステム情報を読み取ります。 | |
def | SystemWRITE (self, int id, serialNum=None, newId=None, newBaudrateVal=None, newParityVal=None, newResponseTime=None) |
SystemWRITEコマンドを使用してID、ボーレート、パリティ、および応答時間を設定します。 | |
def | ReBoot (self, int id, resetTime=0) |
サーボモータを再起動させます。 | |
def | FactoryReset (self, int id, serialNum=None) |
サーボを工場出荷時の設定にリセットします | |
def | getPosition (self, int id, contolMode=0x01) |
指定したIDの現在の位置を取得します。 | |
def | getSpeed (self, int id) |
指定した ID の現在の速度を取得します。 | |
def | getCurrent (self, int id) |
指定した ID の現在の電流を取得します。 | |
def | getTorque (self, int id) |
指定した ID の現在のトルクを取得します。 | |
def | getPwm (self, int id) |
指定した ID の現在のPWMを取得します。 | |
def | getMotorTemp (self, int id) |
指定した ID の現在のモータ温度を取得します。 | |
def | getCPUTemp (self, int id) |
指定した ID の現在のCPU温度を取得します。 | |
def | getTrajectoryTime (self, int id) |
指定した ID の現在の補間時間を取得します。 | |
def | getInputVoltage (self, int id) |
指定した ID の現在の電圧を取得します。 | |
def | getEncoder (self, int id) |
指定した ID のエンコーダを取得します。 | |
def | getStatus (self, int id) |
指定した ID のステータスを取得します。 | |
def | getSystemStatus (self, int id) |
指定した ID のシステムステータスを取得します。 | |
def | getMotorStatus (self, int id) |
指定した ID のモータステータスを取得します。 | |
def | getRamAccessStatus (self, int id) |
指定した ID のRAMアクセスステータスを取得します。 | |
def | getFullStatus (self, int id) |
指定した ID の全てのステータス情報を取得します。 | |
def | getTorqueSwitch (self, int id) |
指定した ID のトルク ON 値を取得します。 | |
def | getControlMode (self, int id) |
指定した ID の制御モードを取得します。 | |
def | getMotorReceive (self, int id) |
指定した ID の応答データ指定値を取得します。 | |
def | getTrajectory (self, int id) |
指定した ID の補間制御軌道生成タイプ指定を取得します。 | |
def | getCenterOffset (self, int id) |
指定した ID の中央値オフセット値を取得します。 | |
def | getReverse (self, int id) |
指定した ID のリバース状態を取得します。 | |
def | getCloneReverse (self, int id) |
指定した ID のクローン/リバース値を取得します。 | |
def | getMinVoltageLimit (self, int id) |
指定したIDの下限電圧リミット値を取得します。 | |
def | getMinVoltageLimitPower (self, int id) |
指定したIDの下限リミット電圧を下回った場合の出力割合を取得します。 | |
def | getMaxVoltageLimit (self, int id) |
指定したIDの上限リミット電圧を取得します。 | |
def | getMaxVoltageLimitPower (self, int id) |
指定したIDの上限リミット電圧を超えた場合の出力割合を取得します。 | |
def | getCurrentLimit (self, int id) |
指定したIDの電流リミット値を取得します。 | |
def | getCurrentLimitPower (self, int id) |
指定したIDの電流リミットを超えた時の出力割合を取得します。 | |
def | getMotorTempLimit (self, int id) |
指定したIDのモータ温度リミット値を取得します。 | |
def | getMotorTempLimitPower (self, int id) |
指定したIDのモータ温度リミットを超えた時の出力割合を取得します。 | |
def | getCpuTempLimit (self, int id) |
指定したIDのCPU温度リミット値を取得します。 | |
def | getCpuTempLimitPower (self, int id) |
指定したIDのCPU温度リミットを超えた時の出力割合を取得します。 | |
def | getCwPositionLimit (self, int id) |
指定したIDのCW方向の動作角度リミット値を取得します。 | |
def | getCwPositionLimitPower (self, int id) |
指定したIDのCW側の角度を超えた時の出力の割合を取得します。 | |
def | getCcwPositionLimit (self, int id) |
指定したIDのCCW方向の動作角度リミット値を取得します。 | |
def | getCcwPositionLimitPower (self, int id) |
指定したIDのCCW側の角度を超えた時の出力の割合を取得します。 | |
def | getMaxGoalSpeed (self, int id) |
指定したIDの指令可能な最大速度値を取得します。 | |
def | getMaxGoalCurrent (self, int id) |
指定したIDの指令可能な最大電流値を取得します。 | |
def | getMaxGoalTorque (self, int id) |
指定したIDの指令可能な最大推定トルク値を取得します。 | |
def | getTotalPowerRate (self, int id) |
指定したIDのモータに出力する割合を取得します。 | |
def | getLockDetectTime (self, int id) |
指定したIDのロック検知を認識するまでの時間を取得します。 | |
def | getLockThresholdPower (self, int id) |
指定したIDのロック検知を開始する出力指示の閾値を取得します。 | |
def | getLockDetectOutputPower (self, int id) |
指定したIDがロック検知が起きた時の出力の割合を取得します。 | |
def | getGoalPosition (self, int id) |
指定したIDの目標指示位置を取得します。 | |
def | getGoalSpeed (self, int id) |
指定した ID の目標速度を取得します。 | |
def | getGoalCurrent (self, int id) |
指定した ID の目標電流値を取得します。 | |
def | getGoalTorque (self, int id) |
指定した ID の目標トルク値を取得します。 | |
def | getGoalPwm (self, int id) |
指定したIDの目標出力PWM値を取得します。 | |
def | getGoalTime (self, int id) |
指定したIDの目標補間指示時間を取得します。 | |
def | getCenterOffsetRange (self, int id) |
指定したIDの中央値オフセット(CenterOffset)の設定可能な最小/最大の範囲を取得します。 | |
def | getMinVoltageLimitRange (self, int id) |
指定したIDの入力最小電圧リミット値(MinVoltageLimit)の設定可能な最小/最大の範囲を取得します。 | |
def | getMaxVoltageLimitRange (self, int id) |
指定した ID の最大電圧(MaxVoltage)の設定可能な範囲を取得します。 | |
def | getCurrentLimitRange (self, int id) |
指定した ID の電流(Current)の設定可能な範囲を取得します。 | |
def | getMotorTempLimitRange (self, int id) |
指定した ID のモータ温度(MotorTemp)の範囲を取得します。 | |
def | getCpuTempLimitRange (self, int id) |
指定した ID のCPU温度の範囲(CpuTemp)を取得します。 | |
def | getMaxGoalSpeedRange (self, int id) |
指定した ID の最大速度指令値(MaxGoalSpeed)の設定可能な範囲を取得します。 | |
def | getMaxGoalCurrentRange (self, int id) |
指定した ID の最大電流指令値(MaxGoalCurrent)の設定可能な範囲を取得します。 | |
def | getMaxGoalTorqueRange (self, int id) |
指定した ID の最大トルク指令値(MaxGoalTorque)の設定可能な範囲を取得します。 | |
def | getCwPositionLimitRange (self, int id) |
指定したIDの指定したCW方向の動作角度リミット値(CwPosition)の設定可能な範囲を取得します。 | |
def | getCcwPositionLimitRange (self, int id) |
指定したIDの指定したCCW方向の動作角度リミット値(CcwPosition)の設定可能な範囲を取得します。 | |
def | printAllRange (self, int id) |
指定した ID の設定データの範囲を表示する関数 | |
def | getDafaultPidGain (self, int id, int pAddr) |
指定した ID の PIDゲインを取得します。 | |
def | getPresetAllPidGains (self, int id, int prisetNum) |
指定した ID 、プリセット番号の PID ゲインを位置からトルクまで全て取得します。 | |
def | getPresetPidGains (self, int id, int prisetNum, int gainType) |
指定した ID 、プリセット番号、ゲインタイプのPID ゲインを取得します。 | |
def | getAllPrisetNum (self, int id) |
指定した ID のすべてのプリセット番号を取得します。 | |
def | getLedMode (self, int id) |
指定したID のLED点灯モードを取得します。 | |
def | setTorqueSwitch (self, int id, int data, writeOpt=0) |
MemWriteを利用したデータのset関数一覧 | |
def | setMotorReceive (self, int id, int receiveOpt, writeOpt=0) |
指定した ID のmotorREADやMotorWRITEから返信される応答モードを設定します。 | |
def | setControlMode (self, int id, int controlMode, writeOpt=0) |
指定した ID の位置制御などの制御モードを設定します。 | |
def | setDafaultPidGain (self, int id, int pidAddr, int kp, int ki, int kd, st=None, writeOpt=0) |
指定した ID のPIDゲインを変更します。 | |
def | setPositionPidGain (self, int id, int kp, int ki, int kd, int st, writeOpt=0) |
指定した ID のプリセット1の位置制御のPIDゲインを変更します。 | |
def | setSpeedPidGain (self, int id, int kp, int ki, int kd, writeOpt=0) |
指定した ID のプリセット1の速度制御のPIDゲインを変更します。 | |
def | setCurrentPidGain (self, int id, int kp, int ki, int kd, writeOpt=0) |
指定した ID のプリセット1の電流制御のPIDゲインを変更します。 | |
def | setTorquePidGain (self, int id, int kp, int ki, int kd, writeOpt=0) |
指定した ID のプリセット1のトルク制御のPIDゲインを変更します。 | |
def | setCenterOffset (self, int id, int CenterOffset, writeOpt=0) |
指定した ID の中央値オフセット値を設定します。 | |
def | setCloneReverse (self, int id, int crVal) |
指定した ID のクローン/リバースを設定します。 | |
def | setMinVoltageLimit (self, int id, int minVol, int limPower, writeOpt=0) |
指定した ID の下限電圧を下回った時の挙動を設定します。 | |
def | setMaxVoltageLimit (self, int id, int maxVol, int limPower, writeOpt=0) |
指定した ID の上限電圧を上回った時の挙動を設定します。 | |
def | setCurrentLimit (self, int id, int maxCur, int limPower, writeOpt=0) |
指定した ID のモータ消費電流最大値を上回った時の挙動を設定します。 | |
def | setMotorTempLimit (self, int id, int maxTemp, int limPower, writeOpt=0) |
指定した ID のモータ温度最大値を上回った時の挙動を設定します。 | |
def | setCpuTempLimit (self, int id, int maxTemp, int limPower, writeOpt=0) |
指定した ID のCPU温度最大値を上回った時の挙動を設定します。 | |
def | setPositionLimit (self, int id, int cwPos, int ccwPos, int limitPower, writeOpt=0) |
指定した ID の最大角を上回った時の挙動を設定します。 | |
def | setMaxGoalSpeed (self, int id, int maxDesSpd, writeOpt=0) |
指定した ID の最大速度指令値を設定します。 | |
def | setMaxGoalCurrent (self, int id, int maxDesCur, writeOpt=0) |
指定した ID の最大電流指令値を設定します。 | |
def | setMaxGoalTorque (self, int id, int maxDesTrq, writeOpt=0) |
指定した ID の最大動推定トルク指令値を設定します。 | |
def | setTotalPowerRate (self, int id, int rate, writeOpt=0) |
指定した ID のモータ出力制限%値を設定します。 | |
def | setLockDetect (self, int id, int time, int power, int outputPower, writeOpt=0) |
指定した ID のロック時間、ロックと認識される出力割合、およびロック時間の出力%値を設定します。 | |
def | setTrajectory (self, int id, int data, writeOpt=0) |
指定した ID の補間制御軌道生成タイプ指定を設定します。 | |
def | setAllPrisetNum (self, int id, int prisetNum, writeOpt=0) |
指定した ID の全てのプリセット番号を設定します。 | |
def | setPidGains (self, int id, int prisetNum, int gainType, int kp, int ki, int kd, st=None, writeOpt=0) |
ID、プリセット番号、ゲインタイプを指定し、PIDゲインを変更します。 | |
def | setLedMode (self, int id, int ledVal) |
指定した ID のLEDモードを設定します。 | |
def | setMotorTorqueOn (self, int id, int receiveMode, controlMode=0x00) |
MotorWRITEを利用したデータのset関数一覧 | |
def | setMotorFree (self, int id, int receiveMode, controlMode=0x00) |
指定した ID のモータをフリーにし、ステータス、モータのON/OFF、受信データを取得します。 | |
def | setMotorBrake (self, int id, int receiveMode, controlMode=0x00) |
指定した ID のモータをブレーキにし、ステータス、モータのON/OFF、受信データを取得します。 | |
def | setMotorHold (self, int id, int receiveMode, controlMode=0x00) |
指定した ID のモータをホールドにし、ステータス、モータのON/OFF、受信データを取得します。 | |
def | setPosition (self, int id, int receiveMode, int position, speed=None, current=None, torque=None, time=None) |
指定した ID のモータの位置、速度、電流、トルク、および時間パラメーターを設定し、データをモーター コントローラーに送信します。 | |
def | getSerialNumber (self, int id) |
指定したIDのサーボからシリアル番号を取得します。 | |
def | getModelNum (self, int id) |
指定したIDのサーボからモデル番号を取得します。 | |
def | getVersion (self, int id) |
指定したIDからファームウェアのバージョン番号を取得します。 | |
def | getResponseTime (self, int id) |
システム読み取り操作のステータスと応答時間を取得します。 | |
def | setId (self, int id, int newId, serialNum=None) |
SystemWriteを利用したデータのset関数一覧 | |
def | setBaudrate (self, int id, int newBaudrate, serialNum=None) |
指定したIDの通信速度を設定します | |
def | setParity (self, int id, int newParity, serialNum=None) |
指定したIDのパリティを設定します | |
def | setResponseTime (self, int id, int newResponseTime, serialNum=None) |
指定したIDの応答時間を設定します | |
静的公開メンバ関数 | |
def | defaultMakeCmd (int id, int cmd, header=0xfe) |
通常のPMXのコマンドを作る関数です。 | |
def | checkRecv (rxBuff, int cmd, header=0xfe) |
checkRecv関数は、受信パケットのヘッダー、パケット長、およびコマンドをチェックします。 | |
PMXで使用する関数や定義をひとまとまりにしたものです
PMXで必要だと思われる機能の関数化
をしています
|
static |
checkRecv関数は、受信パケットのヘッダー、パケット長、およびコマンドをチェックします。
受信データを解析し、下記エラーかどうかチェックを行います。
rxBuff | 受信したCRCを含む全てのデータ(バイト配列) |
cmd | 受信時にチェックするコマンド |
header | ヘッダーがデフォルトと違う場合に指定する |
|
static |
通常のPMXのコマンドを作る関数です。
id | PMXサーボモータのID番号 |
cmd | コマンドの値 |
header | デフォルトのヘッダー値 基本は0xfe |
def PmxLib_old20240626.PmxLib.FactoryReset | ( | self, | |
int | id, | ||
serialNum = None |
|||
) |
サーボを工場出荷時の設定にリセットします
id | PMXサーボモータのID番号 |
serialNum | シリアル番号 |
def PmxLib_old20240626.PmxLib.getAllPrisetNum | ( | self, | |
int | id | ||
) |
指定した ID のすべてのプリセット番号を取得します。
id | PMXサーボモータのID番号 |
status,prisetArray | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
prisetArray | 読み取ったプリセット番号のデータ配列[位置ゲインプリセット, 速度ゲインプリセット, 電流ゲインプリセット, トルクゲインプリセット]。通信失敗時には空のリストを返します。 |
def PmxLib_old20240626.PmxLib.getCcwPositionLimit | ( | self, | |
int | id | ||
) |
指定したIDのCCW方向の動作角度リミット値を取得します。
MemREADを使用して指定したIDからCCW方向の動作角度リミット値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | CW方向の動作角度リミット値 |
def PmxLib_old20240626.PmxLib.getCcwPositionLimitPower | ( | self, | |
int | id | ||
) |
指定したIDのCCW側の角度を超えた時の出力の割合を取得します。
MemREADを使用して指定したIDからCCW側の角度を超えた時の出力の割合を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | CCW方向の閾値外時の出力割合(%) |
def PmxLib_old20240626.PmxLib.getCcwPositionLimitRange | ( | self, | |
int | id | ||
) |
指定したIDの指定したCCW方向の動作角度リミット値(CcwPosition)の設定可能な範囲を取得します。
MemREADを使用して指定したIDから指定したCCW方向の動作角度リミット値(CcwPosition)の範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | 最小位置の範囲([CcwPositionの最小値,CcwPositionの最大値]) |
def PmxLib_old20240626.PmxLib.getCenterOffset | ( | self, | |
int | id | ||
) |
指定した ID の中央値オフセット値を取得します。
MemREADを使用して指定したIDから中央値オフセット値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 中央値オフセット値 |
def PmxLib_old20240626.PmxLib.getCenterOffsetRange | ( | self, | |
int | id | ||
) |
指定したIDの中央値オフセット(CenterOffset)の設定可能な最小/最大の範囲を取得します。
MemREADを使用して指定したIDから中央値オフセット(CenterOffset)の設定可能な最小/最大の範囲を取得します。
id | PMXサーボモータのID番号 |
[status,offsetData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
offsetData | 中央値オフセットの範囲([CenterOffsetの最小値,CenterOffsetの最大値]) |
def PmxLib_old20240626.PmxLib.getCloneReverse | ( | self, | |
int | id | ||
) |
指定した ID のクローン/リバース値を取得します。
MemREADを使用して指定したIDからクローン/リバースを取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | クローン/リバース値 |
def PmxLib_old20240626.PmxLib.getControlMode | ( | self, | |
int | id | ||
) |
指定した ID の制御モードを取得します。
MemREADを使用して指定したIDから制御モードを取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 制御モード値。ControlModeを参照してください。 |
def PmxLib_old20240626.PmxLib.getCPUTemp | ( | self, | |
int | id | ||
) |
指定した ID の現在のCPU温度を取得します。
MemREADを使用して指定したIDから現在CPU温度を取得します。
id | PMXサーボモータのID番号 |
[status,cpuTempData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
cpuTempData | 現在のCPU温度データ |
def PmxLib_old20240626.PmxLib.getCpuTempLimit | ( | self, | |
int | id | ||
) |
指定したIDのCPU温度リミット値を取得します。
MemREADを使用して指定したIDからCPU温度リミット値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | CPU温度リミット値 |
def PmxLib_old20240626.PmxLib.getCpuTempLimitPower | ( | self, | |
int | id | ||
) |
指定したIDのCPU温度リミットを超えた時の出力割合を取得します。
MemREADを使用して指定したIDからCPU温度リミットを超えた時の出力割合を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | CPU温度リミット時の出力割合(%) |
def PmxLib_old20240626.PmxLib.getCpuTempLimitRange | ( | self, | |
int | id | ||
) |
指定した ID のCPU温度の範囲(CpuTemp)を取得します。
MemREADを使用して指定したIDからCPU温度(CpuTemp)の設定可能な範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | CPU温度の範囲([CpuTempの最小値,CpuTempの最大値]) |
def PmxLib_old20240626.PmxLib.getCurrent | ( | self, | |
int | id | ||
) |
指定した ID の現在の電流を取得します。
MemREADを使用して指定したIDから現在電流を取得します。
id | PMXサーボモータのID番号 |
[status,curData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
curData | 現在の電流データ |
def PmxLib_old20240626.PmxLib.getCurrentLimit | ( | self, | |
int | id | ||
) |
指定したIDの電流リミット値を取得します。
MemREADを使用して指定したIDから電流リミット値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 電流リミット値 |
def PmxLib_old20240626.PmxLib.getCurrentLimitPower | ( | self, | |
int | id | ||
) |
指定したIDの電流リミットを超えた時の出力割合を取得します。
MemREADを使用して指定したIDから電流リミットを超えた時の出力割合を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 電流リミット時の出力割合(%) |
def PmxLib_old20240626.PmxLib.getCurrentLimitRange | ( | self, | |
int | id | ||
) |
指定した ID の電流(Current)の設定可能な範囲を取得します。
MemREADを使用して指定したIDから電流(Current)の範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | 電流の範囲([Currentの最小値,Currentの最大値]) |
def PmxLib_old20240626.PmxLib.getCwPositionLimit | ( | self, | |
int | id | ||
) |
指定したIDのCW方向の動作角度リミット値を取得します。
MemREADを使用して指定したIDからCW方向の動作角度リミット値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | CW方向の動作角度リミット値 |
def PmxLib_old20240626.PmxLib.getCwPositionLimitPower | ( | self, | |
int | id | ||
) |
指定したIDのCW側の角度を超えた時の出力の割合を取得します。
MemREADを使用して指定したIDからCW側の角度を超えた時の出力の割合を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | CW方向の閾値外時の出力割合(%) |
def PmxLib_old20240626.PmxLib.getCwPositionLimitRange | ( | self, | |
int | id | ||
) |
指定したIDの指定したCW方向の動作角度リミット値(CwPosition)の設定可能な範囲を取得します。
MemREADを使用して指定したIDから指定したCW方向の動作角度リミット値(CwPosition)の範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | 最大位置の範囲([CwPositionの最小値,CwPositionの最大値]) |
def PmxLib_old20240626.PmxLib.getDafaultPidGain | ( | self, | |
int | id, | ||
int | pAddr | ||
) |
指定した ID の PIDゲインを取得します。
id | PMXサーボモータのID番号 |
pAddr | PIDゲインのkpが保存されている先頭のアドレス |
status,pidArray | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
pidArray | 読み取ったPIDゲインのデータ配列[kp, ki, kd, ks]。通信失敗時には空のリストを返します。 |
def PmxLib_old20240626.PmxLib.getEncoder | ( | self, | |
int | id | ||
) |
指定した ID のエンコーダを取得します。
MemREADを使用して指定したIDからエンコーダを取得します。
id | PMXサーボモータのID番号 |
[status,encData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
encData | エンコーダデータ |
def PmxLib_old20240626.PmxLib.getFullStatus | ( | self, | |
int | id | ||
) |
指定した ID の全てのステータス情報を取得します。
MemREADを使用して指定したIDから全てのステータスを取得します。
詳しくは取扱説明書をご覧ください。PMXのオンラインマニュアル
id | PMXサーボモータのID番号 |
[status,servoStatus] | |
status | 通信エラーとサーボモータのステータスをたしたもの |
servoStatus | [staData、sysStaData、motStaData、ramStaData] データが順に含まれます。 |
def PmxLib_old20240626.PmxLib.getGoalCurrent | ( | self, | |
int | id | ||
) |
指定した ID の目標電流値を取得します。
MemREADを使用して指定したIDから目標電流値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 目標電流値 |
def PmxLib_old20240626.PmxLib.getGoalPosition | ( | self, | |
int | id | ||
) |
指定したIDの目標指示位置を取得します。
MemREADを使用して指定したIDから目標指示位置を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 目標位置 |
def PmxLib_old20240626.PmxLib.getGoalPwm | ( | self, | |
int | id | ||
) |
指定したIDの目標出力PWM値を取得します。
MemREADを使用して指定したIDから目標出力PWM値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | PWM出力指示値 |
def PmxLib_old20240626.PmxLib.getGoalSpeed | ( | self, | |
int | id | ||
) |
指定した ID の目標速度を取得します。
MemREADを使用して指定したIDから目標速度を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 目標速度 |
def PmxLib_old20240626.PmxLib.getGoalTime | ( | self, | |
int | id | ||
) |
指定したIDの目標補間指示時間を取得します。
MemREADを使用して指定したIDから目標補間指示時間を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 目標補間指示時間 |
def PmxLib_old20240626.PmxLib.getGoalTorque | ( | self, | |
int | id | ||
) |
指定した ID の目標トルク値を取得します。
MemREADを使用して指定したIDから目標トルク値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 目標トルク値 |
def PmxLib_old20240626.PmxLib.getInputVoltage | ( | self, | |
int | id | ||
) |
指定した ID の現在の電圧を取得します。
MemREADを使用して指定したIDから現在電圧を取得します。
id | PMXサーボモータのID番号 |
[status,volData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
volData | 現在の電圧データ |
def PmxLib_old20240626.PmxLib.getLedMode | ( | self, | |
int | id | ||
) |
指定したID のLED点灯モードを取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | LED点灯モード |
def PmxLib_old20240626.PmxLib.getLockDetectOutputPower | ( | self, | |
int | id | ||
) |
指定したIDがロック検知が起きた時の出力の割合を取得します。
MemREADを使用して指定したIDからロック検知が起きた時の出力の割合を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | ロック検知時の出力割合(%) |
def PmxLib_old20240626.PmxLib.getLockDetectTime | ( | self, | |
int | id | ||
) |
指定したIDのロック検知を認識するまでの時間を取得します。
MemREADを使用して指定したIDからロック検知を認識するまでの時間を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | ロック検知を認識するまでの時間 |
def PmxLib_old20240626.PmxLib.getLockThresholdPower | ( | self, | |
int | id | ||
) |
指定したIDのロック検知を開始する出力指示の閾値を取得します。
MemREADを使用して指定したIDからロック検知を開始する出力指示の閾値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | ロック検知開始出力(%) |
def PmxLib_old20240626.PmxLib.getMaxGoalCurrent | ( | self, | |
int | id | ||
) |
指定したIDの指令可能な最大電流値を取得します。
MemREADを使用して指定したIDから指令可能な最大電流値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 最大電流指令値 |
def PmxLib_old20240626.PmxLib.getMaxGoalCurrentRange | ( | self, | |
int | id | ||
) |
指定した ID の最大電流指令値(MaxGoalCurrent)の設定可能な範囲を取得します。
MemREADを使用して指定したIDから最大電流指令値(MaxGoalCurrent)の範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | 最大電流指令値の範囲([MaxGoalCurrentの最小値,MaxGoalCurrentの最大値]) |
def PmxLib_old20240626.PmxLib.getMaxGoalSpeed | ( | self, | |
int | id | ||
) |
指定したIDの指令可能な最大速度値を取得します。
MemREADを使用して指定したIDから指令可能な最大速度値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 最大速度指令値 |
def PmxLib_old20240626.PmxLib.getMaxGoalSpeedRange | ( | self, | |
int | id | ||
) |
指定した ID の最大速度指令値(MaxGoalSpeed)の設定可能な範囲を取得します。
MemREADを使用して指定したIDから最大速度指令値(MaxGoalSpeed)の範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | 最大速度指令値の範囲([MaxGoalSpeedの最小値,MaxGoalSpeedの最大値]) |
def PmxLib_old20240626.PmxLib.getMaxGoalTorque | ( | self, | |
int | id | ||
) |
指定したIDの指令可能な最大推定トルク値を取得します。
MemREADを使用して指定したIDから指令可能な最大推定トルク値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 最大動推定トルク指令値 |
def PmxLib_old20240626.PmxLib.getMaxGoalTorqueRange | ( | self, | |
int | id | ||
) |
指定した ID の最大トルク指令値(MaxGoalTorque)の設定可能な範囲を取得します。
MemREADを使用して指定したIDから最大トルク指令値(MaxGoalTorque)の範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | 最大トルク指令値の範囲([MaxGoalTorqueの最小値,MaxGoalTorqueの最大値]) |
def PmxLib_old20240626.PmxLib.getMaxVoltageLimit | ( | self, | |
int | id | ||
) |
指定したIDの上限リミット電圧を取得します。
MemREADを使用して指定したIDから上限リミット電圧を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 入力電圧最大値 |
def PmxLib_old20240626.PmxLib.getMaxVoltageLimitPower | ( | self, | |
int | id | ||
) |
指定したIDの上限リミット電圧を超えた場合の出力割合を取得します。
MemREADを使用して指定したIDから上限リミット電圧を超えた場合の出力割合を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 上限リミット電圧を上回った時の出力割合(%) |
def PmxLib_old20240626.PmxLib.getMaxVoltageLimitRange | ( | self, | |
int | id | ||
) |
指定した ID の最大電圧(MaxVoltage)の設定可能な範囲を取得します。
MemREADを使用して指定したIDから最大電圧(MaxVoltage)の範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | 最大電圧の範囲([MaxVoltageの最小値,MaxVoltageの最大値]) |
def PmxLib_old20240626.PmxLib.getMinVoltageLimit | ( | self, | |
int | id | ||
) |
指定したIDの下限電圧リミット値を取得します。
MemREADを使用して指定したIDから下限電圧リミット値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 下限電圧設定値 |
def PmxLib_old20240626.PmxLib.getMinVoltageLimitPower | ( | self, | |
int | id | ||
) |
指定したIDの下限リミット電圧を下回った場合の出力割合を取得します。
MemREADを使用して指定したIDから下限リミット電圧を下回った場合の出力割合を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 下限リミット電圧を下回った時の出力割合(%) |
def PmxLib_old20240626.PmxLib.getMinVoltageLimitRange | ( | self, | |
int | id | ||
) |
指定したIDの入力最小電圧リミット値(MinVoltageLimit)の設定可能な最小/最大の範囲を取得します。
MemREADを使用して指定したIDから入力最小電圧リミット値(MinVoltageLimit)の設定可能な最小/最大の範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | 入力最小電圧リミット値の範囲([MinVoltageLimitの最小値,MinVoltageLimitの最大値]) |
def PmxLib_old20240626.PmxLib.getModelNum | ( | self, | |
int | id | ||
) |
指定したIDのサーボからモデル番号を取得します。
id | PMXサーボモータのID番号 |
[status,modelNumData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
modelNumData | モデル番号。通信が失敗した場合はNoneが返ります。 |
def PmxLib_old20240626.PmxLib.getMotorReceive | ( | self, | |
int | id | ||
) |
指定した ID の応答データ指定値を取得します。
MemREADを使用して指定したIDから応答データ指定値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | 応答データ指定値(ReceiveDataOptionを参照) |
def PmxLib_old20240626.PmxLib.getMotorStatus | ( | self, | |
int | id | ||
) |
指定した ID のモータステータスを取得します。
MemREADを使用して指定したIDからモータステータスを取得します。
詳しくは取扱説明書をご覧ください。PMXのオンラインマニュアル
id | PMXサーボモータのID番号 |
[status,motStaData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
motStaData | モータステータスデータ |
def PmxLib_old20240626.PmxLib.getMotorTemp | ( | self, | |
int | id | ||
) |
指定した ID の現在のモータ温度を取得します。
MemREADを使用して指定したIDから現在モータ温度を取得します。
id | PMXサーボモータのID番号 |
[status,motTempData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
motTempData | 現在のモータ温度データ |
def PmxLib_old20240626.PmxLib.getMotorTempLimit | ( | self, | |
int | id | ||
) |
指定したIDのモータ温度リミット値を取得します。
MemREADを使用して指定したIDからモータ温度リミット値を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | モータ温度リミット値 |
def PmxLib_old20240626.PmxLib.getMotorTempLimitPower | ( | self, | |
int | id | ||
) |
指定したIDのモータ温度リミットを超えた時の出力割合を取得します。
MemREADを使用して指定したIDからモータ温度リミットを超えた時の出力割合を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | モータ温度リミット時の出力割合(%) |
def PmxLib_old20240626.PmxLib.getMotorTempLimitRange | ( | self, | |
int | id | ||
) |
指定した ID のモータ温度(MotorTemp)の範囲を取得します。
MemREADを使用して指定したIDからモータ温度(MotorTemp)の設定可能な範囲を取得します。
id | PMXサーボモータのID番号 |
[status,rangeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rangeData | モータ温度の範囲([MotorTempの最小値,MotorTempの最大値]) |
def PmxLib_old20240626.PmxLib.getPosition | ( | self, | |
int | id, | ||
contolMode = 0x01 |
|||
) |
指定したIDの現在の位置を取得します。
MemREADを使用して指定したIDから現在位置を取得します。
PMXでは、位置制御モードが含まれるとデータが符号あり(±320deg)、含まれない場合は符号なし(0-360deg)のデータが返ってきます
id | PMXサーボモータのID番号 |
contolMode | 制御モードを入れます。デフォルトは0x01です。位置制御モードが含まれるかどうかに使用します。 |
[status,posData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
posData | 現在の位置データ。位置制御モードによって符号有り無しが変わります 。 |
def PmxLib_old20240626.PmxLib.getPresetAllPidGains | ( | self, | |
int | id, | ||
int | prisetNum | ||
) |
指定した ID 、プリセット番号の PID ゲインを位置からトルクまで全て取得します。
id | PMXサーボモータのID番号 |
prisetNum | プリセット番号 |
status,gainsList | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
gainsList | 読み取ったPIDゲインのデータ配列(16データ)。通信失敗時には空のリストを返します。 |
def PmxLib_old20240626.PmxLib.getPresetPidGains | ( | self, | |
int | id, | ||
int | prisetNum, | ||
int | gainType | ||
) |
指定した ID 、プリセット番号、ゲインタイプのPID ゲインを取得します。
id | PMXサーボモータのID番号 |
prisetNum | プリセット番号 |
gainType | ゲインタイプ(0:位置制御ゲイン,1:速度制御ゲイン,2:電流制御ゲイン,3:トルク制御ゲイン) |
status,pidArray | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
pidArray | 読み取ったPIDゲインのデータ配列[kp, ki, kd, ks]。通信失敗時には空のリストを返します。 |
def PmxLib_old20240626.PmxLib.getPwm | ( | self, | |
int | id | ||
) |
指定した ID の現在のPWMを取得します。
MemREADを使用して指定したIDから現在PWMを取得します。
id | PMXサーボモータのID番号 |
[status,pwmData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
pwmData | 現在のPWMデータ |
def PmxLib_old20240626.PmxLib.getRamAccessStatus | ( | self, | |
int | id | ||
) |
指定した ID のRAMアクセスステータスを取得します。
MemREADを使用して指定したIDからRAMアクセスステータスを取得します。
詳しくは取扱説明書をご覧ください。PMXのオンラインマニュアル
id | PMXサーボモータのID番号 |
[status,ramStaData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
ramStaData | アクセスエラーになったRAMの先頭アドレス |
def PmxLib_old20240626.PmxLib.getResponseTime | ( | self, | |
int | id | ||
) |
システム読み取り操作のステータスと応答時間を取得します。
id | PMXサーボモータのID番号 |
[status,respData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
respData | 応答時間[us]。通信が失敗した場合はNoneが返ります。 |
def PmxLib_old20240626.PmxLib.getReverse | ( | self, | |
int | id | ||
) |
指定した ID のリバース状態を取得します。
MemREADを使用して指定したIDからクローン/リバースを取得します。
id | PMXサーボモータのID番号 |
[status,reverse] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
reverse | (bool) リバースON:True,リバースON:False |
def PmxLib_old20240626.PmxLib.getSerialNumber | ( | self, | |
int | id | ||
) |
指定したIDのサーボからシリアル番号を取得します。
id | PMXサーボモータのID番号 |
[status,serialNumData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
serialNumData | シリアル番号。通信が失敗した場合はNoneが返ります。 |
def PmxLib_old20240626.PmxLib.getSpeed | ( | self, | |
int | id | ||
) |
指定した ID の現在の速度を取得します。
MemREADを使用して指定したIDから現在速度を取得します。
id | PMXサーボモータのID番号 |
[status,spdData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
spdData | 現在の速度データ |
def PmxLib_old20240626.PmxLib.getStatus | ( | self, | |
int | id | ||
) |
指定した ID のステータスを取得します。
MemREADを使用して指定したIDからステータスを取得します。
詳しくは取扱説明書をご覧ください。PMXのオンラインマニュアル
id | PMXサーボモータのID番号 |
[status,stData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
stData | ステータスデータ |
def PmxLib_old20240626.PmxLib.getSystemStatus | ( | self, | |
int | id | ||
) |
指定した ID のシステムステータスを取得します。
MemREADを使用して指定したIDからシステムステータスを取得します。
詳しくは取扱説明書をご覧ください。PMXのオンラインマニュアル
id | PMXサーボモータのID番号 |
[status,sysStaData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
sysStaData | システムステータスデータ |
def PmxLib_old20240626.PmxLib.getTorque | ( | self, | |
int | id | ||
) |
指定した ID の現在のトルクを取得します。
MemREADを使用して指定したIDから現在の推定トルクを取得します。
id | PMXサーボモータのID番号 |
[status,trqData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
trqData | 現在の推定トルクデータ |
def PmxLib_old20240626.PmxLib.getTorqueSwitch | ( | self, | |
int | id | ||
) |
指定した ID のトルク ON 値を取得します。
MemREADを使用して指定したIDからトルク ON 値を取得します。
id | PMXサーボモータのID番号 |
[status,trqSwitchData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
trqSwitchData | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
def PmxLib_old20240626.PmxLib.getTotalPowerRate | ( | self, | |
int | id | ||
) |
指定したIDのモータに出力する割合を取得します。
MemREADを使用して指定したIDからモータに出力する割合を取得します。
id | PMXサーボモータのID番号 |
[status,data] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
data | モータ出力割合(%) |
def PmxLib_old20240626.PmxLib.getTrajectory | ( | self, | |
int | id | ||
) |
指定した ID の補間制御軌道生成タイプ指定を取得します。
MemREADを使用して指定したIDから補間制御軌道生成タイプ指定を取得します。
id | PMXサーボモータのID番号 |
[status,traData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
traData | 補間制御軌道生成タイプ指定。TrajectoryTypeを参照してください。 |
def PmxLib_old20240626.PmxLib.getTrajectoryTime | ( | self, | |
int | id | ||
) |
指定した ID の現在の補間時間を取得します。
MemREADを使用して指定したIDから現在補間時間を取得します。
id | PMXサーボモータのID番号 |
[status,traTimeData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
traTimeData | 現在の補間時間データ |
def PmxLib_old20240626.PmxLib.getVersion | ( | self, | |
int | id | ||
) |
指定したIDからファームウェアのバージョン番号を取得します。
id | PMXサーボモータのID番号 |
[status,varData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
varData | バージョン番号のタプル[MAJOR,MINOR,PATCH,BUILD]。通信が失敗した場合はNoneが返ります |
def PmxLib_old20240626.PmxLib.LOAD | ( | self, | |
int | id | ||
) |
PMXサーボモータのLOADコマンドを発行し、ステータス結果を取得します。
id | PMXサーボモータのID番号 |
def PmxLib_old20240626.PmxLib.MemREAD | ( | self, | |
int | id, | ||
int | addr, | ||
int | size | ||
) |
MemREADコマンドでPMXサーボモータからデータを取得します。
id | PMXサーボモータのID番号 |
addr | データを読み取る先頭のアドレス |
size | 取得するデータサイズ |
status,rxdata | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rxdata | 指定されたアドレスから読み取ったデータ配列(bytes型)。通信失敗時にはNoneを返します。 |
def PmxLib_old20240626.PmxLib.MemREADToByte | ( | self, | |
int | id, | ||
int | addr | ||
) |
MemREADで取得したデータをbyte(符号なし1byte)に変換して取得します。
id | PMXサーボモータのID番号 |
addr | データを読み取る先頭のアドレス |
[status,rxData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rxData | 指定されたアドレスから読み取ったbyte(符号なし1byte)のデータ。通信失敗時にはNoneを返します。 |
def PmxLib_old20240626.PmxLib.MemREADToInt16 | ( | self, | |
int | id, | ||
int | addr | ||
) |
MemREADで取得したデータをint16(符号あり2byte)に変換して取得します。
id | PMXサーボモータのID番号 |
addr | データを読み取る先頭のアドレス |
[status,rxData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rxData | 指定されたアドレスから読み取ったint16(符号あり2byte)のデータ。通信失敗時にはNoneを返します。 |
def PmxLib_old20240626.PmxLib.MemREADToInt32 | ( | self, | |
int | id, | ||
int | addr | ||
) |
MemREADで取得したデータをint32(符号あり4byte)に変換して取得します。
id | PMXサーボモータのID番号 |
addr | データを読み取る先頭のアドレス |
[status,rxData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rxData | 指定されたアドレスから読み取ったint32(符号あり4byte)のデータ。通信失敗時にはNoneを返します。 |
def PmxLib_old20240626.PmxLib.MemREADToUint16 | ( | self, | |
int | id, | ||
int | addr | ||
) |
MemREADで取得したデータをUint16(符号なし2byte)に変換して取得します。
id | PMXサーボモータのID番号 |
addr | データを読み取る先頭のアドレス |
[status,rxData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rxData | 指定されたアドレスから読み取ったUint16(符号なし2byte)のデータ。通信失敗時にはNoneを返します。 |
def PmxLib_old20240626.PmxLib.MemREADToUint32 | ( | self, | |
int | id, | ||
int | addr | ||
) |
MemREADで取得したデータをUint32(符号なし4byte)に変換して取得します。
id | PMXサーボモータのID番号 |
addr | データを読み取る先頭のアドレス |
[status,rxData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
rxData | 指定されたアドレスから読み取ったUint32(符号なし4byte)のデータ。通信失敗時にはNoneを返します。 |
def PmxLib_old20240626.PmxLib.MemWRITE | ( | self, | |
int | id, | ||
int | baseAddr, | ||
dataByteArray, | |||
writeOpt = 0 |
|||
) |
PMXサーボモータにMemWRITEコマンドを発行し、結果を取得します。
id | PMXサーボモータのID番号 |
baseAddr | データを書き込む先頭アドレス |
dataByteArray | 書き込むデータのbyteリスト |
writeOpt | MemWRITEで使用するオプション 0:通常書き込み、1:TorqueOn中の強制書き込み |
def PmxLib_old20240626.PmxLib.MemWRITEToByte | ( | self, | |
int | id, | ||
int | baseAddr, | ||
int | data, | ||
writeOpt = 0 |
|||
) |
MemWRITEでbyte(符号なし1byte)のデータを書き込みます。 その結果のステータス情報を返信します。
id | PMXサーボモータのID番号 |
baseAddr | データを書き込む先頭アドレス |
data | byte(符号なし1byte)の書きこみデータ |
writeOpt | MemWRITEで使用するオプション 0:通常書き込み、1:TorqueOn中の強制書き込み |
def PmxLib_old20240626.PmxLib.MemWRITEToInt16 | ( | self, | |
int | id, | ||
int | baseAddr, | ||
int | data, | ||
writeOpt = 0 |
|||
) |
MemWRITEでint16(符号あり2byte)のデータを書き込みます。 その結果のステータス情報を返信します。
id | PMXサーボモータのID番号 |
baseAddr | データを書き込む先頭アドレス |
data | int16(符号あり2byte)の書きこみデータ |
writeOpt | MemWRITEで使用するオプション 0:通常書き込み、1:TorqueOn中の強制書き込み |
def PmxLib_old20240626.PmxLib.MemWRITEToInt32 | ( | self, | |
int | id, | ||
int | baseAddr, | ||
int | data, | ||
writeOpt = 0 |
|||
) |
MemWRITEでint32(符号あり4byte)のデータを書き込みます。 その結果のステータス情報を返信します。
id | PMXサーボモータのID番号 |
baseAddr | データを書き込む先頭アドレス |
data | int32(符号あり4byte)の書きこみデータ |
writeOpt | MemWRITEで使用するオプション 0:通常書き込み、1:TorqueOn中の強制書き込み |
def PmxLib_old20240626.PmxLib.MemWRITEToUint16 | ( | self, | |
int | id, | ||
int | baseAddr, | ||
int | data, | ||
writeOpt = 0 |
|||
) |
MemWRITEでint16(符号なし2byte)のデータを書き込みます。 その結果のステータス情報を返信します。
id | PMXサーボモータのID番号 |
baseAddr | データを書き込む先頭アドレス |
data | Uint16(符号なし2byte)の書きこみデータ |
writeOpt | MemWRITEで使用するオプション 0:通常書き込み、1:TorqueOn中の強制書き込み |
def PmxLib_old20240626.PmxLib.MemWRITEToUint32 | ( | self, | |
int | id, | ||
int | baseAddr, | ||
int | data, | ||
writeOpt = 0 |
|||
) |
MemWRITEでUint32(符号なし4byte)のデータを書き込みます。 その結果のステータス情報を返信します。
id | PMXサーボモータのID番号 |
baseAddr | データを書き込む先頭アドレス |
data | Uint32(符号なし4byte)の書きこみデータ |
writeOpt | MemWRITEで使用するオプション 0:通常書き込み、1:TorqueOn中の強制書き込み |
def PmxLib_old20240626.PmxLib.MotorREAD | ( | self, | |
int | id, | ||
int | receiveMode, | ||
controlMode = 0x01 |
|||
) |
MotorREAD関数を発行し、応答モードに応じてデータを取得します。
id | サーボモータのID番号 |
receiveMode | 応答モード。事前に応答モードをMemWrite関数やsetMotorReceive関数で設定する必要があります。 |
controlMode | 制御モード。デフォルト値は 0x01 です。位置制御モードの時の現在位置を判定するときに使用します。 |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.MotorWRITE | ( | self, | |
int | id, | ||
int | mototWRITEopt, | ||
controlMode = 0x01 , |
|||
receiveMode = 0 , |
|||
sendDataList = [] |
|||
) |
MotorWRITE 機能は、モータの制御やトルクのオン/オフを切り替えるコマンドを送信し、モーターからステータスとデータを受信します。
id | PMXサーボモータのID番号 |
mototWRITEopt | コントロールモードのデータを送るかFree/Holdにするかを決めるのに使用します |
controlMode | モータの制御モード。応答モードで現在位置を取得する時のみに使用します |
receiveMode | 応答モード。返ってきたデータを変換するときに使用します。 |
sendDataList | モータへの指示値を格納 |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.MotorWRITEDouble | ( | self, | |
int | id, | ||
int | controlMode, | ||
int | receiveMode, | ||
int | targetVal1, | ||
int | targetVal2 | ||
) |
MotorWriteを使用して2変数を指示するときに使用します。
id | PMXサーボモータのID番号 |
controlMode | モータの制御モード。応答モードで現在位置を取得する時のみに使用します。 |
receiveMode | 応答モード。返ってきたデータを変換するときに使用します。 |
targetVal1 | 目標値1(位置、速度、電流、トルク、PWM)が入ります |
targetVal2 | 目標値2(速度、電流、トルク、PWM、時間)が入ります |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.MotorWRITESingle | ( | self, | |
int | id, | ||
int | controlMode, | ||
int | receiveMode, | ||
int | targetVal | ||
) |
MotorWRITEでデータ指示一つの場合に使用します
id | PMXサーボモータのID番号 |
controlMode | モータの制御モード。応答モードで現在位置を取得する時のみに使用します。 |
receiveMode | 応答モード。返ってきたデータを変換するときに使用します。 |
targetVal | 目標値(位置、速度、電流、トルク、PWM)が入ります |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.MotorWRITETriple | ( | self, | |
int | id, | ||
int | controlMode, | ||
int | receiveMode, | ||
int | targetVal1, | ||
int | targetVal2, | ||
int | targetVal3 | ||
) |
MotorWriteを使用して3変数を指示するときに使用します。
id | PMXサーボモータのID番号 |
controlMode | モータの制御モード。応答モードで現在位置を取得する時のみに使用します。 |
receiveMode | 応答モード。返ってきたデータを変換するときに使用します。 |
targetVal1 | 目標値1(位置、速度、電流、トルク、PWM)のどれかが入ります |
targetVal2 | 目標値2(速度、電流、トルク、PWM、時間)のどれかが入ります |
targetVal3 | 目標値3(電流、トルク、PWM、時間)のどれかが入ります |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.printAllRange | ( | self, | |
int | id | ||
) |
指定した ID の設定データの範囲を表示する関数
id | PMXサーボモータのID番号 |
def PmxLib_old20240626.PmxLib.ReBoot | ( | self, | |
int | id, | ||
resetTime = 0 |
|||
) |
サーボモータを再起動させます。
id | PMXサーボモータのID番号 |
resetTime | 再起動まで待つ時間(ms) |
def PmxLib_old20240626.PmxLib.SAVE | ( | self, | |
int | id | ||
) |
PMXサーボモータのSAVEコマンドを発行し、ステータス結果を取得します。
id | サーボモータのID番号 |
def PmxLib_old20240626.PmxLib.setAllPrisetNum | ( | self, | |
int | id, | ||
int | prisetNum, | ||
writeOpt = 0 |
|||
) |
指定した ID の全てのプリセット番号を設定します。
id | PMXサーボモータのID番号 |
prisetNum | プリセット番号 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setBaudrate | ( | self, | |
int | id, | ||
int | newBaudrate, | ||
serialNum = None |
|||
) |
指定したIDの通信速度を設定します
id | PMXサーボモータのID番号 |
newBaudrate | 通信速度 |
serialNum | シリアル番号 わからない場合は SystemWRITEで取得するので省略可 |
def PmxLib_old20240626.PmxLib.setCenterOffset | ( | self, | |
int | id, | ||
int | CenterOffset, | ||
writeOpt = 0 |
|||
) |
指定した ID の中央値オフセット値を設定します。
id | PMXサーボモータのID番号 |
CenterOffset | 中央値オフセット値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setCloneReverse | ( | self, | |
int | id, | ||
int | crVal | ||
) |
指定した ID のクローン/リバースを設定します。
id | PMXサーボモータのID番号 |
crVal | クローン/リバースを設定する値。クローンなら1、リバースなら2を入力します。 |
def PmxLib_old20240626.PmxLib.setControlMode | ( | self, | |
int | id, | ||
int | controlMode, | ||
writeOpt = 0 |
|||
) |
指定した ID の位置制御などの制御モードを設定します。
id | PMXサーボモータのID番号 |
controlMode | モータに設定する制御モード(ControlModeを参照) |
writeOpt | writeOpt TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setCpuTempLimit | ( | self, | |
int | id, | ||
int | maxTemp, | ||
int | limPower, | ||
writeOpt = 0 |
|||
) |
指定した ID のCPU温度最大値を上回った時の挙動を設定します。
id | PMXサーボモータのID番号 |
maxTemp | CPU温度最大値 |
limPower | CPU温度最大時の出力%値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setCurrentLimit | ( | self, | |
int | id, | ||
int | maxCur, | ||
int | limPower, | ||
writeOpt = 0 |
|||
) |
指定した ID のモータ消費電流最大値を上回った時の挙動を設定します。
id | PMXサーボモータのID番号 |
maxCur | モータ消費電流最大値 |
limPower | モータ消費電流最大時の出力%値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setCurrentPidGain | ( | self, | |
int | id, | ||
int | kp, | ||
int | ki, | ||
int | kd, | ||
writeOpt = 0 |
|||
) |
指定した ID のプリセット1の電流制御のPIDゲインを変更します。
id | PMXサーボモータのID番号 |
kp | 電流制御のPゲイン |
ki | 電流制御のIゲイン |
kd | 電流制御のDゲイン |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setDafaultPidGain | ( | self, | |
int | id, | ||
int | pidAddr, | ||
int | kp, | ||
int | ki, | ||
int | kd, | ||
st = None , |
|||
writeOpt = 0 |
|||
) |
指定した ID のPIDゲインを変更します。
id | PMXサーボモータのID番号 |
pidAddr | PIDゲインのkpが保存されている先頭のアドレス |
kp | Pゲイン |
ki | Iゲイン |
kd | Dゲイン |
st | ストレッチゲイン |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setId | ( | self, | |
int | id, | ||
int | newId, | ||
serialNum = None |
|||
) |
SystemWriteを利用したデータのset関数一覧
指定したIDを新しい ID に設定します。
id | PMXサーボモータの現在のID番号 |
newId | PMXサーボモータのWrite新しいID番号 |
serialNum | シリアル番号 わからない場合は SystemWRITEで取得するので省略可 |
def PmxLib_old20240626.PmxLib.setLedMode | ( | self, | |
int | id, | ||
int | ledVal | ||
) |
指定した ID のLEDモードを設定します。
id | PMXサーボモータのID番号 |
ledVal | LEDを設定する値。デフォルトは0、消灯は1、点灯は2を入力します。 |
def PmxLib_old20240626.PmxLib.setLockDetect | ( | self, | |
int | id, | ||
int | time, | ||
int | power, | ||
int | outputPower, | ||
writeOpt = 0 |
|||
) |
指定した ID のロック時間、ロックと認識される出力割合、およびロック時間の出力%値を設定します。
id | PMXサーボモータのID番号 |
time | ロック時間 |
power | ロックと認識される出力割合 |
outputPower | ロック時間の出力%値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setMaxGoalCurrent | ( | self, | |
int | id, | ||
int | maxDesCur, | ||
writeOpt = 0 |
|||
) |
指定した ID の最大電流指令値を設定します。
id | PMXサーボモータのID番号 |
maxDesCur | 最大電流指令値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setMaxGoalSpeed | ( | self, | |
int | id, | ||
int | maxDesSpd, | ||
writeOpt = 0 |
|||
) |
指定した ID の最大速度指令値を設定します。
id | PMXサーボモータのID番号 |
maxDesSpd | 最大速度指令値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setMaxGoalTorque | ( | self, | |
int | id, | ||
int | maxDesTrq, | ||
writeOpt = 0 |
|||
) |
指定した ID の最大動推定トルク指令値を設定します。
id | PMXサーボモータのID番号 |
maxDesTrq | 最大動推定トルク指令値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setMaxVoltageLimit | ( | self, | |
int | id, | ||
int | maxVol, | ||
int | limPower, | ||
writeOpt = 0 |
|||
) |
指定した ID の上限電圧を上回った時の挙動を設定します。
id | PMXサーボモータのID番号 |
maxVol | 入力電圧最大値 |
limPower | 入力電圧最大時の出力%値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setMinVoltageLimit | ( | self, | |
int | id, | ||
int | minVol, | ||
int | limPower, | ||
writeOpt = 0 |
|||
) |
指定した ID の下限電圧を下回った時の挙動を設定します。
id | PMXサーボモータのID番号 |
minVol | 入力電圧最小値 |
limPower | 入力電圧最小時の出力%値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setMotorBrake | ( | self, | |
int | id, | ||
int | receiveMode, | ||
controlMode = 0x00 |
|||
) |
指定した ID のモータをブレーキにし、ステータス、モータのON/OFF、受信データを取得します。
id | PMXサーボモータのID番号 |
receiveMode | PMXで設定した応答モード |
controlMode | モータに設定する制御モード(ControlModeを参照) |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.setMotorFree | ( | self, | |
int | id, | ||
int | receiveMode, | ||
controlMode = 0x00 |
|||
) |
指定した ID のモータをフリーにし、ステータス、モータのON/OFF、受信データを取得します。
id | PMXサーボモータのID番号 |
receiveMode | PMXで設定した応答モード |
controlMode | モータに設定する制御モード(ControlModeを参照) |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.setMotorHold | ( | self, | |
int | id, | ||
int | receiveMode, | ||
controlMode = 0x00 |
|||
) |
指定した ID のモータをホールドにし、ステータス、モータのON/OFF、受信データを取得します。
id | PMXサーボモータのID番号 |
receiveMode | PMXで設定した応答モード |
controlMode | モータに設定する制御モード(ControlModeを参照) |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.setMotorReceive | ( | self, | |
int | id, | ||
int | receiveOpt, | ||
writeOpt = 0 |
|||
) |
指定した ID のmotorREADやMotorWRITEから返信される応答モードを設定します。
id | PMXサーボモータのID番号 |
receiveOpt | 応答モード ReceiveDataOptionを参照 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setMotorTempLimit | ( | self, | |
int | id, | ||
int | maxTemp, | ||
int | limPower, | ||
writeOpt = 0 |
|||
) |
指定した ID のモータ温度最大値を上回った時の挙動を設定します。
id | PMXサーボモータのID番号 |
maxTemp | モータ温度最大値 |
limPower | モータ温度最大時の出力%値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setMotorTorqueOn | ( | self, | |
int | id, | ||
int | receiveMode, | ||
controlMode = 0x00 |
|||
) |
MotorWRITEを利用したデータのset関数一覧
指定した ID のモータをトルクオンにし、ステータス、モータのON/OFF、受信データを取得します。
id | PMXサーボモータのID番号 |
receiveMode | PMXで設定した応答モード |
controlMode | モータに設定する制御モード(ControlModeを参照) |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.setParity | ( | self, | |
int | id, | ||
int | newParity, | ||
serialNum = None |
|||
) |
指定したIDのパリティを設定します
id | PMXサーボモータのID番号 |
newParity | 通信で使用するパリティの設定(EditParityを参照) |
serialNum | シリアル番号 わからない場合は SystemWRITEで取得するので省略可 |
def PmxLib_old20240626.PmxLib.setPidGains | ( | self, | |
int | id, | ||
int | prisetNum, | ||
int | gainType, | ||
int | kp, | ||
int | ki, | ||
int | kd, | ||
st = None , |
|||
writeOpt = 0 |
|||
) |
ID、プリセット番号、ゲインタイプを指定し、PIDゲインを変更します。
id | PMXサーボモータのID番号 |
prisetNum | プリセット番号 |
gainType | ゲインタイプ(0:位置制御ゲイン,1:速度制御ゲイン,2:電流制御ゲイン,3:トルク制御ゲイン) |
kp | Pゲイン |
ki | Iゲイン |
kd | Dゲイン |
st | ストレッチゲイン |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setPosition | ( | self, | |
int | id, | ||
int | receiveMode, | ||
int | position, | ||
speed = None , |
|||
current = None , |
|||
torque = None , |
|||
time = None |
|||
) |
指定した ID のモータの位置、速度、電流、トルク、および時間パラメーターを設定し、データをモーター コントローラーに送信します。
id | PMXサーボモータのID番号 |
receiveMode | 応答モード。返ってきたデータを変換するときに使用します。 |
position | 位置パラメータは、モーターの望ましい位置を表す整数です。 |
speed | 速度制御を含む場合、速度値を引数として渡す |
current | 電流制御を含む場合、電流値を引数として渡す |
torque | トルク制御を含む場合、トルク値を引数として渡す |
time | 時間制御を含む場合、補間時間を引数として渡す |
[status,torqueSwitch,rxDataList] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
torqueSwitch | FreeやTorqueOnの値(TorqueSwitchTypeを参照) |
rxDataList | MotorReadで読み取ったデータ[位置,速度,電流,トルク,PWM,モータ温度,CPU温度,電圧](合計8項目) |
def PmxLib_old20240626.PmxLib.setPositionLimit | ( | self, | |
int | id, | ||
int | cwPos, | ||
int | ccwPos, | ||
int | limitPower, | ||
writeOpt = 0 |
|||
) |
指定した ID の最大角を上回った時の挙動を設定します。
id | PMXサーボモータのID番号 |
cwPos | CW方向最大角 |
ccwPos | CCW方向最大角 |
limitPower | 最大角閾値外時の出力%値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setPositionPidGain | ( | self, | |
int | id, | ||
int | kp, | ||
int | ki, | ||
int | kd, | ||
int | st, | ||
writeOpt = 0 |
|||
) |
指定した ID のプリセット1の位置制御のPIDゲインを変更します。
id | PMXサーボモータのID番号 |
kp | 位置制御のPゲイン |
ki | 位置制御のIゲイン |
kd | 位置制御のDゲイン |
st | 位置のストレッチゲイン |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setResponseTime | ( | self, | |
int | id, | ||
int | newResponseTime, | ||
serialNum = None |
|||
) |
指定したIDの応答時間を設定します
サーボ自身がデータを受信してから送信するまでのタイミング(ResponseTime)を変更します
id | PMXサーボモータのID番号 |
newResponseTime | 応答時間[us] |
serialNum | シリアル番号 わからない場合は SystemWRITEで取得するので省略可 |
def PmxLib_old20240626.PmxLib.setSerialParameters | ( | self, | |
int | baudrate, | ||
parity, | |||
int | timeout | ||
) |
「setSerialParameters」関数は、サブクラスでオーバーライドする必要があります。 通信速度、パリティ、タイムアウトでPC等上位側の通信設定を変更する際に使用します。
baudrate | 通信速度 |
parity | パリティ |
timeout | タイムアウト |
def PmxLib_old20240626.PmxLib.setSpeedPidGain | ( | self, | |
int | id, | ||
int | kp, | ||
int | ki, | ||
int | kd, | ||
writeOpt = 0 |
|||
) |
指定した ID のプリセット1の速度制御のPIDゲインを変更します。
id | PMXサーボモータのID番号 |
kp | 速度制御のPゲイン |
ki | 速度制御のIゲイン |
kd | 速度制御のDゲイン |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setTorquePidGain | ( | self, | |
int | id, | ||
int | kp, | ||
int | ki, | ||
int | kd, | ||
writeOpt = 0 |
|||
) |
指定した ID のプリセット1のトルク制御のPIDゲインを変更します。
id | PMXサーボモータのID番号 |
kp | トルク制御のPゲイン |
ki | トルク制御のIゲイン |
kd | トルク制御のDゲイン |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setTorqueSwitch | ( | self, | |
int | id, | ||
int | data, | ||
writeOpt = 0 |
|||
) |
MemWriteを利用したデータのset関数一覧
MemWRITEを試用したトルクスイッチ。 IDで指定したサーボにTorqueON、Free、Brake、Holdを指定することができます
id | PMXサーボモータのID番号 |
data | byte(符号なし1byte)の書きこみデータ |
writeOpt | MemWRITEで使用するオプション 0:通常書き込み、1:TorqueOn中の強制書き込み |
def PmxLib_old20240626.PmxLib.setTotalPowerRate | ( | self, | |
int | id, | ||
int | rate, | ||
writeOpt = 0 |
|||
) |
指定した ID のモータ出力制限%値を設定します。
id | PMXサーボモータのID番号 |
rate | モータ出力制限%値 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.setTrajectory | ( | self, | |
int | id, | ||
int | data, | ||
writeOpt = 0 |
|||
) |
指定した ID の補間制御軌道生成タイプ指定を設定します。
id | PMXサーボモータのID番号 |
data | 補間制御軌道生成タイプ指定 |
writeOpt | TolqueOn状態でも強制的に書き込むか設定します。0:強制書き込みしない、1:強制書き込みする(デフォルトは0) |
def PmxLib_old20240626.PmxLib.synchronize | ( | self, | |
txBuf, | |||
rxLen | |||
) |
「synchronize」関数は、サブクラスでオーバーライドする必要があるプレースホルダーです。 txBufのコマンドを送受信させます。
txBuf | 送信データ |
rxLen | 受信データ数 |
def PmxLib_old20240626.PmxLib.synchronizeNoRead | ( | self, | |
txBuf | |||
) |
「synchronizeNoRead」関数は、サブクラスでオーバーライドする必要があるプレースホルダーです。 ブロードキャストIDなどデータが返ってこない時に使用します。
txBuf | 送信データ |
def PmxLib_old20240626.PmxLib.synchronizeVariableRead | ( | self, | |
txBuf | |||
) |
「synchronizeVariableRead」関数は、サブクラスでオーバーライドする必要があるプレースホルダーです。 受信データ数がわからない場合でも送受信したい場合に使用します。
txBuf | 送信データ |
def PmxLib_old20240626.PmxLib.SystemREAD | ( | self, | |
int | id | ||
) |
SystemREAD 関数は、サーボからシステム情報を読み取ります。
読み取ることができるデータは下記になります。
id | PMXサーボモータのID番号 |
[status,returnData] | |
status | (Uint16) 通信の状態とステータス(送信結果(PmxStatusErrorList参照) + PMXのstatus) |
returnData | SystemREADで取得したすべてのデータを返します。[SerialNum, ModelNum, Version, responsTime] |
def PmxLib_old20240626.PmxLib.SystemWRITE | ( | self, | |
int | id, | ||
serialNum = None , |
|||
newId = None , |
|||
newBaudrateVal = None , |
|||
newParityVal = None , |
|||
newResponseTime = None |
|||
) |
SystemWRITEコマンドを使用してID、ボーレート、パリティ、および応答時間を設定します。
id | PMXサーボモータのID番号 |
serialNum | サーボの固有番号。SystemReadでデータを返します |
newId | サーボに割り当てる新しい ID。 0 ~ 239 の整数値である必要があります。 |
newBaudrateVal | 新しい通信速度設定値。直接書き込む値なので、EditBaudrateの値を使用します |
newParityVal | パリティを変更します。直接値を書き込むので、EditParityの値を使用します |
newResponseTime | コマンドを受け取ってから返信するまでの時間を設定します(us単位で設定します) |