Difference between revisions of "Configurable AD Convertor"
(→Receiving Regex Examples) |
|||
Line 42: | Line 42: | ||
! Regex | ! Regex | ||
! RadiMation Readout | ! RadiMation Readout | ||
+ | ! Note | ||
|- | |- | ||
− | | | + | | U_L_N 325 |
− | | (-?[0-9.Ee-]+) | + | | (-?[0-9.,Ee-]+) |
+ | | 325 | ||
+ | | Takes the first number. | ||
+ | |- | ||
+ | | I_L1;12.34 | ||
+ | | ;(-?[0-9.,Ee-]+) | ||
| 12.34 | | 12.34 | ||
+ | | Takes the first number after ";". | ||
+ | |- | ||
+ | | THD_U_L1;;14,5 | ||
+ | | ;;(-?[0-9.,Ee-]+) | ||
+ | | 14.5 | ||
+ | | Takes the first number after ";;". | ||
|- | |- | ||
− | | | + | | AC_FREQ;Channel1;1.23E3 |
− | | | + | | ;*;(-?[0-9.,Ee-]+) |
− | | | + | | 1230 |
+ | | Takes the first number after the appearance of a second ";". | ||
|} | |} | ||
Revision as of 08:02, 6 October 2016
The Configurable AD Convertor device driver is a AD Converter which is supported by RadiMation®.
Reset | The reset code that needs to be send to device. When left blank no command will be send. |
Init | The Init code that needs to be send to device. When left blank no command will be send. |
Get Id | The code that needs to be send to device to get the identification back. A common used SCPI command is *IDN?. When left blank no command will be send. |
Trigger and Reading |
|
Trigger and Reading |
|
Readback example(s)
Receiving Regex Examples
Received information | Regex | RadiMation Readout | Note |
---|---|---|---|
U_L_N 325 | (-?[0-9.,Ee-]+) | 325 | Takes the first number. |
I_L1;12.34 | ;(-?[0-9.,Ee-]+) | 12.34 | Takes the first number after ";". |
THD_U_L1;;14,5 | ;;(-?[0-9.,Ee-]+) | 14.5 | Takes the first number after ";;". |
AC_FREQ;Channel1;1.23E3 | ;*;(-?[0-9.,Ee-]+) | 1230 | Takes the first number after the appearance of a second ";". |
There are situations where the expression "([+-]?[0-9]*\.?[0-9]+([eE][+-]?[0-9]+)?)" is not giving the wanted result. For example "C1:PAVA RMS,16.4E-3 V,OK", when using the expression the result will be 1 instead of 16.4E-3. In the given situation the expression ",([+-]?[0-9]*\.?[0-9]+([eE][+-]?[0-9]+)?)" will give the correct result. Why does this give the correct answer? When searching for the correct value there is a search for ",[value]" instead of "[value]". Why is the "," not in the ()? Because we want RadiMation® to find the value not the value with a "," in front of it. By leaving it outside the "([expression])" it does search for it but it is not part of the decoding of the value.