![]() |
ApossC SDK
V01.15
|
Declaration of the encoder setup function. More...
Go to the source code of this file.
Functions | |
| long | sdkSetupIncEncoder (long axis, long encPort, long encRes, long latchType, long latchParam, long latchSlope) |
| Settings for an incremental encoder. More... | |
| long | sdkSetupSinCosEncoder (long axis, long encPort, long encRes, long latchType, long latchParam, long latchSlope) |
| Settings for an SinCos encoder. More... | |
| long | sdkSetupAbsSSIEncoder (long axis, long encPort, long encRes, long clockFreq, long fastUpdate, long datlen, long isBinary, long latchBitMask) |
| Settings for a SSI encoder. More... | |
| long | sdkSetupHallEncoderMACS5 (long axis, long hallPort, long hallAligment) |
| Settings for an hall encoder. More... | |
| long | sdkSetupHallEncoder (long axis, long hallAligment, long hallDirection) |
| Settings for an hall encoder. More... | |
| long sdkSetupAbsSSIEncoder | ( | long | axis, |
| long | encPort, | ||
| long | encRes, | ||
| long | clockFreq, | ||
| long | fastUpdate, | ||
| long | datlen, | ||
| long | isBinary, | ||
| long | latchBitMask | ||
| ) |
Settings for a SSI encoder.
With this function the settings can be made which are required for an SSI encoder. Default is the encoder input 0 of axis 0, the encoder input 1 of axis 1 etc. This function is used to reassign the modules. The encoder assignment can be set up variably.
Example for a latching with a singelturn absSSI encoder:
A latching is performed on an encoder with a resolution of 8192 with the actual value of 2192. At the next overflow (reaching 8192) this value is subtracted by 8192. The last marker value is -6000, after the next turn -14 192 and so on.
| axis | Axis module number |
| encPort | Encoder port number. Usually, module instance 0 is connected to X1 and so on. Please refer to product manual |
| encRes | Resolution of the encoder for position feed back in increments (quadcounts) |
| clockFreq | Clock frequency of the SSI encoder (Hz) |
| fastUpdate | The fast update is only necessary, when the motor commutation is done with this encoder (PMSM mode) fastUpdate 0: The encoder is updated with the velocity controller update rate (8 kHz on MiniMACS6) fastUpdate 1: The encoder is updated with the current controller update rate (24 kHz on MiniMACS6) |
| datlen | Databit length of endat position |
| isBinary | 1 if data coding is binary otherwise it is gray coded. |
| latchBitMask | The result from VIRTLATCH_PISRC_LATCHVALID will be ANDed with this bitmask to decide if a latch should be accepted. In this function the virtual input module is set as source. This is linked to the hardware digital inputs by default. |
Definition at line 179 of file SDK_Encoder_Setup.mc.
| long sdkSetupHallEncoder | ( | long | axis, |
| long | hallAligment, | ||
| long | hallDirection | ||
| ) |
Settings for an hall encoder.
With this function the settings can be made which are required for use hall encoder only.
| axis | Axis module number |
| hallAligment | Hall aligment. See SDO Dictionary Index: 4000, SubIndex: 88 |
| hallDirection | Direction of rotation of the hall signals hallDirection 1: Normal hallDirection -1: Inverse (For example Maxon) |
Definition at line 275 of file SDK_Encoder_Setup.mc.
| long sdkSetupHallEncoderMACS5 | ( | long | axis, |
| long | hallPort, | ||
| long | hallAligment | ||
| ) |
Settings for an hall encoder.
With this function the settings can be made which are required for an hall encoder. This function only valid for a MACS5 controller
| axis | Axis module number |
| hallPort | Hall port number |
| hallAligment | Hall aligment. See SDO Dictionary Index: 4000, SubIndex: 88 |
Definition at line 237 of file SDK_Encoder_Setup.mc.
| long sdkSetupIncEncoder | ( | long | axis, |
| long | encPort, | ||
| long | encRes, | ||
| long | latchType, | ||
| long | latchParam, | ||
| long | latchSlope | ||
| ) |
Settings for an incremental encoder.
With this function the settings can be made which are required for an incremental encoder. Default is the encoder input 0 of axis 0, the encoder input 1 of axis 1 etc. This function is used to reassign the modules. The encoder assignment can be set up variably.
| axis | Axis module number |
| encPort | Encoder port number. Usually, module instance 0 is connected to X1 and so on. Please refer to product manual |
| encRes | Resolution of the encoder for position feed back in increments (quadcounts) |
| latchType | Defines the latch type 0: Default latchTyp Encoder Z signal 1: A digital input is used as latch signal |
| latchParam | Parameter depending on the latch type latchType 0: Parameter can be set to 0 latchType 1: The preferred digital input is set (Digital input 1 - 64) |
| latchSlope | Defines the slope of the trigger signal (Default 1) 0 HWLATCH_SLOPE_CONTINUOUS: Continuous trigger signal 1 HWLATCH_SLOPE_RISING: Rising trigger signal 2 HWLATCH_SLOPE_FALLING: Falling trigger signal 3 HWLATCH_SLOPE_BOTH: Rising/ Falling trigger signal |
Definition at line 43 of file SDK_Encoder_Setup.mc.
| long sdkSetupSinCosEncoder | ( | long | axis, |
| long | encPort, | ||
| long | encRes, | ||
| long | latchType, | ||
| long | latchParam, | ||
| long | latchSlope | ||
| ) |
Settings for an SinCos encoder.
With this function the settings can be made which are required for an SinCos encoder. Default is the encoder input 0 of axis 0, the encoder input 1 of axis 1 etc. This function is used to reassign the modules. The encoder assignment can be set up variably.
| axis | Axis module number |
| encPort | Encoder port number. Usually, module instance 0 is connected to X1 and so on. Please refer to product manual |
| encRes | Resolution of the encoder for position feed back in increments (quadcounts) Input must be multiplied by a factor of 256. |
| latchType | Defines the latch type 0: Default latchTyp Encoder Z signal 1: A digital input is used as latch signal |
| latchParam | Parameter depending on the latch type latchType 0: Parameter can be set to 0 latchType 1: The preferred digital input is set (Digital input 1 - 64) |
| latchSlope | Defines the slope of the trigger signal (Default 1) 0 HWLATCH_SLOPE_CONTINUOUS: Continuous trigger signal 1 HWLATCH_SLOPE_RISING: Rising trigger signal 2 HWLATCH_SLOPE_FALLING: Falling trigger signal 3 HWLATCH_SLOPE_BOTH: Rising/ Falling trigger signal |
Definition at line 110 of file SDK_Encoder_Setup.mc.