001/* 002 * Copyright (C) Cross The Road Electronics. All rights reserved. 003 * License information can be found in CTRE_LICENSE.txt 004 * For support and suggestions contact support@ctr-electronics.com or file 005 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases 006 */ 007package com.ctre.phoenix6.hardware.traits; 008 009import com.ctre.phoenix6.StatusCode; 010import com.ctre.phoenix6.controls.*; 011import com.ctre.phoenix6.controls.compound.*; 012import com.ctre.phoenix6.*; 013 014/** 015 * Requires Phoenix Pro; Contains all FOC-exclusive control functions available 016 * for devices that support FOC. 017 */ 018public interface SupportsFOC extends CommonDevice 019{ 020 021 /** 022 * Trips if a major mechanical or ESD event caused a brief loss of 023 * position data triggering a recovery while not in motion. If the 024 * event occurs often, inspect for excess axial force or sources of 025 * ESD at the rotor. 026 * 027 * <ul> 028 * <li> <b>Default Value:</b> False 029 * </ul> 030 * <p> 031 * This refreshes and returns a cached StatusSignal object. 032 * 033 * @return Fault_RotorFault1 Status Signal Object 034 */ 035 StatusSignal<Boolean> getFault_RotorFault1(); 036 037 /** 038 * Trips if a major mechanical or ESD event caused a brief loss of 039 * position data triggering a recovery while not in motion. If the 040 * event occurs often, inspect for excess axial force or sources of 041 * ESD at the rotor. 042 * 043 * <ul> 044 * <li> <b>Default Value:</b> False 045 * </ul> 046 * <p> 047 * This refreshes and returns a cached StatusSignal object. 048 * 049 * @param refresh Whether to refresh the StatusSignal before returning it; 050 * defaults to true 051 * @return Fault_RotorFault1 Status Signal Object 052 */ 053 StatusSignal<Boolean> getFault_RotorFault1(boolean refresh); 054 055 /** 056 * Trips if a major mechanical or ESD event caused a brief loss of 057 * position data triggering a recovery while not in motion. If the 058 * event occurs often, inspect for excess axial force or sources of 059 * ESD at the rotor. 060 * 061 * <ul> 062 * <li> <b>Default Value:</b> False 063 * </ul> 064 * <p> 065 * This refreshes and returns a cached StatusSignal object. 066 * 067 * @return StickyFault_RotorFault1 Status Signal Object 068 */ 069 StatusSignal<Boolean> getStickyFault_RotorFault1(); 070 071 /** 072 * Trips if a major mechanical or ESD event caused a brief loss of 073 * position data triggering a recovery while not in motion. If the 074 * event occurs often, inspect for excess axial force or sources of 075 * ESD at the rotor. 076 * 077 * <ul> 078 * <li> <b>Default Value:</b> False 079 * </ul> 080 * <p> 081 * This refreshes and returns a cached StatusSignal object. 082 * 083 * @param refresh Whether to refresh the StatusSignal before returning it; 084 * defaults to true 085 * @return StickyFault_RotorFault1 Status Signal Object 086 */ 087 StatusSignal<Boolean> getStickyFault_RotorFault1(boolean refresh); 088 089 /** 090 * Trips if a major mechanical or ESD event caused a brief loss of 091 * position data triggering a recovery while in motion. If the event 092 * occurs often, inspect for excess axial force or sources of ESD at 093 * the rotor. 094 * 095 * <ul> 096 * <li> <b>Default Value:</b> False 097 * </ul> 098 * <p> 099 * This refreshes and returns a cached StatusSignal object. 100 * 101 * @return Fault_RotorFault2 Status Signal Object 102 */ 103 StatusSignal<Boolean> getFault_RotorFault2(); 104 105 /** 106 * Trips if a major mechanical or ESD event caused a brief loss of 107 * position data triggering a recovery while in motion. If the event 108 * occurs often, inspect for excess axial force or sources of ESD at 109 * the rotor. 110 * 111 * <ul> 112 * <li> <b>Default Value:</b> False 113 * </ul> 114 * <p> 115 * This refreshes and returns a cached StatusSignal object. 116 * 117 * @param refresh Whether to refresh the StatusSignal before returning it; 118 * defaults to true 119 * @return Fault_RotorFault2 Status Signal Object 120 */ 121 StatusSignal<Boolean> getFault_RotorFault2(boolean refresh); 122 123 /** 124 * Trips if a major mechanical or ESD event caused a brief loss of 125 * position data triggering a recovery while in motion. If the event 126 * occurs often, inspect for excess axial force or sources of ESD at 127 * the rotor. 128 * 129 * <ul> 130 * <li> <b>Default Value:</b> False 131 * </ul> 132 * <p> 133 * This refreshes and returns a cached StatusSignal object. 134 * 135 * @return StickyFault_RotorFault2 Status Signal Object 136 */ 137 StatusSignal<Boolean> getStickyFault_RotorFault2(); 138 139 /** 140 * Trips if a major mechanical or ESD event caused a brief loss of 141 * position data triggering a recovery while in motion. If the event 142 * occurs often, inspect for excess axial force or sources of ESD at 143 * the rotor. 144 * 145 * <ul> 146 * <li> <b>Default Value:</b> False 147 * </ul> 148 * <p> 149 * This refreshes and returns a cached StatusSignal object. 150 * 151 * @param refresh Whether to refresh the StatusSignal before returning it; 152 * defaults to true 153 * @return StickyFault_RotorFault2 Status Signal Object 154 */ 155 StatusSignal<Boolean> getStickyFault_RotorFault2(boolean refresh); 156 157 /** 158 * Request a specified motor current (field oriented control). 159 * <p> 160 * This control request will drive the motor to the requested motor 161 * (stator) current value. This leverages field oriented control 162 * (FOC), which means greater peak power than what is documented. 163 * This scales to torque based on Motor's kT constant. 164 * <ul> 165 * <li> <b>TorqueCurrentFOC Parameters:</b> 166 * <ul> 167 * <li> <b>Output:</b> Amount of motor current in Amperes 168 * <li> <b>MaxAbsDutyCycle:</b> The maximum absolute motor output that can 169 * be applied, which effectively limits the 170 * velocity. For example, 0.50 means no more 171 * than 50% output in either direction. This 172 * is useful for preventing the motor from 173 * spinning to its terminal velocity when there 174 * is no external torque applied unto the 175 * rotor. Note this is absolute maximum, so 176 * the value should be between zero and one. 177 * <li> <b>Deadband:</b> Deadband in Amperes. If torque request is within 178 * deadband, the bridge output is neutral. If deadband 179 * is set to zero then there is effectively no 180 * deadband. Note if deadband is zero, a free spinning 181 * motor will spin for quite a while as the firmware 182 * attempts to hold the motor's bemf. If user expects 183 * motor to cease spinning quickly with a demand of 184 * zero, we recommend a deadband of one Ampere. This 185 * value will be converted to an integral value of 186 * amps. 187 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 188 * output is zero (or within deadband). 189 * Set to false to use the NeutralMode 190 * configuration setting (default). 191 * This flag exists to provide the 192 * fundamental behavior of this control 193 * when output is zero, which is to 194 * provide 0A (zero torque). 195 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. 196 * This allows users to use other limit 197 * switch sensors connected to robot 198 * controller. This also allows use of 199 * active sensors that require external 200 * power. 201 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. 202 * This allows users to use other limit 203 * switch sensors connected to robot 204 * controller. This also allows use of 205 * active sensors that require external 206 * power. 207 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 208 * switches and the LimitForwardMotion and 209 * LimitReverseMotion parameters, instead 210 * allowing motion. 211 * <p> 212 * This can be useful on mechanisms such 213 * as an intake/feeder, where a limit 214 * switch stops motion while intaking but 215 * should be ignored when feeding to a 216 * shooter. 217 * <p> 218 * The hardware limit faults and 219 * Forward/ReverseLimit signals will still 220 * report the values of the limit switches 221 * regardless of this parameter. 222 * <li> <b>IgnoreSoftwareLimits:</b> Set to true to ignore software limits, 223 * instead allowing motion. 224 * <p> 225 * This can be useful when calibrating the 226 * zero point of a mechanism such as an 227 * elevator. 228 * <p> 229 * The software limit faults will still 230 * report the values of the software 231 * limits regardless of this parameter. 232 * <li> <b>UseTimesync:</b> Set to true to delay applying this control 233 * request until a timesync boundary (requires 234 * Phoenix Pro and CANivore). This eliminates the 235 * impact of nondeterministic network delays in 236 * exchange for a larger but deterministic control 237 * latency. 238 * <p> 239 * This requires setting the ControlTimesyncFreqHz 240 * config in MotorOutputConfigs. Additionally, when 241 * this is enabled, the UpdateFreqHz of this 242 * request should be set to 0 Hz. 243 * </ul> 244 * </ul> 245 * 246 * @param request Control object to request of the device 247 * @return Status code of the request 248 */ 249 StatusCode setControl(TorqueCurrentFOC request); 250 251 /** 252 * Request PID to target position with torque current feedforward. 253 * <p> 254 * This control mode will set the motor's position setpoint to the 255 * position specified by the user. In addition, it will apply an 256 * additional torque current as an arbitrary feedforward value. 257 * <ul> 258 * <li> <b>PositionTorqueCurrentFOC Parameters:</b> 259 * <ul> 260 * <li> <b>Position:</b> Position to drive toward in rotations. 261 * <li> <b>Velocity:</b> Velocity to drive toward in rotations per second. 262 * This is typically used for motion profiles 263 * generated by the robot program. 264 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in 265 * Amperes. This is added to the output of the 266 * onboard feedforward terms. 267 * <p> 268 * User can use motor's kT to scale Newton-meter to 269 * Amperes. 270 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. 271 * Use the configuration api to set the gain values for 272 * the selected slot before enabling this feature. Slot 273 * must be within [0,2]. 274 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 275 * output is zero (or within deadband). 276 * Set to false to use the NeutralMode 277 * configuration setting (default). 278 * This flag exists to provide the 279 * fundamental behavior of this control 280 * when output is zero, which is to 281 * provide 0A (zero torque). 282 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. 283 * This allows users to use other limit 284 * switch sensors connected to robot 285 * controller. This also allows use of 286 * active sensors that require external 287 * power. 288 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. 289 * This allows users to use other limit 290 * switch sensors connected to robot 291 * controller. This also allows use of 292 * active sensors that require external 293 * power. 294 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 295 * switches and the LimitForwardMotion and 296 * LimitReverseMotion parameters, instead 297 * allowing motion. 298 * <p> 299 * This can be useful on mechanisms such 300 * as an intake/feeder, where a limit 301 * switch stops motion while intaking but 302 * should be ignored when feeding to a 303 * shooter. 304 * <p> 305 * The hardware limit faults and 306 * Forward/ReverseLimit signals will still 307 * report the values of the limit switches 308 * regardless of this parameter. 309 * <li> <b>IgnoreSoftwareLimits:</b> Set to true to ignore software limits, 310 * instead allowing motion. 311 * <p> 312 * This can be useful when calibrating the 313 * zero point of a mechanism such as an 314 * elevator. 315 * <p> 316 * The software limit faults will still 317 * report the values of the software 318 * limits regardless of this parameter. 319 * <li> <b>UseTimesync:</b> Set to true to delay applying this control 320 * request until a timesync boundary (requires 321 * Phoenix Pro and CANivore). This eliminates the 322 * impact of nondeterministic network delays in 323 * exchange for a larger but deterministic control 324 * latency. 325 * <p> 326 * This requires setting the ControlTimesyncFreqHz 327 * config in MotorOutputConfigs. Additionally, when 328 * this is enabled, the UpdateFreqHz of this 329 * request should be set to 0 Hz. 330 * </ul> 331 * </ul> 332 * 333 * @param request Control object to request of the device 334 * @return Status code of the request 335 */ 336 StatusCode setControl(PositionTorqueCurrentFOC request); 337 338 /** 339 * Request PID to target velocity with torque current feedforward. 340 * <p> 341 * This control mode will set the motor's velocity setpoint to the 342 * velocity specified by the user. In addition, it will apply an 343 * additional torque current as an arbitrary feedforward value. 344 * <ul> 345 * <li> <b>VelocityTorqueCurrentFOC Parameters:</b> 346 * <ul> 347 * <li> <b>Velocity:</b> Velocity to drive toward in rotations per second. 348 * <li> <b>Acceleration:</b> Acceleration to drive toward in rotations per 349 * second squared. This is typically used for 350 * motion profiles generated by the robot program. 351 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in 352 * Amperes. This is added to the output of the 353 * onboard feedforward terms. 354 * <p> 355 * User can use motor's kT to scale Newton-meter to 356 * Amperes. 357 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. 358 * Use the configuration api to set the gain values for 359 * the selected slot before enabling this feature. Slot 360 * must be within [0,2]. 361 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 362 * output is zero (or within deadband). 363 * Set to false to use the NeutralMode 364 * configuration setting (default). 365 * This flag exists to provide the 366 * fundamental behavior of this control 367 * when output is zero, which is to 368 * provide 0A (zero torque). 369 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. 370 * This allows users to use other limit 371 * switch sensors connected to robot 372 * controller. This also allows use of 373 * active sensors that require external 374 * power. 375 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. 376 * This allows users to use other limit 377 * switch sensors connected to robot 378 * controller. This also allows use of 379 * active sensors that require external 380 * power. 381 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 382 * switches and the LimitForwardMotion and 383 * LimitReverseMotion parameters, instead 384 * allowing motion. 385 * <p> 386 * This can be useful on mechanisms such 387 * as an intake/feeder, where a limit 388 * switch stops motion while intaking but 389 * should be ignored when feeding to a 390 * shooter. 391 * <p> 392 * The hardware limit faults and 393 * Forward/ReverseLimit signals will still 394 * report the values of the limit switches 395 * regardless of this parameter. 396 * <li> <b>IgnoreSoftwareLimits:</b> Set to true to ignore software limits, 397 * instead allowing motion. 398 * <p> 399 * This can be useful when calibrating the 400 * zero point of a mechanism such as an 401 * elevator. 402 * <p> 403 * The software limit faults will still 404 * report the values of the software 405 * limits regardless of this parameter. 406 * <li> <b>UseTimesync:</b> Set to true to delay applying this control 407 * request until a timesync boundary (requires 408 * Phoenix Pro and CANivore). This eliminates the 409 * impact of nondeterministic network delays in 410 * exchange for a larger but deterministic control 411 * latency. 412 * <p> 413 * This requires setting the ControlTimesyncFreqHz 414 * config in MotorOutputConfigs. Additionally, when 415 * this is enabled, the UpdateFreqHz of this 416 * request should be set to 0 Hz. 417 * </ul> 418 * </ul> 419 * 420 * @param request Control object to request of the device 421 * @return Status code of the request 422 */ 423 StatusCode setControl(VelocityTorqueCurrentFOC request); 424 425 /** 426 * Requests Motion Magic® to target a final position using a motion 427 * profile. Users can optionally provide a torque current 428 * feedforward. 429 * <p> 430 * Motion Magic® produces a motion profile in real-time while 431 * attempting to honor the Cruise Velocity, Acceleration, and 432 * (optional) Jerk specified via the Motion Magic® configuration 433 * values. This control mode does not use the Expo_kV or Expo_kA 434 * configs. 435 * <p> 436 * Target position can be changed on-the-fly and Motion Magic® will do 437 * its best to adjust the profile. This control mode is based on 438 * torque current, so relevant closed-loop gains will use Amperes for 439 * the numerator. 440 * <ul> 441 * <li> <b>MotionMagicTorqueCurrentFOC Parameters:</b> 442 * <ul> 443 * <li> <b>Position:</b> Position to drive toward in rotations. 444 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in 445 * Amperes. This is added to the output of the 446 * onboard feedforward terms. 447 * <p> 448 * User can use motor's kT to scale Newton-meter to 449 * Amperes. 450 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. 451 * Use the configuration api to set the gain values for 452 * the selected slot before enabling this feature. Slot 453 * must be within [0,2]. 454 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 455 * output is zero (or within deadband). 456 * Set to false to use the NeutralMode 457 * configuration setting (default). 458 * This flag exists to provide the 459 * fundamental behavior of this control 460 * when output is zero, which is to 461 * provide 0A (zero torque). 462 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. 463 * This allows users to use other limit 464 * switch sensors connected to robot 465 * controller. This also allows use of 466 * active sensors that require external 467 * power. 468 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. 469 * This allows users to use other limit 470 * switch sensors connected to robot 471 * controller. This also allows use of 472 * active sensors that require external 473 * power. 474 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 475 * switches and the LimitForwardMotion and 476 * LimitReverseMotion parameters, instead 477 * allowing motion. 478 * <p> 479 * This can be useful on mechanisms such 480 * as an intake/feeder, where a limit 481 * switch stops motion while intaking but 482 * should be ignored when feeding to a 483 * shooter. 484 * <p> 485 * The hardware limit faults and 486 * Forward/ReverseLimit signals will still 487 * report the values of the limit switches 488 * regardless of this parameter. 489 * <li> <b>IgnoreSoftwareLimits:</b> Set to true to ignore software limits, 490 * instead allowing motion. 491 * <p> 492 * This can be useful when calibrating the 493 * zero point of a mechanism such as an 494 * elevator. 495 * <p> 496 * The software limit faults will still 497 * report the values of the software 498 * limits regardless of this parameter. 499 * <li> <b>UseTimesync:</b> Set to true to delay applying this control 500 * request until a timesync boundary (requires 501 * Phoenix Pro and CANivore). This eliminates the 502 * impact of nondeterministic network delays in 503 * exchange for a larger but deterministic control 504 * latency. 505 * <p> 506 * This requires setting the ControlTimesyncFreqHz 507 * config in MotorOutputConfigs. Additionally, when 508 * this is enabled, the UpdateFreqHz of this 509 * request should be set to 0 Hz. 510 * </ul> 511 * </ul> 512 * 513 * @param request Control object to request of the device 514 * @return Status code of the request 515 */ 516 StatusCode setControl(MotionMagicTorqueCurrentFOC request); 517 518 /** 519 * Requests Motion Magic® to target a final velocity using a motion 520 * profile. This allows smooth transitions between velocity set 521 * points. Users can optionally provide a torque feedforward. 522 * <p> 523 * Motion Magic® Velocity produces a motion profile in real-time while 524 * attempting to honor the specified Acceleration and (optional) Jerk. 525 * This control mode does not use the CruiseVelocity, Expo_kV, or 526 * Expo_kA configs. 527 * <p> 528 * If the specified acceleration is zero, the Acceleration under 529 * Motion Magic® configuration parameter is used instead. This allows 530 * for runtime adjustment of acceleration for advanced users. Jerk is 531 * also specified in the Motion Magic® persistent configuration 532 * values. If Jerk is set to zero, Motion Magic® will produce a 533 * trapezoidal acceleration profile. 534 * <p> 535 * Target velocity can also be changed on-the-fly and Motion Magic® 536 * will do its best to adjust the profile. This control mode is based 537 * on torque current, so relevant closed-loop gains will use Amperes 538 * for the numerator. 539 * <ul> 540 * <li> <b>MotionMagicVelocityTorqueCurrentFOC Parameters:</b> 541 * <ul> 542 * <li> <b>Velocity:</b> Target velocity to drive toward in rotations per 543 * second. This can be changed on-the fly. 544 * <li> <b>Acceleration:</b> This is the absolute Acceleration to use 545 * generating the profile. If this parameter is 546 * zero, the Acceleration persistent configuration 547 * parameter is used instead. Acceleration is in 548 * rotations per second squared. If nonzero, the 549 * signage does not matter as the absolute value 550 * is used. 551 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in 552 * Amperes. This is added to the output of the 553 * onboard feedforward terms. 554 * <p> 555 * User can use motor's kT to scale Newton-meter to 556 * Amperes. 557 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. 558 * Use the configuration api to set the gain values for 559 * the selected slot before enabling this feature. Slot 560 * must be within [0,2]. 561 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 562 * output is zero (or within deadband). 563 * Set to false to use the NeutralMode 564 * configuration setting (default). 565 * This flag exists to provide the 566 * fundamental behavior of this control 567 * when output is zero, which is to 568 * provide 0A (zero torque). 569 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. 570 * This allows users to use other limit 571 * switch sensors connected to robot 572 * controller. This also allows use of 573 * active sensors that require external 574 * power. 575 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. 576 * This allows users to use other limit 577 * switch sensors connected to robot 578 * controller. This also allows use of 579 * active sensors that require external 580 * power. 581 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 582 * switches and the LimitForwardMotion and 583 * LimitReverseMotion parameters, instead 584 * allowing motion. 585 * <p> 586 * This can be useful on mechanisms such 587 * as an intake/feeder, where a limit 588 * switch stops motion while intaking but 589 * should be ignored when feeding to a 590 * shooter. 591 * <p> 592 * The hardware limit faults and 593 * Forward/ReverseLimit signals will still 594 * report the values of the limit switches 595 * regardless of this parameter. 596 * <li> <b>IgnoreSoftwareLimits:</b> Set to true to ignore software limits, 597 * instead allowing motion. 598 * <p> 599 * This can be useful when calibrating the 600 * zero point of a mechanism such as an 601 * elevator. 602 * <p> 603 * The software limit faults will still 604 * report the values of the software 605 * limits regardless of this parameter. 606 * <li> <b>UseTimesync:</b> Set to true to delay applying this control 607 * request until a timesync boundary (requires 608 * Phoenix Pro and CANivore). This eliminates the 609 * impact of nondeterministic network delays in 610 * exchange for a larger but deterministic control 611 * latency. 612 * <p> 613 * This requires setting the ControlTimesyncFreqHz 614 * config in MotorOutputConfigs. Additionally, when 615 * this is enabled, the UpdateFreqHz of this 616 * request should be set to 0 Hz. 617 * </ul> 618 * </ul> 619 * 620 * @param request Control object to request of the device 621 * @return Status code of the request 622 */ 623 StatusCode setControl(MotionMagicVelocityTorqueCurrentFOC request); 624 625 /** 626 * Requests Motion Magic® to target a final position using an 627 * exponential motion profile. Users can optionally provide a torque 628 * current feedforward. 629 * <p> 630 * Motion Magic® Expo produces a motion profile in real-time while 631 * attempting to honor the Cruise Velocity (optional) and the 632 * mechanism kV and kA, specified via the Motion Magic® configuration 633 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA 634 * configs are always in output units of Volts. 635 * <p> 636 * Setting Cruise Velocity to 0 will allow the profile to run to the 637 * max possible velocity based on Expo_kV. This control mode does not 638 * use the Acceleration or Jerk configs. 639 * <p> 640 * Target position can be changed on-the-fly and Motion Magic® will do 641 * its best to adjust the profile. This control mode is based on 642 * torque current, so relevant closed-loop gains will use Amperes for 643 * the numerator. 644 * <ul> 645 * <li> <b>MotionMagicExpoTorqueCurrentFOC Parameters:</b> 646 * <ul> 647 * <li> <b>Position:</b> Position to drive toward in rotations. 648 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in 649 * Amperes. This is added to the output of the 650 * onboard feedforward terms. 651 * <p> 652 * User can use motor's kT to scale Newton-meter to 653 * Amperes. 654 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. 655 * Use the configuration api to set the gain values for 656 * the selected slot before enabling this feature. Slot 657 * must be within [0,2]. 658 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 659 * output is zero (or within deadband). 660 * Set to false to use the NeutralMode 661 * configuration setting (default). 662 * This flag exists to provide the 663 * fundamental behavior of this control 664 * when output is zero, which is to 665 * provide 0A (zero torque). 666 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. 667 * This allows users to use other limit 668 * switch sensors connected to robot 669 * controller. This also allows use of 670 * active sensors that require external 671 * power. 672 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. 673 * This allows users to use other limit 674 * switch sensors connected to robot 675 * controller. This also allows use of 676 * active sensors that require external 677 * power. 678 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 679 * switches and the LimitForwardMotion and 680 * LimitReverseMotion parameters, instead 681 * allowing motion. 682 * <p> 683 * This can be useful on mechanisms such 684 * as an intake/feeder, where a limit 685 * switch stops motion while intaking but 686 * should be ignored when feeding to a 687 * shooter. 688 * <p> 689 * The hardware limit faults and 690 * Forward/ReverseLimit signals will still 691 * report the values of the limit switches 692 * regardless of this parameter. 693 * <li> <b>IgnoreSoftwareLimits:</b> Set to true to ignore software limits, 694 * instead allowing motion. 695 * <p> 696 * This can be useful when calibrating the 697 * zero point of a mechanism such as an 698 * elevator. 699 * <p> 700 * The software limit faults will still 701 * report the values of the software 702 * limits regardless of this parameter. 703 * <li> <b>UseTimesync:</b> Set to true to delay applying this control 704 * request until a timesync boundary (requires 705 * Phoenix Pro and CANivore). This eliminates the 706 * impact of nondeterministic network delays in 707 * exchange for a larger but deterministic control 708 * latency. 709 * <p> 710 * This requires setting the ControlTimesyncFreqHz 711 * config in MotorOutputConfigs. Additionally, when 712 * this is enabled, the UpdateFreqHz of this 713 * request should be set to 0 Hz. 714 * </ul> 715 * </ul> 716 * 717 * @param request Control object to request of the device 718 * @return Status code of the request 719 */ 720 StatusCode setControl(MotionMagicExpoTorqueCurrentFOC request); 721 722 /** 723 * Requests Motion Magic® to target a final position using a motion 724 * profile. This dynamic request allows runtime changes to Cruise 725 * Velocity, Acceleration, and (optional) Jerk. Users can optionally 726 * provide a torque current feedforward. 727 * <p> 728 * Motion Magic® produces a motion profile in real-time while 729 * attempting to honor the specified Cruise Velocity, Acceleration, 730 * and (optional) Jerk. This control mode does not use the Expo_kV or 731 * Expo_kA configs. 732 * <p> 733 * Target position can be changed on-the-fly and Motion Magic® will do 734 * its best to adjust the profile. This control mode is based on 735 * torque current, so relevant closed-loop gains will use Amperes for 736 * the numerator. 737 * <ul> 738 * <li> <b>DynamicMotionMagicTorqueCurrentFOC Parameters:</b> 739 * <ul> 740 * <li> <b>Position:</b> Position to drive toward in rotations. 741 * <li> <b>Velocity:</b> Cruise velocity for profiling. The signage does 742 * not matter as the device will use the absolute 743 * value for profile generation. 744 * <li> <b>Acceleration:</b> Acceleration for profiling. The signage does 745 * not matter as the device will use the absolute 746 * value for profile generation. 747 * <li> <b>Jerk:</b> Jerk for profiling. The signage does not matter as the 748 * device will use the absolute value for profile 749 * generation. 750 * <p> 751 * Jerk is optional; if this is set to zero, then Motion 752 * Magic® will not apply a Jerk limit. 753 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in 754 * Amperes. This is added to the output of the 755 * onboard feedforward terms. 756 * <p> 757 * User can use motor's kT to scale Newton-meter to 758 * Amperes. 759 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. 760 * Use the configuration api to set the gain values for 761 * the selected slot before enabling this feature. Slot 762 * must be within [0,2]. 763 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 764 * output is zero (or within deadband). 765 * Set to false to use the NeutralMode 766 * configuration setting (default). 767 * This flag exists to provide the 768 * fundamental behavior of this control 769 * when output is zero, which is to 770 * provide 0A (zero torque). 771 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. 772 * This allows users to use other limit 773 * switch sensors connected to robot 774 * controller. This also allows use of 775 * active sensors that require external 776 * power. 777 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. 778 * This allows users to use other limit 779 * switch sensors connected to robot 780 * controller. This also allows use of 781 * active sensors that require external 782 * power. 783 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 784 * switches and the LimitForwardMotion and 785 * LimitReverseMotion parameters, instead 786 * allowing motion. 787 * <p> 788 * This can be useful on mechanisms such 789 * as an intake/feeder, where a limit 790 * switch stops motion while intaking but 791 * should be ignored when feeding to a 792 * shooter. 793 * <p> 794 * The hardware limit faults and 795 * Forward/ReverseLimit signals will still 796 * report the values of the limit switches 797 * regardless of this parameter. 798 * <li> <b>IgnoreSoftwareLimits:</b> Set to true to ignore software limits, 799 * instead allowing motion. 800 * <p> 801 * This can be useful when calibrating the 802 * zero point of a mechanism such as an 803 * elevator. 804 * <p> 805 * The software limit faults will still 806 * report the values of the software 807 * limits regardless of this parameter. 808 * <li> <b>UseTimesync:</b> Set to true to delay applying this control 809 * request until a timesync boundary (requires 810 * Phoenix Pro and CANivore). This eliminates the 811 * impact of nondeterministic network delays in 812 * exchange for a larger but deterministic control 813 * latency. 814 * <p> 815 * This requires setting the ControlTimesyncFreqHz 816 * config in MotorOutputConfigs. Additionally, when 817 * this is enabled, the UpdateFreqHz of this 818 * request should be set to 0 Hz. 819 * </ul> 820 * </ul> 821 * 822 * @param request Control object to request of the device 823 * @return Status code of the request 824 */ 825 StatusCode setControl(DynamicMotionMagicTorqueCurrentFOC request); 826 827 /** 828 * Requests Motion Magic® Expo to target a final position using an 829 * exponential motion profile. This dynamic request allows runtime 830 * changes to the profile kV, kA, and (optional) Cruise Velocity. 831 * Users can optionally provide a torque current feedforward. 832 * <p> 833 * Motion Magic® Expo produces a motion profile in real-time while 834 * attempting to honor the specified Cruise Velocity (optional) and 835 * the mechanism kV and kA. Note that unlike the slot gains, the 836 * Expo_kV and Expo_kA parameters are always in output units of Volts. 837 * <p> 838 * Setting the Cruise Velocity to 0 will allow the profile to run to 839 * the max possible velocity based on Expo_kV. This control mode does 840 * not use the Acceleration or Jerk configs. 841 * <p> 842 * Target position can be changed on-the-fly and Motion Magic® will do 843 * its best to adjust the profile. This control mode is based on 844 * torque current, so relevant closed-loop gains will use Amperes for 845 * the numerator. 846 * <ul> 847 * <li> <b>DynamicMotionMagicExpoTorqueCurrentFOC Parameters:</b> 848 * <ul> 849 * <li> <b>Position:</b> Position to drive toward in rotations. 850 * <li> <b>kV:</b> Mechanism kV for profiling. Unlike the kV slot gain, 851 * this is always in units of V/rps. 852 * <p> 853 * This represents the amount of voltage necessary to hold a 854 * velocity. In terms of the Motion Magic® Expo profile, a 855 * higher kV results in a slower maximum velocity. 856 * <li> <b>kA:</b> Mechanism kA for profiling. Unlike the kA slot gain, 857 * this is always in units of V/rps². 858 * <p> 859 * This represents the amount of voltage necessary to 860 * achieve an acceleration. In terms of the Motion Magic® 861 * Expo profile, a higher kA results in a slower 862 * acceleration. 863 * <li> <b>Velocity:</b> Cruise velocity for profiling. The signage does 864 * not matter as the device will use the absolute 865 * value for profile generation. Setting this to 0 866 * will allow the profile to run to the max possible 867 * velocity based on Expo_kV. 868 * <li> <b>FeedForward:</b> Feedforward to apply in torque current in 869 * Amperes. This is added to the output of the 870 * onboard feedforward terms. 871 * <p> 872 * User can use motor's kT to scale Newton-meter to 873 * Amperes. 874 * <li> <b>Slot:</b> Select which gains are applied by selecting the slot. 875 * Use the configuration api to set the gain values for 876 * the selected slot before enabling this feature. Slot 877 * must be within [0,2]. 878 * <li> <b>OverrideCoastDurNeutral:</b> Set to true to coast the rotor when 879 * output is zero (or within deadband). 880 * Set to false to use the NeutralMode 881 * configuration setting (default). 882 * This flag exists to provide the 883 * fundamental behavior of this control 884 * when output is zero, which is to 885 * provide 0A (zero torque). 886 * <li> <b>LimitForwardMotion:</b> Set to true to force forward limiting. 887 * This allows users to use other limit 888 * switch sensors connected to robot 889 * controller. This also allows use of 890 * active sensors that require external 891 * power. 892 * <li> <b>LimitReverseMotion:</b> Set to true to force reverse limiting. 893 * This allows users to use other limit 894 * switch sensors connected to robot 895 * controller. This also allows use of 896 * active sensors that require external 897 * power. 898 * <li> <b>IgnoreHardwareLimits:</b> Set to true to ignore hardware limit 899 * switches and the LimitForwardMotion and 900 * LimitReverseMotion parameters, instead 901 * allowing motion. 902 * <p> 903 * This can be useful on mechanisms such 904 * as an intake/feeder, where a limit 905 * switch stops motion while intaking but 906 * should be ignored when feeding to a 907 * shooter. 908 * <p> 909 * The hardware limit faults and 910 * Forward/ReverseLimit signals will still 911 * report the values of the limit switches 912 * regardless of this parameter. 913 * <li> <b>IgnoreSoftwareLimits:</b> Set to true to ignore software limits, 914 * instead allowing motion. 915 * <p> 916 * This can be useful when calibrating the 917 * zero point of a mechanism such as an 918 * elevator. 919 * <p> 920 * The software limit faults will still 921 * report the values of the software 922 * limits regardless of this parameter. 923 * <li> <b>UseTimesync:</b> Set to true to delay applying this control 924 * request until a timesync boundary (requires 925 * Phoenix Pro and CANivore). This eliminates the 926 * impact of nondeterministic network delays in 927 * exchange for a larger but deterministic control 928 * latency. 929 * <p> 930 * This requires setting the ControlTimesyncFreqHz 931 * config in MotorOutputConfigs. Additionally, when 932 * this is enabled, the UpdateFreqHz of this 933 * request should be set to 0 Hz. 934 * </ul> 935 * </ul> 936 * 937 * @param request Control object to request of the device 938 * @return Status code of the request 939 */ 940 StatusCode setControl(DynamicMotionMagicExpoTorqueCurrentFOC request); 941 942 /** 943 * Differential control with torque current average target and 944 * position difference target. 945 * <ul> 946 * <li> <b>Diff_TorqueCurrentFOC_Position Parameters:</b> 947 * <ul> 948 * <li> <b>AverageRequest:</b> Average TorqueCurrentFOC request of the 949 * mechanism. 950 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 951 * request of the mechanism. 952 * </ul> 953 * </ul> 954 * 955 * @param request Control object to request of the device 956 * @return Status code of the request 957 */ 958 StatusCode setControl(Diff_TorqueCurrentFOC_Position request); 959 960 /** 961 * Differential control with position average target and position 962 * difference target using torque current control. 963 * <ul> 964 * <li> <b>Diff_PositionTorqueCurrentFOC_Position Parameters:</b> 965 * <ul> 966 * <li> <b>AverageRequest:</b> Average PositionTorqueCurrentFOC request of 967 * the mechanism. 968 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 969 * request of the mechanism. 970 * </ul> 971 * </ul> 972 * 973 * @param request Control object to request of the device 974 * @return Status code of the request 975 */ 976 StatusCode setControl(Diff_PositionTorqueCurrentFOC_Position request); 977 978 /** 979 * Differential control with velocity average target and position 980 * difference target using torque current control. 981 * <ul> 982 * <li> <b>Diff_VelocityTorqueCurrentFOC_Position Parameters:</b> 983 * <ul> 984 * <li> <b>AverageRequest:</b> Average VelocityTorqueCurrentFOC request of 985 * the mechanism. 986 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 987 * request of the mechanism. 988 * </ul> 989 * </ul> 990 * 991 * @param request Control object to request of the device 992 * @return Status code of the request 993 */ 994 StatusCode setControl(Diff_VelocityTorqueCurrentFOC_Position request); 995 996 /** 997 * Differential control with Motion Magic® average target and position 998 * difference target using torque current control. 999 * <ul> 1000 * <li> <b>Diff_MotionMagicTorqueCurrentFOC_Position Parameters:</b> 1001 * <ul> 1002 * <li> <b>AverageRequest:</b> Average MotionMagicTorqueCurrentFOC request 1003 * of the mechanism. 1004 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 1005 * request of the mechanism. 1006 * </ul> 1007 * </ul> 1008 * 1009 * @param request Control object to request of the device 1010 * @return Status code of the request 1011 */ 1012 StatusCode setControl(Diff_MotionMagicTorqueCurrentFOC_Position request); 1013 1014 /** 1015 * Differential control with Motion Magic® Expo average target and 1016 * position difference target using torque current control. 1017 * <ul> 1018 * <li> <b>Diff_MotionMagicExpoTorqueCurrentFOC_Position Parameters:</b> 1019 * <ul> 1020 * <li> <b>AverageRequest:</b> Average MotionMagicExpoTorqueCurrentFOC 1021 * request of the mechanism. 1022 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 1023 * request of the mechanism. 1024 * </ul> 1025 * </ul> 1026 * 1027 * @param request Control object to request of the device 1028 * @return Status code of the request 1029 */ 1030 StatusCode setControl(Diff_MotionMagicExpoTorqueCurrentFOC_Position request); 1031 1032 /** 1033 * Differential control with Motion Magic® Velocity average target and 1034 * position difference target using torque current control. 1035 * <ul> 1036 * <li> <b>Diff_MotionMagicVelocityTorqueCurrentFOC_Position Parameters:</b> 1037 * <ul> 1038 * <li> <b>AverageRequest:</b> Average MotionMagicVelocityTorqueCurrentFOC 1039 * request of the mechanism. 1040 * <li> <b>DifferentialRequest:</b> Differential PositionTorqueCurrentFOC 1041 * request of the mechanism. 1042 * </ul> 1043 * </ul> 1044 * 1045 * @param request Control object to request of the device 1046 * @return Status code of the request 1047 */ 1048 StatusCode setControl(Diff_MotionMagicVelocityTorqueCurrentFOC_Position request); 1049 1050 /** 1051 * Differential control with torque current average target and 1052 * velocity difference target. 1053 * <ul> 1054 * <li> <b>Diff_TorqueCurrentFOC_Velocity Parameters:</b> 1055 * <ul> 1056 * <li> <b>AverageRequest:</b> Average TorqueCurrentFOC request of the 1057 * mechanism. 1058 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 1059 * request of the mechanism. 1060 * </ul> 1061 * </ul> 1062 * 1063 * @param request Control object to request of the device 1064 * @return Status code of the request 1065 */ 1066 StatusCode setControl(Diff_TorqueCurrentFOC_Velocity request); 1067 1068 /** 1069 * Differential control with position average target and velocity 1070 * difference target using torque current control. 1071 * <ul> 1072 * <li> <b>Diff_PositionTorqueCurrentFOC_Velocity Parameters:</b> 1073 * <ul> 1074 * <li> <b>AverageRequest:</b> Average PositionTorqueCurrentFOC request of 1075 * the mechanism. 1076 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 1077 * request of the mechanism. 1078 * </ul> 1079 * </ul> 1080 * 1081 * @param request Control object to request of the device 1082 * @return Status code of the request 1083 */ 1084 StatusCode setControl(Diff_PositionTorqueCurrentFOC_Velocity request); 1085 1086 /** 1087 * Differential control with velocity average target and velocity 1088 * difference target using torque current control. 1089 * <ul> 1090 * <li> <b>Diff_VelocityTorqueCurrentFOC_Velocity Parameters:</b> 1091 * <ul> 1092 * <li> <b>AverageRequest:</b> Average VelocityTorqueCurrentFOC request of 1093 * the mechanism. 1094 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 1095 * request of the mechanism. 1096 * </ul> 1097 * </ul> 1098 * 1099 * @param request Control object to request of the device 1100 * @return Status code of the request 1101 */ 1102 StatusCode setControl(Diff_VelocityTorqueCurrentFOC_Velocity request); 1103 1104 /** 1105 * Differential control with Motion Magic® average target and velocity 1106 * difference target using torque current control. 1107 * <ul> 1108 * <li> <b>Diff_MotionMagicTorqueCurrentFOC_Velocity Parameters:</b> 1109 * <ul> 1110 * <li> <b>AverageRequest:</b> Average MotionMagicTorqueCurrentFOC request 1111 * of the mechanism. 1112 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 1113 * request of the mechanism. 1114 * </ul> 1115 * </ul> 1116 * 1117 * @param request Control object to request of the device 1118 * @return Status code of the request 1119 */ 1120 StatusCode setControl(Diff_MotionMagicTorqueCurrentFOC_Velocity request); 1121 1122 /** 1123 * Differential control with Motion Magic® Expo average target and 1124 * velocity difference target using torque current control. 1125 * <ul> 1126 * <li> <b>Diff_MotionMagicExpoTorqueCurrentFOC_Velocity Parameters:</b> 1127 * <ul> 1128 * <li> <b>AverageRequest:</b> Average MotionMagicExpoTorqueCurrentFOC 1129 * request of the mechanism. 1130 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 1131 * request of the mechanism. 1132 * </ul> 1133 * </ul> 1134 * 1135 * @param request Control object to request of the device 1136 * @return Status code of the request 1137 */ 1138 StatusCode setControl(Diff_MotionMagicExpoTorqueCurrentFOC_Velocity request); 1139 1140 /** 1141 * Differential control with Motion Magic® Velocity average target and 1142 * velocity difference target using torque current control. 1143 * <ul> 1144 * <li> <b>Diff_MotionMagicVelocityTorqueCurrentFOC_Velocity Parameters:</b> 1145 * <ul> 1146 * <li> <b>AverageRequest:</b> Average MotionMagicVelocityTorqueCurrentFOC 1147 * request of the mechanism. 1148 * <li> <b>DifferentialRequest:</b> Differential VelocityTorqueCurrentFOC 1149 * request of the mechanism. 1150 * </ul> 1151 * </ul> 1152 * 1153 * @param request Control object to request of the device 1154 * @return Status code of the request 1155 */ 1156 StatusCode setControl(Diff_MotionMagicVelocityTorqueCurrentFOC_Velocity request); 1157 1158 /** 1159 * Differential control with torque current average target and torque 1160 * current difference target. 1161 * <ul> 1162 * <li> <b>Diff_TorqueCurrentFOC_Open Parameters:</b> 1163 * <ul> 1164 * <li> <b>AverageRequest:</b> Average TorqueCurrentFOC request of the 1165 * mechanism. 1166 * <li> <b>DifferentialRequest:</b> Differential TorqueCurrentFOC request of 1167 * the mechanism. 1168 * </ul> 1169 * </ul> 1170 * 1171 * @param request Control object to request of the device 1172 * @return Status code of the request 1173 */ 1174 StatusCode setControl(Diff_TorqueCurrentFOC_Open request); 1175 1176 /** 1177 * Differential control with position average target and torque 1178 * current difference target. 1179 * <ul> 1180 * <li> <b>Diff_PositionTorqueCurrentFOC_Open Parameters:</b> 1181 * <ul> 1182 * <li> <b>AverageRequest:</b> Average PositionTorqueCurrentFOC request of 1183 * the mechanism. 1184 * <li> <b>DifferentialRequest:</b> Differential TorqueCurrentFOC request of 1185 * the mechanism. 1186 * </ul> 1187 * </ul> 1188 * 1189 * @param request Control object to request of the device 1190 * @return Status code of the request 1191 */ 1192 StatusCode setControl(Diff_PositionTorqueCurrentFOC_Open request); 1193 1194 /** 1195 * Differential control with velocity average target and torque 1196 * current difference target. 1197 * <ul> 1198 * <li> <b>Diff_VelocityTorqueCurrentFOC_Open Parameters:</b> 1199 * <ul> 1200 * <li> <b>AverageRequest:</b> Average VelocityTorqueCurrentFOC request of 1201 * the mechanism. 1202 * <li> <b>DifferentialRequest:</b> Differential TorqueCurrentFOC request of 1203 * the mechanism. 1204 * </ul> 1205 * </ul> 1206 * 1207 * @param request Control object to request of the device 1208 * @return Status code of the request 1209 */ 1210 StatusCode setControl(Diff_VelocityTorqueCurrentFOC_Open request); 1211 1212 /** 1213 * Differential control with Motion Magic® average target and torque 1214 * current difference target. 1215 * <ul> 1216 * <li> <b>Diff_MotionMagicTorqueCurrentFOC_Open Parameters:</b> 1217 * <ul> 1218 * <li> <b>AverageRequest:</b> Average MotionMagicTorqueCurrentFOC request 1219 * of the mechanism. 1220 * <li> <b>DifferentialRequest:</b> Differential TorqueCurrentFOC request of 1221 * the mechanism. 1222 * </ul> 1223 * </ul> 1224 * 1225 * @param request Control object to request of the device 1226 * @return Status code of the request 1227 */ 1228 StatusCode setControl(Diff_MotionMagicTorqueCurrentFOC_Open request); 1229 1230 /** 1231 * Differential control with Motion Magic® Expo average target and 1232 * torque current difference target. 1233 * <ul> 1234 * <li> <b>Diff_MotionMagicExpoTorqueCurrentFOC_Open Parameters:</b> 1235 * <ul> 1236 * <li> <b>AverageRequest:</b> Average MotionMagicExpoTorqueCurrentFOC 1237 * request of the mechanism. 1238 * <li> <b>DifferentialRequest:</b> Differential TorqueCurrentFOC request of 1239 * the mechanism. 1240 * </ul> 1241 * </ul> 1242 * 1243 * @param request Control object to request of the device 1244 * @return Status code of the request 1245 */ 1246 StatusCode setControl(Diff_MotionMagicExpoTorqueCurrentFOC_Open request); 1247 1248 /** 1249 * Differential control with Motion Magic® Velocity average target and 1250 * torque current difference target. 1251 * <ul> 1252 * <li> <b>Diff_MotionMagicVelocityTorqueCurrentFOC_Open Parameters:</b> 1253 * <ul> 1254 * <li> <b>AverageRequest:</b> Average MotionMagicVelocityTorqueCurrentFOC 1255 * request of the mechanism. 1256 * <li> <b>DifferentialRequest:</b> Differential TorqueCurrentFOC request of 1257 * the mechanism. 1258 * </ul> 1259 * </ul> 1260 * 1261 * @param request Control object to request of the device 1262 * @return Status code of the request 1263 */ 1264 StatusCode setControl(Diff_MotionMagicVelocityTorqueCurrentFOC_Open request); 1265 1266 /** 1267 * Apply a generic empty control used to do nothing. 1268 * 1269 * @param request Control object to request of the device 1270 * @return Status code of the request 1271 */ 1272 StatusCode setControl(EmptyControl request); 1273 1274 /** 1275 * Control device with generic control request object. 1276 * <p> 1277 * User must make sure the specified object is castable to a valid control request, 1278 * otherwise this function will fail at run-time and return the NotSupported StatusCode 1279 * 1280 * @param request Control object to request of the device 1281 * @return Status code of the request 1282 */ 1283 StatusCode setControl(ControlRequest request); 1284 1285 /** 1286 * Clear sticky fault: Trips if a major mechanical or ESD event caused 1287 * a brief loss of position data triggering a recovery while not in 1288 * motion. If the event occurs often, inspect for excess axial force 1289 * or sources of ESD at the rotor. 1290 * <p> 1291 * This will wait up to 0.100 seconds (100ms) by default. 1292 * 1293 * @return StatusCode of the set command 1294 */ 1295 StatusCode clearStickyFault_RotorFault1(); 1296 /** 1297 * Clear sticky fault: Trips if a major mechanical or ESD event caused 1298 * a brief loss of position data triggering a recovery while not in 1299 * motion. If the event occurs often, inspect for excess axial force 1300 * or sources of ESD at the rotor. 1301 * 1302 * @param timeoutSeconds Maximum time to wait up to in seconds. 1303 * @return StatusCode of the set command 1304 */ 1305 StatusCode clearStickyFault_RotorFault1(double timeoutSeconds); 1306 1307 /** 1308 * Clear sticky fault: Trips if a major mechanical or ESD event caused 1309 * a brief loss of position data triggering a recovery while in 1310 * motion. If the event occurs often, inspect for excess axial force 1311 * or sources of ESD at the rotor. 1312 * <p> 1313 * This will wait up to 0.100 seconds (100ms) by default. 1314 * 1315 * @return StatusCode of the set command 1316 */ 1317 StatusCode clearStickyFault_RotorFault2(); 1318 /** 1319 * Clear sticky fault: Trips if a major mechanical or ESD event caused 1320 * a brief loss of position data triggering a recovery while in 1321 * motion. If the event occurs often, inspect for excess axial force 1322 * or sources of ESD at the rotor. 1323 * 1324 * @param timeoutSeconds Maximum time to wait up to in seconds. 1325 * @return StatusCode of the set command 1326 */ 1327 StatusCode clearStickyFault_RotorFault2(double timeoutSeconds); 1328} 1329