|
Sets the sampling rate (or the sampling period) for the analog inputs.
-
If you select 5 for the parameter ulTimeBaseUnity, then this function sets the sampling rate, i.e. the number of samples per second.
-
If you select 0 for the parameter ulTimeBaseUnity, then this function sets the sampling period, i.e. the time between two samples.
- Parameters:
-
[in] | ulTimeBase | Time base selection
|
[in] | ulTimeBaseUnity | Unity
|
[in] | ulSamplingRate | Sampling rate or sampling period according to the selected unity
Constraints:
-
Time base of 1MHz with µs unity (ulTimeBase = 0 and ulTimeBaseUnity = 0)
The value of ulSamplingRate must be between 8µs and 65535µs.
-
Time base of 1MHz with Hz unity (ulTimeBase = 0 and ulTimeBaseUnity = 5)
The value of ulSamplingRate must be between 16Hz and 125000Hz.
The result of the operation 1000000/ulSamplingRate must be an integer number (1000000 % ulSamplingRate = 0).
Typical values:
-
125000Hz
-
100000Hz
-
62500Hz
-
50000Hz
-
40000Hz
-
31250Hz
-
25000Hz
-
20000Hz
-
15625Hz
-
12500Hz
-
10000Hz
-
8000Hz
-
6250Hz
-
5000Hz
-
4000Hz
-
3125Hz
-
2500Hz
-
2000Hz
-
1600Hz
-
1250Hz
-
1000Hz
-
100Hz
-
16Hz
-
Time base of 6.4MHz with µs unity (ulTimeBase = 1 and ulTimeBaseUnity = 0)
The value of ulSamplingRate must be between 10µs and 10235µs.
The result of the operation 6.4*ulSamplingRate must be an integer number.
-
Time base of 6.4MHz with Hz unity (ulTimeBase = 1 and ulTimeBaseUnity = 5)
The value of ulSamplingRate must be between 100Hz and 128000Hz.
The result of the operation 64000000/ulSamplingRate must be an integer number (64000000 % ulSamplingRate = 0).
Typical values:
-
128000Hz
-
100000Hz
-
80000Hz
-
64000Hz
-
50000Hz
-
40000Hz
-
32000Hz
-
25000Hz
-
20000Hz
-
16000Hz
-
12800Hz
-
12500Hz
-
10000Hz
-
8000Hz
-
6400Hz
-
6250Hz
-
5000Hz
-
4000Hz
-
3200Hz
-
3125Hz
-
2500Hz
-
2000Hz
-
1600Hz
-
1280Hz
-
1000Hz
-
100Hz
|
[in] | ulOption1 | Reserved. Set to 0 |
[in] | ulOption2 | Reserved. Set to 0 |
[out] | Response | Response of the system
-
iReturnValue
-
0: The remote function performed OK
-
-1: Means an system error occurred
-
-2: Sampling rate time base selection wrong
-
-3: Sampling rate time base unity selection wrong
-
-4: Sampling rate selection wrong
-
-5: Acquisition in progress. Can not change the sampling rate
-
-100: Internal system error occurred. See value of syserrno
-
syserrno system error code (the value of the libc "errno" code)
|
- Return values:
-
| 0 | SOAP_OK |
| Others | See SOAP error |
|