![]() |
CCAux
2.17.0.0
CCAux API reference
|
Functions | |
EXTERN_C CCAUXDLL_API CFGINHANDLE CCAUXDLL_CALLING_CONV | GetCfgIn (void) |
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV | CfgIn_release (CFGINHANDLE) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | CfgIn_setCfgInMode (CFGINHANDLE, uint8_t channel, CfgInModeEnum set_mode) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | CfgIn_getCfgInMode (CFGINHANDLE, uint8_t channel, CfgInModeEnum *get_mode) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | CfgIn_getValue (CFGINHANDLE, uint8_t channel, uint16_t *sample_value) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | CfgIn_getPwmValue (CFGINHANDLE, uint8_t channel, float32_t *frequency, uint8_t *duty_cycle) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | CfgIn_getFrequencyValue (CFGINHANDLE, uint8_t channel, float32_t *frequency) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | CfgIn_getMinFrequencyThreshold (CFGINHANDLE, uint8_t channel, float32_t *frequency) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | CfgIn_setMinFrequencyThreshold (CFGINHANDLE, uint8_t channel, float32_t frequency) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | CfgIn_setFrequencyFilterLevel (CFGINHANDLE, uint8_t level) |
Functions in the CfgIn class
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CfgIn_getCfgInMode | ( | CFGINHANDLE | , |
uint8_t | channel, | ||
CfgInModeEnum * | get_mode | ||
) |
Get Configurable Input mode
Supported Platform(s): VC, VA, VS, VI2
channel | Which configurable input channel to use, 1-2 (VC), 1-8 (VA), 1 (VS) or 1-4 (VI2) corresponding to physical input channel |
get_mode | Storage container for retreived mode Configurable input can be set to different measurement modes, this reads the setting back |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CfgIn_getFrequencyValue | ( | CFGINHANDLE | , |
uint8_t | channel, | ||
float32_t * | frequency | ||
) |
Read the sampled frequency value from configurable input, when in frequency mode:
VA: For ports 1-4, time base is 72 MHz ± 100 ppm (more accurate) For ports 5-8, time base is 60 kHz ± 100 ppm (less accurate) Input range is 0 Hz – 15 kHz. See technical manual for more details.
VA: For all ports 1-8: CFGIN_FREQ_PD_5V - sample_value in Hz CFGIN_FREQ_PD_10V - sample_value in Hz CFGIN_FREQ_PD_32V - sample_value in Hz CFGIN_FREQ_F_5V - sample_value in Hz CFGIN_FREQ_F_10V - sample_value in Hz CFGIN_FREQ_F_32V - sample_value in Hz
VA: For ports 5-8 only: CFGIN_FREQ_PU_5V - sample_value in Hz CFGIN_FREQ_PU_10V - sample_value in Hz CFGIN_FREQ_PU_32V - sample_value in Hz
VS: Port 1 only - sample_value in Hz
VI2: For ports 1-4 time base is 48 Mz ±100 ppm Input range is 0.1 Hz - 50 kHz. See technical manual for more details.
VI2: For all ports 1-4: CFGIN_FREQ_FLOATING - sample_value in Hz CFGIN_FREQ_PULLUP - sample_value in Hz CFGIN_FREQ_PULLDOWN - sample_value in Hz
Supported Platform(s): VA, VS, VI2
channel | Which configurable input channel to use, 1 through 8, corresponding to physical input channel |
frequency | Read signal frequency in Hz; signal resolution and range depending on mode and port |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CfgIn_getMinFrequencyThreshold | ( | CFGINHANDLE | , |
uint8_t | channel, | ||
float32_t * | frequency | ||
) |
Read the configured minimum frequency threshold for configurable input, when in frequency measurement mode (CFGIN_FREQ_FLOATING, CFGIN_FREQ_PULLUP, CFGIN_FREQ_PULLDOWN for VC and VI2, and CFGIN_FREQ_PD_5V, CFGIN_FREQ_PD_10V, CFGIN_FREQ_PD_32V, CFGIN_FREQ_F_5V, CFGIN_FREQ_F_10V, CFGIN_FREQ_F_32V, CFGIN_FREQ_PU_5V, CFGIN_FREQ_PU_10V, CFGIN_FREQ_PU_32V for VA). The frequency threshold is set to 1Hz at device start-up. Use the frequency threshold to set up how fast to detect
a frequency change or a static signal. If you know the frequency range of the measured signal - set the threshold slightly lower than this. That way, a change from pulses to a static signal is detected as fast as possible. If the frequency threshold is set to e.g. 0.1Hz, it can take up to 10 seconds before a change in frequency is detected - also depending on the actual frequency of the signal. For VC, when the measured signal is slower than the frequency threshold, CfgIn_getPwmValue will return frequency 0Hz, duty cycle 0 or 100%. For VA, when the measured signal is slower than the frequency threshold, CfgIn_getFrequencyValue will return frequency 0 Hz. For VS, this function/setting only applies for input channel 1.
Supported Platform(s): VC, VA, VS, VI2
channel | Which configurable input channel to use, 1-2 (VC), 1-8 (VA), 1 (VS) or 1-4 (VI2), corresponding to physical input channel |
frequency | Minimum frequency threshold, 0.0 - 50000.0 Hz for VC and VS, 0 - 15000 Hz for VA. |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CfgIn_getPwmValue | ( | CFGINHANDLE | , |
uint8_t | channel, | ||
float32_t * | frequency, | ||
uint8_t * | duty_cycle | ||
) |
Read the sampled value from configurable input, when in frequency measurement mode (CFGIN_FREQ_FLOATING, CFGIN_FREQ_PULLUP, CFGIN_FREQ_PULLDOWN).
Supported Platform(s): VC, VA
channel | Which configurable input channel to use, 1 or 2, corresponding to physical input channel |
frequency | Read signal frequency, 0.0 - 50000.0 Hz |
duty_cycle | Read signal duty cycle, 0-100% |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CfgIn_getValue | ( | CFGINHANDLE | , |
uint8_t | channel, | ||
uint16_t * | sample_value | ||
) |
Read the sampled value from configurable input, when in modes other than frequency mode:
For VC plaform: CFGIN_HI_SWITCH - sample_value is 0-1 CFGIN_LOW_SWITCH - sample_value is 0-1 CFGIN_VOLTAGE_2V5 - sample_value is 0-30000 (0.1mV steps) CFGIN_VOLTAGE_5V - sample_value is 0-60000 (0.1mV steps) CFGIN_RESISTANCE - sample_value is 0-65535 Ohm
For VA platform, all ports 1-8: CFGIN_CURRENT_4_20 - sample_value in µA, accuracy ± 0.5% ± 50 µA (typical) CFGIN_VOLTAGE_5V - sample_value in mV, accuracy ± 0.5% ± 5 mV (typical) CFGIN_VOLTAGE_10V - sample_value in mV, accuracy ± 0.5% ± 10 mV (typical) CFGIN_VOLTAGE_32V - sample_value in mV, accuracy ± 0.5% ± 32 mV (typical) CFGIN_DIGITAL_PD_5V - sample_value is 0-1 CFGIN_DIGITAL_PD_10V - sample_value is 0-1 CFGIN_DIGITAL_PD_32V - sample_value is 0-1 CFGIN_DIGITAL_F_5V - sample_value is 0-1 CFGIN_DIGITAL_F_10V - sample_value is 0-1 CFGIN_DIGITAL_F_32V - sample_value is 0-1
For VA platform, ports 1-4 only: CFGIN_RESISTANCE - sample_value in Ohm, accuracy ± 0.5% ± 5 Ohm (typical) CFGIN_RESISTANCE_500 - sample_value in 0.1 Ohm/bit, accuracy ± 0.5% ± 0.5 Ohm (typical)
For VA platform, ports 5-8 only: CFGIN_DIGITAL_PU_5V - sample_value is 0-1 CFGIN_DIGITAL_PU_10V - sample_value is 0-1 CFGIN_DIGITAL_PU_32V - sample_value is 0-1
For VS platform, input 1-2 in any mode: sample_value in mV.
For VI2 platform, all ports 1-4: CFGIN_HI_SWITCH - sample_value is 0-1 CFGIN_LOW_SWITCH - sample_value is 0-1 CFGIN_VOLTAGE_5V - sample_value is 0-5500 (1mV steps) CFGIN_RESISTANCE - sample_value is 0-500 (0.01 Ohm steps)
Supported Platform(s): VC, VA, VS, VI2
channel | Which configurable input channel to use, 1-2 (VC), 1-8 (VA), 1 (VS) or 1-4 (VI2), corresponding to physical input channel |
sample_value | Read value which is relevant to actual mode setting The actual value is dependent on the mode setting |
Example Usage:
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CrossControl::CfgIn_release | ( | CFGINHANDLE | ) |
Delete the CfgIn object.
Supported Platform(s): VC, VA, VS, VI2
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CfgIn_setCfgInMode | ( | CFGINHANDLE | , |
uint8_t | channel, | ||
CfgInModeEnum | set_mode | ||
) |
Set Configurable Input mode
Supported Platform(s): VC, VA, VS, VI2
channel | Which configurable input channel to use, 1-2 (VC), 1-8 (VA), 1 (VS) or 1-4 (VI2), corresponding to physical input channel |
set_mode | Which mode to set Configurable input can be set to different measurement modes. See CfgInModeEnum for a description of which platform and input combinations are possible. |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CfgIn_setFrequencyFilterLevel | ( | CFGINHANDLE | , |
uint8_t | level | ||
) |
Sets the weight of the old sample value in frequency measurements as a percentage. The sampled frequency is filtered with a moving average. A large weight increases the filter level and gives better accuracy in high frequency measurements, but decreases the speed of which changes in the input frequency can be detected.
Supported Platform(s): VC, VA
level | Weight of the old sample value as a percentage (0-99) |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CfgIn_setMinFrequencyThreshold | ( | CFGINHANDLE | , |
uint8_t | channel, | ||
float32_t | frequency | ||
) |
Set the minimum frequency threshold for configurable input, when in frequency measurement mode (CFGIN_FREQ_FLOATING, CFGIN_FREQ_PULLUP, CFGIN_FREQ_PULLDOWN for VC and VI2, and CFGIN_FREQ_PD_5V, CFGIN_FREQ_PD_10V, CFGIN_FREQ_PD_32V, CFGIN_FREQ_F_5V, CFGIN_FREQ_F_10V, CFGIN_FREQ_F_32V, CFGIN_FREQ_PU_5V, CFGIN_FREQ_PU_10V, CFGIN_FREQ_PU_32V for VA). The frequency threshold is set to 1Hz at device start-up. Use the frequency threshold to set up how fast to detect
a frequency change or a static signal. If you know the frequency range of the measured signal - set the threshold slightly lower than this. That way, a change from pulses to a static signal is detected as fast as possible. If the frequency threshold is set to e.g. 0.1Hz, it can take up to 10 seconds before a change in frequency is detected - also depending on the actual frequency of the signal. For VC, when the measured signal is slower than the frequency threshold, CfgIn_getPwmValue will return frequency 0Hz, duty cycle 0 or 100%. For VA, when the measured signal is slower than the frequency threshold, CfgIn_getFrequencyValue will return frequency 0 Hz. For VS, this function/setting only applies for input channel 1.
Supported Platform(s): VC, VA, VS, VI2
channel | Which configurable input channel to use, 1-2 (VC), 1-8 (VA), 1 (VS) or 1-4 (VI2), corresponding to physical input channel |
frequency | Minimum frequency threshold, 0.0 - 50000.0 Hz for VC, VS and VI2, 0-15000 Hz for VA. |
Example Usage:
EXTERN_C CCAUXDLL_API CFGINHANDLE CCAUXDLL_CALLING_CONV CrossControl::GetCfgIn | ( | void | ) |
Factory function that creates instances of the CfgIn object.
Supported Platform(s): VC, VA, VS, VI2
Example Usage: