Support Forums
DT80 programming

Hello,

I'm trying to program DT80 to calculate the pitch amplitude and period using periodical data from inclinometer, read by statistical schedule once per second RS1S. Then the data is written by schedule timer in 31CV every 10 seconds RA10S. For pitch amplitude calculation, to find the maximum and write it to channel variable, I use statistical function “Maximum” 31CV(MX,=32CV). For pitch period I try to use statistical function “Time of maximum” 31CV(TMX,=33CV), but it returns the time of maximum in 33CV only in decimal seconds since 1-Jan-1989 with 200 seconds resolution. Is it possible to configure this output in CV to 1 second resolution or to change the output to decimal seconds since midnight?

Hello, I'm trying to program DT80 to calculate the pitch amplitude and period using periodical data from inclinometer, read by statistical schedule once per second RS1S. Then the data is written by schedule timer in 31CV every 10 seconds RA10S. For pitch amplitude calculation, to find the maximum and write it to channel variable, I use statistical function “Maximum” 31CV(MX,=32CV). For pitch period I try to use statistical function “Time of maximum” 31CV(TMX,=33CV), but it returns the time of maximum in 33CV only in decimal seconds since 1-Jan-1989 with 200 seconds resolution. Is it possible to configure this output in CV to 1 second resolution or to change the output to decimal seconds since midnight?

Hi Aleksey,

TMX and TMN will give you the timestamp with 24 hour format with reference to the schedule interval. When you have 10 second reading interval, the max and min values will keep resetting every 10 seconds but the timestamp format remain.

DT85> RS1S RA1M 1TK(MX)(TMX)
Created job "UNTITLED"

DT85> 1TK 18.9 degC (Max)
1TK 16:38:57.000 (Tmx)

1TK 18.9 degC (Max)
1TK 16:39:44.000 (Tmx)

The time will becomes representation of seconds if you try to store it into a CV. However since the reference of seconds is January 1st 1989, you will see 200 at the end of it.

DT85> RS1S RA1M 1TK(MX,=1CV,W)(TMX,=2CV,W) 1..2CV
Created job "UNTITLED"
DT85> 1CV 18.8
2CV 1150044200.0

1CV 18.9
2CV 1150044200.0

That value is not the correct one, not even related to your comment about 200 second resolution. The issue here is because the channel variable is unable to declare the value more than 7 digits (max 16,777,216) while the actual number of seconds is more than 1,150,070,400.

When the CV value reaches 16,777,216, any addition will not be declared correctly.

Best regards,
dataTaker Expert

Hi Aleksey, TMX and TMN will give you the timestamp with 24 hour format with reference to the schedule interval. When you have 10 second reading interval, the max and min values will keep resetting every 10 seconds but the timestamp format remain. ```` DT85> RS1S RA1M 1TK(MX)(TMX) Created job "UNTITLED" DT85> 1TK 18.9 degC (Max) 1TK 16:38:57.000 (Tmx) 1TK 18.9 degC (Max) 1TK 16:39:44.000 (Tmx) ```` The time will becomes representation of seconds if you try to store it into a CV. However since the reference of seconds is January 1st 1989, you will see 200 at the end of it. ```` DT85> RS1S RA1M 1TK(MX,=1CV,W)(TMX,=2CV,W) 1..2CV Created job "UNTITLED" DT85> 1CV 18.8 2CV 1150044200.0 1CV 18.9 2CV 1150044200.0 ```` That value is not the correct one, not even related to your comment about 200 second resolution. The issue here is because the channel variable is unable to declare the value more than 7 digits (max 16,777,216) while the actual number of seconds is more than 1,150,070,400. When the CV value reaches 16,777,216, any addition will not be declared correctly. Best regards, dataTaker Expert

Hello,

Thank you for reply!

As I understood, it is no possible to assign a proper TMX/TMN value to a CV and this timestamp can be output to a terminal screen only.

Is there a way to get this timestamp for further calculation in DT80 schedules, except logging?

Hello, Thank you for reply! As I understood, it is no possible to assign a proper TMX/TMN value to a CV and this timestamp can be output to a terminal screen only. Is there a way to get this timestamp for further calculation in DT80 schedules, except logging?

Hi Aleksey,

While the possibility to capture the time exist, it does not accurate.
You can use a reference channel and integer variable for this purpose.

RA1S

RA5M LOGONA
1TK(MX,=1CV)(TMX,"R1")(TMN,"R2")
1IV=&R1
2IV=&R2

The best method is creating your own statistic, using a formula on channel variable.

2CV("Init for Max",W)=0
3CV("Init for Min",W)=999

RA1S
1TK(=1CV,W)
IF(2CV<1CV){2CV=1CV T(=12CV)}
IF(3CV>1CV){3CV=1CV T(=13CV)}

RB5M LOGONB
2CV("Max")
12CV("Time Max")
3CV("Min")
13CV("Time Min")

2CV(W)=0
3CV(W)=999

The above two program has the same operating process, the difference is the statistical calculation of the first program was done internally (statistical schedule) and the second externally (formula).

Best regards,
dataTaker Expert

Hi Aleksey, While the possibility to capture the time exist, it does not accurate. You can use a reference channel and integer variable for this purpose. ```` RA1S RA5M LOGONA 1TK(MX,=1CV)(TMX,&quot;R1&quot;)(TMN,&quot;R2&quot;) 1IV=&amp;R1 2IV=&amp;R2 ```` The best method is creating your own statistic, using a formula on channel variable. ```` 2CV(&quot;Init for Max&quot;,W)=0 3CV(&quot;Init for Min&quot;,W)=999 RA1S 1TK(=1CV,W) IF(2CV&lt;1CV){2CV=1CV T(=12CV)} IF(3CV&gt;1CV){3CV=1CV T(=13CV)} RB5M LOGONB 2CV(&quot;Max&quot;) 12CV(&quot;Time Max&quot;) 3CV(&quot;Min&quot;) 13CV(&quot;Time Min&quot;) 2CV(W)=0 3CV(W)=999 ```` The above two program has the same operating process, the difference is the statistical calculation of the first program was done internally (statistical schedule) and the second externally (formula). Best regards, dataTaker Expert
31
3
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