FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


fxapifunctions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

fxapifunctions [2018/11/15 14:48]
dtscbs created
fxapifunctions [2018/11/20 14:46] (current)
dtscbs
Line 41: Line 41:
 | || | ||
 |  void |[[com__wrapper_8h#​a8e40bf340b22e8aa7ef65391d9707bd4|setControlMode]] (int devId, int ctrlMode)| |  void |[[com__wrapper_8h#​a8e40bf340b22e8aa7ef65391d9707bd4|setControlMode]] (int devId, int ctrlMode)|
-| |Sets the type of control mode of the FlexSEA device. The modes are open voltage, current, position, and impedance. Refer to ZZZ for more tailed description of each mode. [[#​a8e40bf340b22e8aa7ef65391d9707bd4|More...]]\\ |+| |Sets the type of control mode of the FlexSEA device. The modes are open voltage, current, position, and impedance. [[#​a8e40bf340b22e8aa7ef65391d9707bd4|More...]]\\ |
 | || | ||
 |  void |[[com__wrapper_8h#​a65a052424d8de195faddfefd34423f4e|setMotorVoltage]] (int devId, int mV)| |  void |[[com__wrapper_8h#​a65a052424d8de195faddfefd34423f4e|setMotorVoltage]] (int devId, int mV)|
Line 52: Line 52:
 | |Sets the setpoint in encoder ticks. [[#​a45a94b1b17b7ac72a7f2fc83aa48e04c|More...]]\\ | | |Sets the setpoint in encoder ticks. [[#​a45a94b1b17b7ac72a7f2fc83aa48e04c|More...]]\\ |
 | || | ||
-|  void |[[com__wrapper_8h#​ab739b2c8aa4047eebc7f40735f0cd6d3|setZGains]] (int devId, int KP1, int KI1, int KP2, int KI2)| +|  void |[[com__wrapper_8h#​a79adba07f3b2c61f9bec2d6be78d4648|setZGains]] (int devId, int z_k, int z_b, int i_kp, int i_ki)| 
-| |Sets the gains used by PID controllers on the FlexSEA device. [[#ab739b2c8aa4047eebc7f40735f0cd6d3|More...]]\\ |+| |Sets the gains used by PID controllers on the FlexSEA device. [[#a79adba07f3b2c61f9bec2d6be78d4648|More...]]\\ |
 | || | ||
 |  void |[[com__wrapper_8h#​ae708768cfcb115992c7b206f11668688|actPackFSM2]] (int devId, int on)| |  void |[[com__wrapper_8h#​ae708768cfcb115992c7b206f11668688|actPackFSM2]] (int devId, int on)|
-| |Enables or disables the user FSM 2 on the FlexSEA device. ​WHAT IS FSM2 AND HOW IS IT USEFUL? ​[[#​ae708768cfcb115992c7b206f11668688|More...]]\\ |+| |Enables or disables the user FSM 2 on the FlexSEA device. [[#​ae708768cfcb115992c7b206f11668688|More...]]\\ |
 | || | ||
 |  void |[[com__wrapper_8h#​ad71a4263a312ae22f3572d5e95fd6b21|findPoles]] (int devId, int block)| |  void |[[com__wrapper_8h#​ad71a4263a312ae22f3572d5e95fd6b21|findPoles]] (int devId, int block)|
Line 74: Line 74:
 | |)| | | | |)| | |
  
-Enables or disables the user FSM 2 on the FlexSEA device. ​WHAT IS FSM2 AND HOW IS IT USEFUL?+Enables or disables the user FSM 2 on the FlexSEA device.
  
-  * **Parameters** devId is the opaque handle for the device. on SAY SOMETHING ABOUT THIS. IT DOESN'​T APPEAR TO BE USED in the source code +  * **Parameters** devId is the opaque handle for the device. on 1 Enables ​the FSM, 0 disables it. 
  
   * **Returns** Nothing.   * **Returns** Nothing.
Line 156: Line 156:
 a utility function to access the most recent values received from a FlexSEA device. a utility function to access the most recent values received from a FlexSEA device.
  
-  * **Parameters** devId is the opaque handle for the device. fieldIds Specify the field ids of variables to read. These must have been requested in the fxSetStreamVariables. Refer to ZZZ for a description of the field ids. success An array of status codes indicating whether the returned data aray contains valid data. This array must contain the same number of elements as the fieldIds array. Each element in the success array will contain 1 if that fieldIds element contains valid data. Otherwise, the success array element will contain 0. n Specifies the length of the arrays fieldIds and success. The arrays must be preallocated and the sze of the arrays must match. ​+  * **Parameters** devId is the opaque handle for the device. fieldIds Specify the field ids of variables to read. These must have been requested in the fxSetStreamVariables. Refer to [[http://​dephy.com/​wiki/​flexsea/​doku.php?​id=fxdevicefields|http://​dephy.com/​wiki/​flexsea/​doku.php?​id=fxdevicefields]] ​for a description of the field ids. success An array of status codes indicating whether the returned data aray contains valid data. This array must contain the same number of elements as the fieldIds array. Each element in the success array will contain 1 if that fieldIds element contains valid data. Otherwise, the success array element will contain 0. n Specifies the length of the arrays fieldIds and success. The arrays must be preallocated and the sze of the arrays must match. ​
  
   * **Returns** Returns a pointer to an array that contains the data being read.   * **Returns** Returns a pointer to an array that contains the data being read.
Line 171: Line 171:
 This function is called to select which FlexSEA variables are streamed from a device. This function is called to select which FlexSEA variables are streamed from a device.
  
-  * **Parameters** devId is the opaque handle for the device. fieldIds is an array of variables to stream. Each element should contain a valid id. Refer to ZZZ for a description of the variables. n Specifies the length of the array fieldIds. ​+  * **Parameters** devId is the opaque handle for the device. fieldIds is an array of variables to stream. Each element should contain a valid id. Variables are described at [[http://​dephy.com/​wiki/​flexsea/​doku.php?​id=fxdevicefields|http://​dephy.com/​wiki/​flexsea/​doku.php?​id=fxdevicefields]] ​n Specifies the length of the array fieldIds. ​
  
-  * **Returns** ​Always ​Returns 1. ZZZ+  * **Returns** Returns ​0 on error otherwise.
  
 ===== ◆ fxSetup() ===== ===== ◆ fxSetup() =====
Line 193: Line 193:
 Start streaming data from a FlexSEA device. Start streaming data from a FlexSEA device.
  
-  * **Parameters** devId is the opaque handle for the device. frequency This is the frequency of updates. ​It must match one of the those allowed by CommManagerZZZ NOTE: ADD MORE DETAILS ABOUT VALUES ALLOWED BY COMMANAGER ​shouldLog If set true, the program logs all received data to a file. The name of the file is formed as follows: ​+  * **Parameters** devId is the opaque handle for the device. frequency This is the frequency of updates. ​This value is in Hz and can be one of the following 1, 5, 10, 20, 33, 50, 100, 200, 300, 500, 1000. shouldLog If set true, the program logs all received data to a file. The name of the file is formed as follows: ​
  
 < FlexSEA model >_id< device ID >_< date and time >.csv < FlexSEA model >_id< device ID >_< date and time >.csv
Line 223: Line 223:
 | |)| | | | |)| | |
  
-Sets the type of control mode of the FlexSEA device. The modes are open voltage, current, position, and impedance. Refer to ZZZ for more tailed description of each mode.+Sets the type of control mode of the FlexSEA device. The modes are open voltage, current, position, and impedance.
  
-  * **Parameters** devId is the opaque handle for the device. ctrlMode ​NOTEMORE INFO ABOUT MODES +  * **Parameters** devId is the opaque handle for the device. ctrlMode ​Mode description can be found at[[http://​dephy.com/​wiki/​flexsea/​doku.php?​id=fxdevicemodes|http://​dephy.com/​wiki/​flexsea/​doku.php?​id=fxdevicemodes]] ​
  
   * **Returns** Nothing.   * **Returns** Nothing.
Line 274: Line 274:
  
 |void setZGains|(|int |devId,​| |void setZGains|(|int |devId,​|
-| | |int |KP1,| +| | |int |z_k,| 
-| | |int |KI1,| +| | |int |z_b,| 
-| | |int |KP2,| +| | |int |i_kp,| 
-| | |int |KI2 |+| | |int |i_ki |
 | |)| | | | |)| | |
  
 Sets the gains used by PID controllers on the FlexSEA device. Sets the gains used by PID controllers on the FlexSEA device.
  
-  * **Parameters** devId is the opaque handle for the device. ​KP1 proportional gain 1 ( used for current in current control & position in position/​impedance control ) KI1 integral gain 1 ( used for current in current control & position in position/​impedance control ) KP2 proportional gain 2 ( used for for the underlying current control within the impedance controller ) KI2 integral ​gain ( used for for the underlying current control within the impedance controller ) +  * **Parameters** devId is the opaque handle for the device. ​z_k Damping factor ​(used for current in current control & position in position/​impedance control) ​z_b Damping factor ​(used for current in current control & position in position/​impedance control) ​i_kp Proportional ​(used for for the underlying current control within the impedance controller) ​i_ki Integral ​gain (used for for the underlying current control within the impedance controller) ​
  
   * **Returns** Nothing.   * **Returns** Nothing.
fxapifunctions.txt · Last modified: 2018/11/20 14:46 by dtscbs