21#ifndef __Pmx_Base_Class_h__
22#define __Pmx_Base_Class_h__
53 constexpr unsigned short SpeedKi = 20;
55 constexpr unsigned short SpeedKd = 24;
58 constexpr unsigned short CurrentKp = 32;
60 constexpr unsigned short CurrentKi = 36;
62 constexpr unsigned short CurrentKd = 40;
65 constexpr unsigned short TorqueKp = 48;
67 constexpr unsigned short TorqueKi = 52;
69 constexpr unsigned short TorqueKd = 56;
72 constexpr unsigned short PositionDeadBand = 64;
74 constexpr unsigned short SpeedDeadBand = 66;
76 constexpr unsigned short CurrentDeadBand = 68;
78 constexpr unsigned short TorqueDeadBand = 70;
81 constexpr unsigned short CenterOffset = 72;
83 constexpr unsigned short CloneReverse = 74;
86 constexpr unsigned short MinVoltageLimit = 76;
88 constexpr unsigned short MinVoltageLimitPower = 78;
90 constexpr unsigned short MaxVoltageLimit = 80;
92 constexpr unsigned short MaxVoltageLimitPower = 82;
94 constexpr unsigned short CurrentLimit = 84;
96 constexpr unsigned short CurrentLimitPower = 86;
98 constexpr unsigned short MotorTempLimit = 88;
100 constexpr unsigned short MotorTempLimitPower = 90;
102 constexpr unsigned short CpuTempLimit = 92;
104 constexpr unsigned short CpuTempLimitPower = 94;
107 constexpr unsigned short CwPositionLimit = 96;
109 constexpr unsigned short CwPositionLimitPower = 98;
111 constexpr unsigned short CcwPositionLimit = 100;
113 constexpr unsigned short CcwPositionLimitPower = 102;
115 constexpr unsigned short MaxGoalSpeed = 104;
117 constexpr unsigned short MaxGoalCurrent = 106;
119 constexpr unsigned short MaxGoalTorque = 108;
121 constexpr unsigned short TotalPowerRate = 110;
123 constexpr unsigned short LockDetectTime = 112;
125 constexpr unsigned short LockThresholdPower = 114;
127 constexpr unsigned short LockDetectOutputPower = 116;
130 constexpr unsigned short NowPosition = 300;
132 constexpr unsigned short NowSpeed = 302;
134 constexpr unsigned short NowCurrent = 304;
136 constexpr unsigned short NowTorque = 306;
138 constexpr unsigned short NowPwm = 308;
140 constexpr unsigned short MotorTemp = 310;
142 constexpr unsigned short CPUTemp = 312;
144 constexpr unsigned short InputVoltage = 314;
146 constexpr unsigned short TrajectoryTime = 316;
148 constexpr unsigned short EncoderValue = 318;
150 constexpr unsigned short EncoderTotalCount = 320;
154 constexpr unsigned short ErrorStatus = 400;
156 constexpr unsigned short ErrorSystem = 401;
158 constexpr unsigned short ErrorMotor = 402;
160 constexpr unsigned short ErrorRamAccess = 404;
164 constexpr unsigned short TorqueSwitch = 500;
166 constexpr unsigned short ControlMode = 501;
168 constexpr unsigned short MotorReceiveData = 502;
170 constexpr unsigned short Trajectory = 503;
172 constexpr unsigned short GoalPosition = 506;
174 constexpr unsigned short GoalSpeed = 508;
176 constexpr unsigned short GoalCurrent = 510;
178 constexpr unsigned short GoalTorque = 512;
180 constexpr unsigned short GoalPwm = 514;
182 constexpr unsigned short GoalTime = 516;
185 constexpr unsigned short CenterOffsetMinRange = 600;
187 constexpr unsigned short CenterOffsetMaxRange = 602;
189 constexpr unsigned short MinVoltageMinRange = 604;
191 constexpr unsigned short MinVoltageMaxRange = 606;
193 constexpr unsigned short MaxVoltageMinRange = 608;
195 constexpr unsigned short MaxVoltageMaxRange = 610;
197 constexpr unsigned short FailSafeVoltageMinRange = 612;
199 constexpr unsigned short FailSafeVoltageMaxRange = 614;
201 constexpr unsigned short CurrentMinRange = 616;
203 constexpr unsigned short CurrentMaxRange = 618;
205 constexpr unsigned short MotorTempMinRange = 620;
207 constexpr unsigned short MotorTempMaxRange = 622;
209 constexpr unsigned short CpuTempMinRange = 624;
211 constexpr unsigned short CpuTempMaxRange = 626;
213 constexpr unsigned short CwPositionMinRange = 628;
215 constexpr unsigned short CwPositionMaxRange = 630;
217 constexpr unsigned short CcwPositionMinRange = 632;
219 constexpr unsigned short CcwPositionMaxRange = 634;
221 constexpr unsigned short MaxGoalSpeedMinRange = 636;
223 constexpr unsigned short MaxGoalSpeedMaxRange = 638;
225 constexpr unsigned short MaxGoalCurrentMinRange = 640;
227 constexpr unsigned short MaxGoalCurrentMaxRange = 642;
229 constexpr unsigned short MaxGoalTorqueMinRange = 644;
231 constexpr unsigned short MaxGoalTorqueMaxRange = 646;
239 namespace ControlMode
246 constexpr byte Position = 0x01;
248 constexpr byte Speed = 0x02;
253 constexpr byte Current = 0x04;
255 constexpr byte PositionCurrent = 0x05;
257 constexpr byte Torque = 0x08;
259 constexpr byte PositionTorque = 0x09;
261 constexpr byte PWM = 0x10;
263 constexpr byte Time = 0x20;
265 constexpr byte PositionTime = 0x21;
271 constexpr byte PositionCurrentTime = 0x25;
276 constexpr byte PositionTorqueTime = 0x29;
280 namespace TrajectoryType
285 constexpr byte Even = 0x01;
288 constexpr byte FifthPoly = 0x05;
291 constexpr byte Error = 0xFF;
298 namespace EditBaudrate
303 constexpr byte _57600 = 0x00;
305 constexpr byte _115200 = 0x01;
307 constexpr byte _625000 = 0x02;
309 constexpr byte _1000000 = 0x03;
311 constexpr byte _1250000 = 0x04;
313 constexpr byte _1500000 = 0x05;
315 constexpr byte _2000000 = 0x06;
317 constexpr byte _3000000 = 0x07;
324 constexpr byte ParityNone = 0x00;
325 constexpr byte Odd = 0x01;
326 constexpr byte Even = 0x02;
327 constexpr byte Error = 0xFF;
335 constexpr byte MemREAD = 0xa0;
338 constexpr byte MemWRITE = 0xa1;
341 constexpr byte LOAD = 0xa2;
344 constexpr byte SAVE = 0xa3;
347 constexpr byte MotorREAD = 0xa4;
350 constexpr byte MotorWRITE = 0xa5;
353 constexpr byte SystemREAD = 0xbb;
356 constexpr byte SystemWRITE = 0xbc;
359 constexpr byte ReBoot = 0xbd;
362 constexpr byte FactoryReset = 0xbe;
365 constexpr byte SystemINIT = 0xbf;
373 constexpr int Header = 0;
374 constexpr int Header1 = 1;
375 constexpr int ID = 2;
376 constexpr int Length = 3;
377 constexpr int CMD = 4;
378 constexpr int Option = 5;
379 constexpr int Status = 5;
380 constexpr int Data = 6;
381 constexpr int ACK = 6;
391 namespace ReceiveDataOption
393 constexpr byte NoReturn = 0x00;
394 constexpr byte Position = 0x01;
395 constexpr byte Speed = 0x02;
396 constexpr byte Current = 0x04;
397 constexpr byte Torque = 0x08;
398 constexpr byte Pwm = 0x10;
399 constexpr byte MotorTemp = 0x20;
400 constexpr byte CpuTemp = 0x40;
401 constexpr byte Voltage = 0x80;
402 constexpr byte Full = 0xFF;
417 constexpr unsigned short OK = 0;
419 constexpr unsigned short TimeOut = 0xFF00;
421 constexpr unsigned short CrcError = 0xFE00;
423 constexpr unsigned short FormatError = 0xFD00;
425 constexpr unsigned short SendError = 0xFC00;
427 constexpr unsigned short ReceiveError = 0xFB00;
429 constexpr unsigned short MotorREADConvertError = 0xFA00;
437 constexpr unsigned short NG = 0xFA00;
440 constexpr unsigned short ErrorMask = 0xFF00;
444 namespace MinimumLength
449 constexpr byte Send = 8;
452 constexpr byte Receive = 8;
455 namespace PmxStatusErrorList
459 constexpr byte SystemError = 0x01;
460 constexpr byte MotorError = 0x02;
461 constexpr byte CommunicationError = 0x04;
462 constexpr byte CommandError = 0x08;
463 constexpr byte RamAccessError = 0x10;
464 constexpr byte ModeError = 0x20;
465 constexpr byte DataError = 0x40;
469 namespace TorqueSwitchType
474 constexpr byte Control = 0x00;
477 constexpr byte TorqueOn = 0x01;
479 constexpr byte Free = 0x02;
481 constexpr byte Brake = 0x04;
483 constexpr byte Hold = 0x08;
485 constexpr byte Mask = 0x0F;
492 constexpr byte Error = 0xFF;
495 namespace CloneReverseType
500 constexpr byte Clone = 0x01;
502 constexpr byte Reverse = 0x02;
510 static constexpr int Version = 1000;
525 virtual bool synchronize(
byte txBuf[],
byte txLen,
byte rxBuf[],
byte rxLen);
526 virtual bool synchronizeVariableRead(
byte *txBuf,
byte txLen,
byte *rxBuf,
byte *rxLen);
531 virtual void setLogSerial(HardwareSerial *logSerial);
536 virtual HardwareSerial *getLogSerial();
537 virtual void logOutputPrint(
byte outputBytes[],
int outputLength);
543 unsigned short MemREAD(
byte id,
unsigned short addr,
int readDataSize,
byte rxData[]);
544 unsigned short MemREADToByte(
byte id,
unsigned short addr ,
byte *byteData);
545 unsigned short MemREADToInt16(
byte id,
unsigned short addr ,
short *int16Data);
546 unsigned short MemREADToUint16(
byte id,
unsigned short addr ,
unsigned short *uint16Data);
547 unsigned short MemREADToInt32(
byte id,
unsigned short addr ,
long *int32Data);
548 unsigned short MemREADToUint32(
byte id,
unsigned short addr ,
unsigned long *uint32Data);
550 unsigned short MemWRITE(
byte id,
unsigned short addr,
byte txDataArray[],
int txDataSize,
byte writeOpt=0);
551 unsigned short MemWRITEToByte(
byte id,
unsigned short addr,
byte byteData,
byte writeOpt=0);
552 unsigned short MemWRITEToInt16(
byte id,
unsigned short addr,
short int16Data,
byte writeOpt=0);
553 unsigned short MemWRITEToUint16(
byte id,
unsigned short addr,
unsigned short uint16Data,
byte writeOpt=0);
554 unsigned short MemWRITEToInt32(
byte id,
unsigned short addr,
long int32Data,
byte writeOpt=0);
555 unsigned short MemWRITEToUint32(
byte id,
unsigned short addr,
unsigned long uint32Data,
byte writeOpt=0);
558 unsigned short MotorREAD(
byte id,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01,
byte *torqueSw =
nullptr);
560 unsigned short MotorWRITE(
byte id,
byte toruqeOnSw);
561 unsigned short MotorWRITE(
byte id,
byte toruqeOnSw,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01);
562 unsigned short MotorWRITE(
byte id,
long writeDatas[],
int writeDataCount);
563 unsigned short MotorWRITE(
byte id,
long writeDatas[],
int writeDataCount,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01);
566 unsigned short MotorWRITESingle(
byte id,
long targetVal,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01);
568 unsigned short MotorWRITEDouble(
byte id,
long targetVal1,
long targetVal2,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01);
569 unsigned short MotorWRITETriple(
byte id,
long targetVal1,
long targetVal2,
long targetVal3);
570 unsigned short MotorWRITETriple(
byte id,
long targetVal1,
long targetVal2,
long targetVal3,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01);
574 unsigned short LOAD(
byte id);
575 unsigned short SAVE(
byte id);
576 unsigned short SystemREAD(
byte id,
byte rxData[]);
581 unsigned short getModelNum(
byte id,
unsigned long *modelFullNum);
582 unsigned short getModelNum(
byte id,
unsigned short *modelNum,
unsigned short *seriesNum);
583 unsigned short getVersion(
byte id,
byte verData[4]);
586 unsigned short SystemWRITE(
byte id,
byte serialNum[4],
byte option,
byte newId,
byte newBaudrateVal,
byte newParityVal,
byte newResponseTime);
587 unsigned short SystemWRITE(
byte id,
unsigned long serialNum,
byte option,
byte newId,
byte newBaudrateVal,
byte newParityVal,
byte newResponseTime);
588 unsigned short SystemWRITE(
byte id,
byte option,
byte newId,
byte newBaudrateVal,
byte newParityVal,
byte newResponseTime);
591 unsigned short setId(
byte id,
byte newId);
592 unsigned short setBaudrate(
byte id,
byte newBaudRate);
593 unsigned short setParity(
byte id,
byte newParityNum);
596 unsigned short ReBoot(
byte id,
int resetTime = 0);
597 unsigned short FactoryReset(
byte id,
byte serialNum[4] = NULL);
604 unsigned short getPositionGain(
byte id,
unsigned long *kpdata,
unsigned long *kidata,
unsigned long *kddata);
609 unsigned short getSpeedGain(
byte id,
unsigned long *kpdata,
unsigned long *kidata,
unsigned long *kddata);
613 unsigned short getCurrentGain(
byte id,
unsigned long *kpdata,
unsigned long *kidata,
unsigned long *kddata);
617 unsigned short getTorqueGain(
byte id,
unsigned long *kpdata,
unsigned long *kidata,
unsigned long *kddata);
644 unsigned short getPosition(
byte id,
short *posData);
645 unsigned short getPosition(
byte id,
unsigned short *posData);
646 unsigned short getPosition(
byte id,
long *posData,
byte controlMode = 0x01);
647 unsigned short getSpeed(
byte id,
short *spdData);
648 unsigned short getCurrent(
byte id,
short *curData);
649 unsigned short getTorque(
byte id,
short *trqData);
650 unsigned short getPwm(
byte id,
short *pwmData);
651 unsigned short getMotorTemp(
byte id,
short *motTempData);
652 unsigned short getCPUTemp(
byte id,
short *cpuTempData);
655 unsigned short getEncoder(
byte id,
unsigned short *encData);
658 unsigned short getStatus(
byte id,
byte *stData);
662 unsigned short getFullStatus(
byte id,
byte *sysSt,
byte *motorSt,
unsigned short *ramSt);
699 unsigned short setPositionGain(
byte id,
unsigned long kpdata,
unsigned long kidata,
unsigned long kddata,
byte writeOpt=0);
701 unsigned short setSpeedKpGain(
byte id,
unsigned long data,
byte writeOpt=0);
702 unsigned short setSpeedKiGain(
byte id,
unsigned long data,
byte writeOpt=0);
703 unsigned short setSpeedKdGain(
byte id,
unsigned long data,
byte writeOpt=0);
704 unsigned short setSpeedGain(
byte id,
unsigned long kpdata,
unsigned long kidata,
unsigned long kddata,
byte writeOpt=0);
705 unsigned short setCurrentKpGain(
byte id,
unsigned long data,
byte writeOpt=0);
706 unsigned short setCurrentKiGain(
byte id,
unsigned long data,
byte writeOpt=0);
707 unsigned short setCurrentKdGain(
byte id,
unsigned long data,
byte writeOpt=0);
708 unsigned short setCurrentGain(
byte id,
unsigned long kpdata,
unsigned long kidata,
unsigned long kddata,
byte writeOpt=0);
709 unsigned short setTorqueKpGain(
byte id,
unsigned long data,
byte writeOpt=0);
710 unsigned short setTorqueKiGain(
byte id,
unsigned long data,
byte writeOpt=0);
711 unsigned short setTorqueKdGain(
byte id,
unsigned long data,
byte writeOpt=0);
712 unsigned short setTorqueGain(
byte id,
unsigned long kpdata,
unsigned long kidata,
unsigned long kddata,
byte writeOpt=0);
715 unsigned short setMinVoltageLimit(
byte id,
unsigned short minVol,
unsigned short limPower ,
byte writeOpt=0);
716 unsigned short setMaxVoltageLimit(
byte id,
unsigned short maxVol,
unsigned short limPower ,
byte writeOpt=0);
717 unsigned short setCurrentLimit(
byte id,
short maxCur,
unsigned short limPower ,
byte writeOpt=0);
718 unsigned short setMotorTempLimit(
byte id,
short motorTemp,
unsigned short limPower ,
byte writeOpt=0);
719 unsigned short setCpuTempLimit(
byte id,
short cpuTemp,
unsigned short limPower ,
byte writeOpt=0);
720 unsigned short setPositionLimit(
byte id,
short cwPos,
short ccwPos,
unsigned short limPower ,
byte writeOpt=0);
721 unsigned short setMaxGoalSpeed(
byte id,
short maxGoalSpd,
byte writeOpt=0);
723 unsigned short setMaxGoalTorque(
byte id,
short maxGoalTrq,
byte writeOpt=0);
725 unsigned short setLockDetect(
byte id,
unsigned short time,
unsigned short power,
unsigned short outputPower,
byte writeOpt=0);
728 unsigned short setControlMode(
byte id,
byte controlMode,
byte writeOpt=0);
729 unsigned short setMotorReceive(
byte id,
byte receiveMode,
byte writeOpt=0);
730 unsigned short setTrajectory(
byte id,
byte trajecrotyData,
byte writeOpt=0);
734 unsigned short setMotorTorqueOn(
byte id,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01);
736 unsigned short setMotorFree(
byte id,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01);
738 unsigned short setMotorBrake(
byte id,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01);
740 unsigned short setMotorHold(
byte id,
byte receiveMode,
long receiveData[8],
byte controlMode=0x01);
742 unsigned short setPosition(
byte id,
short pos,
byte receiveMode,
long receiveData[8]);
747 bool defaultMakeCmd(
byte id,
byte cmd,
byte txData[],
byte *txDataSize ,
byte header=0xfe);
749 unsigned short checkRecv(
byte rxBuff[],
byte cmd,
byte header=0xfe);
753 static bool __convReceiveMotorData(
byte receiveMode,
byte returnDataBytes[],
byte receiveBytesSize,
long reData[],
byte controlMode=0x01);
Definition: PmxBaseClass.h:509
unsigned short getSpeedKdGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1884
unsigned short getCurrentLimitRange(byte id, unsigned short *minData, unsigned short *maxData)
Definition: PmxBaseClass.cpp:2875
unsigned short setControlMode(byte id, byte controlMode, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3738
unsigned short setSpeedKdGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3287
unsigned short getControlMode(byte id, byte *controlMode)
指定した ID の制御モードを取得します。
Definition: PmxBaseClass.cpp:2729
unsigned short getResponseTime(byte id, byte *respTime)
Definition: PmxBaseClass.cpp:1440
unsigned short MotorWRITETriple(byte id, long targetVal1, long targetVal2, long targetVal3)
Definition: PmxBaseClass.cpp:1178
unsigned short getCwPositionLimitRange(byte id, short *minData, short *maxData)
Definition: PmxBaseClass.cpp:2980
unsigned short getTorqueKpGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:2019
unsigned short getFullStatus(byte id, byte *sysSt, byte *motorSt, unsigned short *ramSt)
Definition: PmxBaseClass.cpp:2674
unsigned short getInputVoltage(byte id, unsigned short *volData)
指定された ID の現在の電圧を取得します。
Definition: PmxBaseClass.cpp:2570
unsigned short MemWRITEToUint32(byte id, unsigned short addr, unsigned long uint32Data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:425
unsigned short setTorqueKiGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3442
unsigned short getSpeedKiGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1872
unsigned short checkRecv(byte rxBuff[], byte cmd, byte header=0xfe)
Definition: PmxBaseClass.cpp:28
unsigned short setPositionKpGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3156
unsigned short getCurrentLimitPower(byte id, unsigned short *data)
指定したIDの電流リミットを超えた時の出力割合を取得します。
Definition: PmxBaseClass.cpp:2201
unsigned short setPositionStretchGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3240
unsigned short getCpuTempLimitPower(byte id, unsigned short *data)
指定したIDのCPU温度リミットを超えた時の出力割合を取得します。
Definition: PmxBaseClass.cpp:2257
unsigned short getMaxGoalCurrentRange(byte id, short *minData, short *maxData)
Definition: PmxBaseClass.cpp:3081
unsigned short getSystemStatus(byte id, byte *sysStaData)
指定された ID のシステムステータスを取得します。
Definition: PmxBaseClass.cpp:2628
unsigned short getMotorTemp(byte id, short *motTempData)
指定したIDの現在のモータ温度を取得します。
Definition: PmxBaseClass.cpp:2542
unsigned short getLockDetectOutputPower(byte id, unsigned short *data)
指定したIDがロック検知が起きた時の出力の割合を取得します。
Definition: PmxBaseClass.cpp:2411
unsigned short setMotorFree(byte id)
Definition: PmxBaseClass.cpp:3812
unsigned short getSerialNumber(byte id, unsigned long *serialLongNum)
SystemREAD 関数は、サーボからシステム情報を読み取ります。
Definition: PmxBaseClass.cpp:1281
unsigned short getSpeedGain(byte id, unsigned long *kpdata, unsigned long *kidata, unsigned long *kddata)
Definition: PmxBaseClass.cpp:1898
unsigned short setPositionKdGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3188
unsigned short getRamAccessStatus(byte id, unsigned short *ramStaData)
指定された ID のRAMアクセスステータスを取得します。
Definition: PmxBaseClass.cpp:2658
unsigned short MemWRITEToInt16(byte id, unsigned short addr, short int16Data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:362
unsigned short getMotorStatus(byte id, byte *motStaData)
指定したIDのモータステータスを取得します。
Definition: PmxBaseClass.cpp:2643
unsigned short getCenterOffset(byte id, short *offsetData)
指定した ID の中央値オフセット値を取得します。
Definition: PmxBaseClass.cpp:2103
unsigned short getCurrentKdGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1964
unsigned short MemWRITEToInt32(byte id, unsigned short addr, long int32Data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:404
unsigned short getCenterOffsetRange(byte id, short *minData, short *maxData)
Definition: PmxBaseClass.cpp:2773
unsigned short getCurrentKiGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1952
unsigned short getMaxGoalCurrent(byte id, short *data)
指定したIDの指令可能な最大電流値を取得します。
Definition: PmxBaseClass.cpp:2341
unsigned short MemREADToUint16(byte id, unsigned short addr, unsigned short *uint16Data)
Definition: PmxBaseClass.cpp:191
unsigned short getMaxGoalTorque(byte id, short *data)
指定したIDの指令可能な最大推定トルク値を取得します。
Definition: PmxBaseClass.cpp:2355
unsigned short setPositionGain(byte id, unsigned long kpdata, unsigned long kidata, unsigned long kddata, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3205
unsigned short getMotorReceive(byte id, byte *receiveMode)
指定した ID の応答データ指定値を取得します。
Definition: PmxBaseClass.cpp:2743
unsigned short getTorqueKdGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:2047
static bool __convReceiveMotorData(byte receiveMode, byte returnDataBytes[], byte receiveBytesSize, long reData[], byte controlMode=0x01)
Definition: PmxBaseClass.cpp:680
unsigned short setTrajectory(byte id, byte trajecrotyData, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3767
unsigned short getMotorTempLimitPower(byte id, unsigned short *data)
指定したIDのモータ温度リミットを超えた時の出力割合を取得します。
Definition: PmxBaseClass.cpp:2229
unsigned short getTorqueKiGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:2033
unsigned short setMaxGoalCurrent(byte id, short maxGoalCur, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3673
unsigned short MotorWRITESingle(byte id, long targetVal)
Definition: PmxBaseClass.cpp:1111
unsigned short setMotorHold(byte id)
Definition: PmxBaseClass.cpp:3870
unsigned short setSpeedGain(byte id, unsigned long kpdata, unsigned long kidata, unsigned long kddata, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3305
unsigned short getLockThresholdPower(byte id, unsigned short *data)
指定したIDのロック検知を開始する出力指示の閾値を取得します。
Definition: PmxBaseClass.cpp:2397
unsigned short setBaudrate(byte id, byte newBaudRate)
Definition: PmxBaseClass.cpp:1603
unsigned short setMotorTorqueOn(byte id)
Definition: PmxBaseClass.cpp:3785
unsigned short getMinVoltageLimitRange(byte id, unsigned short *minData, unsigned short *maxData)
Definition: PmxBaseClass.cpp:2808
unsigned short getCurrent(byte id, short *curData)
指定した ID の現在の電流を取得します。
Definition: PmxBaseClass.cpp:2500
unsigned short getTotalPowerRate(byte id, unsigned short *data)
指定したIDのモータに出力する割合を取得します。
Definition: PmxBaseClass.cpp:2369
unsigned short resetFullStatus(byte id)
指定された ID の全てのステータス情報をリセットします。
Definition: PmxBaseClass.cpp:2698
unsigned short setCurrentGain(byte id, unsigned long kpdata, unsigned long kidata, unsigned long kddata, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3390
unsigned short setResponseTime(byte id, byte respTime)
Definition: PmxBaseClass.cpp:1635
unsigned short getCpuTempLimitRange(byte id, short *minData, short *maxData)
Definition: PmxBaseClass.cpp:2944
unsigned short getMaxVoltageLimitPower(byte id, unsigned short *data)
指定したIDの上限リミット電圧を超えた場合の出力割合を取得します。
Definition: PmxBaseClass.cpp:2173
unsigned short SystemREAD(byte id, byte rxData[])
Definition: PmxBaseClass.cpp:1213
unsigned short setSpeedKpGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3255
unsigned short LOAD(byte id)
Definition: PmxBaseClass.cpp:442
unsigned short getPositionStretchGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1846
unsigned short setMotorReceive(byte id, byte receiveMode, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3752
unsigned short getLockDetectTime(byte id, unsigned short *data)
指定したIDのロック検知を認識するまでの時間を取得します。
Definition: PmxBaseClass.cpp:2383
unsigned short setPositionLimit(byte id, short cwPos, short ccwPos, unsigned short limPower, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3639
unsigned short setPosition(byte id, short pos)
Definition: PmxBaseClass.cpp:3899
unsigned short setMotorBrake(byte id)
Definition: PmxBaseClass.cpp:3841
unsigned short getMotorTempLimit(byte id, unsigned short *data)
指定したIDのモータ温度リミット値を取得します。
Definition: PmxBaseClass.cpp:2215
unsigned short MemWRITEToByte(byte id, unsigned short addr, byte byteData, byte writeOpt=0)
Definition: PmxBaseClass.cpp:343
unsigned short getMinVoltageLimit(byte id, unsigned short *data)
指定したIDの下限電圧リミット値を取得します。
Definition: PmxBaseClass.cpp:2131
unsigned short setCurrentLimit(byte id, short maxCur, unsigned short limPower, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3577
unsigned short setMotorTempLimit(byte id, short motorTemp, unsigned short limPower, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3597
unsigned short setMaxGoalSpeed(byte id, short maxGoalSpd, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3659
unsigned short MotorREAD(byte id, byte receiveMode, long receiveData[8], byte controlMode=0x01, byte *torqueSw=nullptr)
Definition: PmxBaseClass.cpp:548
unsigned short getCPUTemp(byte id, short *cpuTempData)
指定された ID の現在のCPU温度を取得します。
Definition: PmxBaseClass.cpp:2556
unsigned short MotorWRITEDouble(byte id, long targetVal1, long targetVal2)
Definition: PmxBaseClass.cpp:1145
unsigned short MemREADToInt32(byte id, unsigned short addr, long *int32Data)
Definition: PmxBaseClass.cpp:217
unsigned short getCurrentLimit(byte id, unsigned short *data)
指定したIDの電流リミット値を取得します。
Definition: PmxBaseClass.cpp:2187
static unsigned int __byteCounter(byte val)
Definition: PmxBaseClass.cpp:648
unsigned short getCloneReverse(byte id, byte *data)
指定した ID のクローン/リバース値を取得します。
Definition: PmxBaseClass.cpp:2117
unsigned short getMotorTempLimitRange(byte id, short *minData, short *maxData)
Definition: PmxBaseClass.cpp:2909
unsigned short setMinVoltageLimit(byte id, unsigned short minVol, unsigned short limPower, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3537
unsigned short getCwPositionLimit(byte id, short *data)
指定したIDのCW方向の動作角度リミット値を取得します。
Definition: PmxBaseClass.cpp:2271
unsigned short setCpuTempLimit(byte id, short cpuTemp, unsigned short limPower, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3617
unsigned short setMaxGoalTorque(byte id, short maxGoalTrq, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3687
unsigned short setTorqueGain(byte id, unsigned long kpdata, unsigned long kidata, unsigned long kddata, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3476
unsigned short getPositionKiGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1780
unsigned short setTorqueKdGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3458
unsigned short getTorqueGain(byte id, unsigned long *kpdata, unsigned long *kidata, unsigned long *kddata)
Definition: PmxBaseClass.cpp:2062
unsigned short getStatus(byte id, byte *stData)
指定したIDのステータスを取得します。
Definition: PmxBaseClass.cpp:2613
unsigned short setMaxVoltageLimit(byte id, unsigned short maxVol, unsigned short limPower, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3557
unsigned short setSpeedKiGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3271
unsigned short getCurrentKpGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1940
unsigned short getMaxVoltageLimit(byte id, unsigned short *data)
指定したIDの上限リミット電圧を取得します。
Definition: PmxBaseClass.cpp:2159
unsigned short setId(byte id, byte newId)
Definition: PmxBaseClass.cpp:1586
unsigned short getCcwPositionLimitPower(byte id, unsigned short *data)
指定したIDのCCW側の角度を超えた時の出力の割合を取得します。
Definition: PmxBaseClass.cpp:2313
unsigned short MemREADToInt16(byte id, unsigned short addr, short *int16Data)
Definition: PmxBaseClass.cpp:166
unsigned short getPwm(byte id, short *pwmData)
指定したIDの現在PWMを取得します。
Definition: PmxBaseClass.cpp:2528
unsigned short getCurrentGain(byte id, unsigned long *kpdata, unsigned long *kidata, unsigned long *kddata)
Definition: PmxBaseClass.cpp:1978
unsigned short getMinVoltageLimitPower(byte id, unsigned short *data)
指定したIDの下限リミット電圧を下回った場合の出力割合を取得します。
Definition: PmxBaseClass.cpp:2145
unsigned short getVersion(byte id, byte verData[4])
Definition: PmxBaseClass.cpp:1407
unsigned short getPositionGain(byte id, unsigned long *kpdata, unsigned long *kidata, unsigned long *kddata)
Definition: PmxBaseClass.cpp:1807
unsigned short getModelNum(byte id, unsigned long *modelFullNum)
Definition: PmxBaseClass.cpp:1336
unsigned short getSpeed(byte id, short *spdData)
指定した ID の現在の速度を取得します。
Definition: PmxBaseClass.cpp:2486
unsigned short MemWRITE(byte id, unsigned short addr, byte txDataArray[], int txDataSize, byte writeOpt=0)
Definition: PmxBaseClass.cpp:271
unsigned short FactoryReset(byte id, byte serialNum[4]=NULL)
Definition: PmxBaseClass.cpp:1708
unsigned short getSpeedKpGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1859
unsigned short setTotalPowerRate(byte id, unsigned short rate, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3701
unsigned short getCcwPositionLimitRange(byte id, short *minData, short *maxData)
Definition: PmxBaseClass.cpp:3014
unsigned short getCcwPositionLimit(byte id, short *data)
指定したIDのCCW方向の動作角度リミット値を取得します。
Definition: PmxBaseClass.cpp:2299
unsigned short getPosition(byte id, short *posData)
指定したIDの現在指示位置を取得します。
Definition: PmxBaseClass.cpp:2425
unsigned short getPositionKpGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1768
unsigned short setCurrentKpGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3340
unsigned short MemREADToByte(byte id, unsigned short addr, byte *byteData)
Definition: PmxBaseClass.cpp:144
unsigned short getMaxGoalTorqueRange(byte id, short *minData, short *maxData)
Definition: PmxBaseClass.cpp:3116
unsigned short getMaxGoalSpeedRange(byte id, short *minData, short *maxData)
Definition: PmxBaseClass.cpp:3047
unsigned short setTorqueKpGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3426
unsigned short getMaxGoalSpeed(byte id, short *data)
指定したIDの指令可能な最大速度値を取得します。
Definition: PmxBaseClass.cpp:2327
unsigned short getCpuTempLimit(byte id, unsigned short *data)
指定したIDのCPU温度リミット値を取得します。
Definition: PmxBaseClass.cpp:2243
unsigned short getMaxVoltageLimitRange(byte id, unsigned short *minData, unsigned short *maxData)
Definition: PmxBaseClass.cpp:2842
unsigned short getCwPositionLimitPower(byte id, unsigned short *data)
指定したIDのCW側の角度を超えた時の出力の割合を取得します。
Definition: PmxBaseClass.cpp:2285
unsigned short getEncoder(byte id, unsigned short *encData)
指定された ID のエンコーダを取得します。
Definition: PmxBaseClass.cpp:2598
unsigned short setParity(byte id, byte newParityNum)
Definition: PmxBaseClass.cpp:1619
unsigned short setCenterOffset(byte id, short offsetData)
Definition: PmxBaseClass.cpp:3509
unsigned short getTorque(byte id, short *trqData)
指定した ID の現在のトルクを取得します。
Definition: PmxBaseClass.cpp:2514
unsigned short MemWRITEToUint16(byte id, unsigned short addr, unsigned short uint16Data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:383
unsigned short setCurrentKiGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3356
unsigned short setCurrentKdGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3372
unsigned short getTorqueSwitch(byte id, byte *trqSwitchData)
指定した ID のトルク ON 値を取得します。
Definition: PmxBaseClass.cpp:2714
unsigned short MemREAD(byte id, unsigned short addr, int readDataSize, byte rxData[])
Definition: PmxBaseClass.cpp:68
unsigned short getTrajectory(byte id, byte *traData)
指定した ID の補間制御軌道生成タイプ指定を取得します。
Definition: PmxBaseClass.cpp:2757
unsigned short setLockDetect(byte id, unsigned short time, unsigned short power, unsigned short outputPower, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3718
unsigned short SAVE(byte id)
Definition: PmxBaseClass.cpp:493
unsigned short setPositionKiGain(byte id, unsigned long data, byte writeOpt=0)
Definition: PmxBaseClass.cpp:3172
unsigned short getPositionKdGain(byte id, unsigned long *data)
Definition: PmxBaseClass.cpp:1792
unsigned short MotorWRITE(byte id, byte toruqeOnSw)
Definition: PmxBaseClass.cpp:802
unsigned short ReBoot(byte id, int resetTime=0)
Definition: PmxBaseClass.cpp:1654
unsigned short setCloneReverse(byte id, byte data)
Definition: PmxBaseClass.cpp:3522
unsigned short getTrajectoryTime(byte id, unsigned short *traTimeData)
指定された ID の現在の補間時間を取得します。
Definition: PmxBaseClass.cpp:2584
unsigned short MemREADToUint32(byte id, unsigned short addr, unsigned long *uint32Data)
Definition: PmxBaseClass.cpp:242
constexpr unsigned short SpeedKp
速度制御のPゲイン
Definition: PmxBaseClass.h:51
constexpr unsigned short PositionKp
位置制御のPゲイン
Definition: PmxBaseClass.h:42
constexpr unsigned short PositionSt
位置制御のストレッチ
Definition: PmxBaseClass.h:48
constexpr unsigned short PositionKd
位置制御のDゲイン
Definition: PmxBaseClass.h:46
constexpr unsigned short PositionKi
位置制御のIゲイン
Definition: PmxBaseClass.h:44
PMXの固有値の定義
Definition: PmxBaseClass.h:29
static constexpr unsigned long ErrorUint32Data
byte型のエラー値の定義
Definition: PmxBaseClass.h:33
static constexpr byte ErrorByteData
byte型のエラー値の定義
Definition: PmxBaseClass.h:31
static constexpr unsigned short ErrorUint16Data
byte型のエラー値の定義
Definition: PmxBaseClass.h:32