Legacy Hardware and Apps
Channel variables and exponential notation

Hi,

I may be crazy (see above), but it seems impossible to assign channel variable numbers with exponential notation less than 1 (ie. with a negative exponent). eg. 1CV=1E2 1CV 100.0 1CV=1E3 1CV 1000.0

Now fractional values: 1CV=0.1 1CV 0.1 But... with exponential notation, only zero is stored: 1CV=1E-2 1CV 0.0 1CV(FE7) 1CV 0.000000E0

Bug? Feature? Sunday? Also, am I correct that you can't define a polynomial using channel variables for the values? That would be nice!

Chris

Hi, I may be crazy (see above), but it seems impossible to assign channel variable numbers with exponential notation less than 1 (ie. with a negative exponent). eg. 1CV=1E2 1CV 100.0 1CV=1E3 1CV 1000.0 Now fractional values: 1CV=0.1 1CV 0.1 But... with exponential notation, only zero is stored: 1CV=1E-2 1CV 0.0 1CV(FE7) 1CV 0.000000E0 Bug? Feature? Sunday? Also, am I correct that you can't define a polynomial using channel variables for the values? That would be nice! Chris

Hi Chris,

It's a bug. Just put an entry in the data base. In the mean time you will have to use standard format 1CV=0.0001

Not an easy thing to do. You can always build the expression rather than use the polynomial, i.e.:

2CV=1
3CV=2 
4CV=3
1V(=1CV)
5CV=2CV+3CV*1CV^2+4CV*1CV^3

Cheers,
Roger

Hi Chris, It's a bug. Just put an entry in the data base. In the mean time you will have to use standard format 1CV=0.0001 Not an easy thing to do. You can always build the expression rather than use the polynomial, i.e.: ```` 2CV=1 3CV=2 4CV=3 1V(=1CV) 5CV=2CV+3CV*1CV^2+4CV*1CV^3 ```` Cheers, Roger

It's a bug. Just put an entry in the data base.

Cool, do I win a coffee mug or something? smile

In the mean time you will have to use standard format 1CV=0.0001

Yep. I'll probably just do something like 1CV=1 1CV=1CV/1E10

You can always build the expression rather than use the polynomial.

Excellent! That will work fine.

Another question that I can't find an answer to in the manual. Trial and error showed that channel variables can hold values between around 1E16 and 1E-16.

Is there any easy way of extending that range? The constants required for voltage to temperature conversions for thermocouples require smaller values than 1E-16 (ie. type-R is a 9th order polynomial relationship).

Cheers,
Chris.

> It's a bug. Just put an entry in the data base. Cool, do I win a coffee mug or something? :wink: > In the mean time you will have to use standard format 1CV=0.0001 Yep. I'll probably just do something like 1CV=1 1CV=1CV/1E10 > You can always build the expression rather than use the polynomial. Excellent! That will work fine. Another question that I can't find an answer to in the manual. Trial and error showed that channel variables can hold values between around 1E16 and 1E-16. Is there any easy way of extending that range? The constants required for voltage to temperature conversions for thermocouples require smaller values than 1E-16 (ie. type-R is a 9th order polynomial relationship). Cheers, Chris.

Good morning Chris,

The maths in the DT800 is 32 bit and you have hit the limit of a 32 bit floating point number. There is no work around that I know of.

What thermocouple type are you trying to read? (dataTaker support just about all the different thermocouple types) Or are you applying thermocouple corrections to you data?

Cheers,
Roger

Good morning Chris, The maths in the DT800 is 32 bit and you have hit the limit of a 32 bit floating point number. There is no work around that I know of. What thermocouple type are you trying to read? (dataTaker support just about all the different thermocouple types) Or are you applying thermocouple corrections to you data? Cheers, Roger

The maths in the DT800 is 32 bit and you have hit the limit of a 32 bit floating point number. There is no work around that I know of.

Ok, I'm just managing to avoid underflows and overflows with some judicious multiplications and divisions!

What thermocouple type are you trying to read? (dataTaker support just about all the different thermocouple types) Or are you applying thermocouple corrections to you data?

As mentioned in the other thread, I'm generating thermoelectric voltages via the Ao port.

Now for today question.

IF(1CV<1064){[DO"HERE" VO=2CV*3CV]}

When 1CV is less than 1064, I get the text string returned and the voltage is set correctly, but there is no echo to the terminal of the voltage value. If the VO is set outside of the IF, the value is returned to the terminal. How come?

Cheers,
Chris

&gt; The maths in the DT800 is 32 bit and you have hit the limit of a 32 bit floating point number. There is no work around that I know of. Ok, I&#039;m just managing to avoid underflows and overflows with some judicious multiplications and divisions! &gt; What thermocouple type are you trying to read? (dataTaker support just about all the different thermocouple types) Or are you applying thermocouple corrections to you data? As mentioned in the other thread, I&#039;m generating thermoelectric voltages via the Ao port. Now for today question. ```` IF(1CV&lt;1064){[DO&quot;HERE&quot; VO=2CV*3CV]} ```` When 1CV is less than 1064, I get the text string returned and the voltage is set correctly, but there is no echo to the terminal of the voltage value. If the VO is set outside of the IF, the value is returned to the terminal. How come? Cheers, Chris

Good afternoon Chris,

What version of firmware in your DT800? There was a bug fix in 4.04 that might help. (Current firmware is 4.10). You could type adding a dummy read in your statement to force the analog section to read (Add 1V in the line.)

It might also be something to do with the alarm line, What is that DO"HERE" all about? If that is meant to be a dataTaker DO statement then the syntax is wrong which might stop the code working. It you want an alarm message "Here" the try IF(1CV<1064)"HERE"{[ VO=2CV*3CV]}

Cheers,
Roger

Good afternoon Chris, What version of firmware in your DT800? There was a bug fix in 4.04 that might help. (Current firmware is 4.10). You could type adding a dummy read in your statement to force the analog section to read (Add 1V in the line.) It might also be something to do with the alarm line, What is that DO&quot;HERE&quot; all about? If that is meant to be a dataTaker DO statement then the syntax is wrong which might stop the code working. It you want an alarm message &quot;Here&quot; the try IF(1CV&lt;1064)&quot;HERE&quot;{[ VO=2CV*3CV]} Cheers, Roger
27
5
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft