Support Forums
Trase system

Dear all,

We use a device from http://www.soilmoisture.com/TDR-Equipment/ (all 3 types) for mesurement 16 channels of water content with time domain reflectometrie system.
How can I control and readout this with a dEX - script at DT85.

Please help me

Dear all, We use a device from http://www.soilmoisture.com/TDR-Equipment/ (all 3 types) for mesurement 16 channels of water content with time domain reflectometrie system. How can I control and readout this with a dEX - script at DT85. Please help me

Hi Renrod,

There is a command protocol for these Trase sensors to retrieve data via SERIAL port.
You can mimic that command in dataTaker SERIAL string.

In dEX you have to write SERIAL string and parsing for this purpose in Manual Channel.

Best regards,
Rudy Gunawan

Hi Renrod, There is a command protocol for these Trase sensors to retrieve data via SERIAL port. You can mimic that command in dataTaker SERIAL string. In dEX you have to write SERIAL string and parsing for this purpose in Manual Channel. Best regards, Rudy Gunawan

Hi Rudy,

Thank you for replay. can you give me a sample for this. i have a code snip for a old version of script:
but can not translate to dex for reading

'JOB=LYSIMET
'COMPILED=2010/08/03 10:10:04
'TYPE=dt80
BEGIN"LYSIMET"
CATTN
'schedule definition
'Host Port Init
PROFILE "HOST_PORT" "FUNCTION"="SERIAL"
PROFILE "HOST_PORT" "FLOW"="NONE"
PROFILE "HOST_PORT" "BPS"="9600"
'Trase Init
90CV=17 'Anzahl der TRASE Multiplexer Kanaele (+1)
91..99CV=0

'Starte Messung ueber Schedule F
93CV(W)=1
'Setze Multiplexer Kanal auf 1
95CV(W)=1
'Fehlerzaeler auf 0
91CV(W)=0
'Power on TRASE 2x
2SERIAL("{\r1\w[250]\r0#P1;}",W)
2SERIAL("{\w[250]\r1\w[250]\r0#P1;}",W)
2SERIAL("{\w[250]#MOD 0;}",W)
'Set TRASE Memory TAG
2SERIAL("{\w[1000]#TAG\034UMS\034;}",W)
'Set Trase Time
1ST(W,=80CV)
2ST(W,=81CV)
3ST(W,=82CV)
2SERIAL("{\w[50]#TIM%02d[82CV]:%02d[81CV]:%02d[80CV];}\w[50]",W)
DO{GF}

'schedule definition
RF"TDR"("B:",ALARMS:OV:100KB,DATA:OV:1MB)20S LOGONF HF
'Get last reading
96CV(W)=99
IF(93CV><2,3){2SERIAL("{\e}{#GTRR,1,0;}\m[0,\034UMS\034,]%f[97CV]\044%f[98CV]\m[0,\034BUR\034,]%d[99CV],%d[96CV]\e\w[100]",=94CV,1)}
'Setze naechsten Kanal wenn erfolgreich
IF(96CV<98){95CV(W)=96CV+1}
'Fehlerzaehler, wenn Antwort fehlerhaft oder keine Antwort
IF(93CV><1,2){96CV(W)=0} 'nicht beim ersten Mal
IF(96CV><99,100){91CV(W)=91CV+1} 'Abfrage ob Fehler
IF(91CV>3){92CV(W)=92CV+1 93CV(W)=3 XG} 'Fehler Abbruch nach 3 Fehlversuchen
IF(92CV>10){93CV(W)=3 XG XI} ' Reset Trase nach 10 Fehlversuchen
'Hilfe zu Channel Variablen
'90CV=Anzahl Multiplexerkanaele +1
'91CV=Fehlerzaeler in der Abfrage
'92CV=Fehlerzaeler fuer Abfragen
'93CV=Status
'94CV=serieller Status
'95CV=Aktueller Kanal
'96CV=Eingelesener Kanal
'97CV=Wassergehalt
'98CV=K-Wert
'99CV=eingelesener digital Wert
'Assign Measurement to static Channel Variable
IF(96CV><1,2){100CV("W1")=97CV 101CV("K1")=98CV}
IF(96CV><2,3){102CV("W2")=97CV 103CV("K2")=98CV}
IF(96CV><3,4){104CV("W3")=97CV 105CV("K3")=98CV}
IF(96CV><4,5){106CV("W4")=97CV 107CV("K4")=98CV}
IF(96CV><5,6){108CV("W5")=97CV 109CV("K5")=98CV}
IF(96CV><6,7){110CV("W6")=97CV 111CV("K6")=98CV}
IF(96CV><7,8){112CV("W7")=97CV 113CV("K7")=98CV}
IF(96CV><8,9){114CV("W8")=97CV 115CV("K8")=98CV}
IF(96CV><9,10){116CV("W9")=97CV 117CV("K9")=98CV}

'Assign Measurement to static Channel Variable
IF(96CV><10,11){118CV("W10")=97CV 119CV("K10")=98CV}
IF(96CV><11,12){120CV("W11")=97CV 121CV("K11")=98CV}
IF(96CV><12,13){122CV("W12")=97CV 123CV("K12")=98CV}
IF(96CV><13,14){124CV("W13")=97CV 125CV("K13")=98CV}
IF(96CV><14,15){126CV("W14")=97CV 127CV("K14")=98CV}
IF(96CV><15,16){128CV("W15")=97CV 129CV("K15")=98CV}
IF(96CV><16,17){130CV("W16")=97CV 131CV("K16")=98CV}
IF(96CV><17,18){132CV("W17")=97CV 133CV("K17")=98CV}
IF(96CV><18,19){134CV("W18")=97CV 135CV("K18")=98CV}
IF(96CV><19,20){136CV("W19")=97CV 137CV("K19")=98CV}

'Assign Measurement to static Channel Variable
IF(96CV><20,21){138CV("W20")=97CV 139CV("K20")=98CV}
IF(96CV><21,22){140CV("W21")=97CV 141CV("K21")=98CV}
IF(96CV><22,23){142CV("W22")=97CV 143CV("K22")=98CV}
IF(96CV><23,24){144CV("W23")=97CV 145CV("K23")=98CV}
IF(96CV><24,25){146CV("W24")=97CV 147CV("K24")=98CV}
IF(96CV><25,26){148CV("W25")=97CV 149CV("K25")=98CV}
IF(96CV><26,27){150CV("W26")=97CV 151CV("K26")=98CV}
IF(96CV><27,28){152CV("W27")=97CV 153CV("K27")=98CV}
IF(96CV><28,29){154CV("W28")=97CV 155CV("K28")=98CV}
IF(96CV><29,30){156CV("W29")=97CV 157CV("K29")=98CV}

'Assign Measurement to static Channel Variable
IF(96CV><30,31){158CV("W30")=97CV 159CV("K30")=98CV}
IF(96CV><31,32){160CV("W31")=97CV 161CV("K31")=98CV}
IF(96CV><32,33){162CV("W32")=97CV 163CV("K32")=98CV}

'Set Multiplexer Channel
IF(95CV<90CV){2SERIAL("{\e}{#MCN%02d[95CV];}\m[,]%d[250CV]",=94CV,3,W)}
'Iniitiate active Channel Measurement
IF(95CV<90CV){2SERIAL("{#MES;}{\e}",=93CV,1,W)}
93CV(W)=2
'Messung fertig wenn kein weiterer Kanal ; if no more channel then mesurement finishd
IF(95CV>90CV){93CV(W)=0 92CV(W)=0 XD XG}

'schedule definition
RG("B:",ALARMS:OV:100KB,DATA:OV:1MB)X LOGONG GG
'Turn TRASE off
2SERIAL("{\r0\w[100]#P0;}",W)
2SERIAL("{\w[250]#P0;}",W)
2SERIAL("{\w[250]#P0;}",W)
2SERIAL("{\w[250]#P0;}",W)
DO{HF CATTN}

After closing this mesurement, i have to put out all Data to rs232 or rs485 for storeing to Webdatabase myDatanet with another device (http://www.microtronics.at/en/products/myDatalogMUC.html), but how can do it ?

Please help me again .

Best regards,
John Renrod

Hi Rudy, Thank you for replay. can you give me a sample for this. i have a code snip for a old version of script: but can not translate to dex for reading &#039;JOB=LYSIMET &#039;COMPILED=2010/08/03 10:10:04 &#039;TYPE=dt80 BEGIN&quot;LYSIMET&quot; CATTN &#039;schedule definition &#039;Host Port Init PROFILE &quot;HOST_PORT&quot; &quot;FUNCTION&quot;=&quot;SERIAL&quot; PROFILE &quot;HOST_PORT&quot; &quot;FLOW&quot;=&quot;NONE&quot; PROFILE &quot;HOST_PORT&quot; &quot;BPS&quot;=&quot;9600&quot; &#039;Trase Init 90CV=17 &#039;Anzahl der TRASE Multiplexer Kanaele (+1) 91..99CV=0 &#039;Starte Messung ueber Schedule F 93CV(W)=1 &#039;Setze Multiplexer Kanal auf 1 95CV(W)=1 &#039;Fehlerzaeler auf 0 91CV(W)=0 &#039;Power on TRASE 2x 2SERIAL(&quot;{\r1\w[250]\r0#P1;}&quot;,W) 2SERIAL(&quot;{\w[250]\r1\w[250]\r0#P1;}&quot;,W) 2SERIAL(&quot;{\w[250]#MOD 0;}&quot;,W) &#039;Set TRASE Memory TAG 2SERIAL(&quot;{\w[1000]#TAG\034UMS\034;}&quot;,W) &#039;Set Trase Time 1ST(W,=80CV) 2ST(W,=81CV) 3ST(W,=82CV) 2SERIAL(&quot;{\w[50]#TIM%02d[82CV]:%02d[81CV]:%02d[80CV];}\w[50]&quot;,W) DO{GF} &#039;schedule definition RF&quot;TDR&quot;(&quot;B:&quot;,ALARMS:OV:100KB,DATA:OV:1MB)20S LOGONF HF &#039;Get last reading 96CV(W)=99 IF(93CV&gt;&lt;2,3){2SERIAL(&quot;{\e}{#GTRR,1,0;}\m[0,\034UMS\034,]%f[97CV]\044%f[98CV]\m[0,\034BUR\034,]%d[99CV],%d[96CV]\e\w[100]&quot;,=94CV,1)} &#039;Setze naechsten Kanal wenn erfolgreich IF(96CV&lt;98){95CV(W)=96CV+1} &#039;Fehlerzaehler, wenn Antwort fehlerhaft oder keine Antwort IF(93CV&gt;&lt;1,2){96CV(W)=0} &#039;nicht beim ersten Mal IF(96CV&gt;&lt;99,100){91CV(W)=91CV+1} &#039;Abfrage ob Fehler IF(91CV&gt;3){92CV(W)=92CV+1 93CV(W)=3 XG} &#039;Fehler Abbruch nach 3 Fehlversuchen IF(92CV&gt;10){93CV(W)=3 XG XI} &#039; Reset Trase nach 10 Fehlversuchen &#039;Hilfe zu Channel Variablen &#039;90CV=Anzahl Multiplexerkanaele +1 &#039;91CV=Fehlerzaeler in der Abfrage &#039;92CV=Fehlerzaeler fuer Abfragen &#039;93CV=Status &#039;94CV=serieller Status &#039;95CV=Aktueller Kanal &#039;96CV=Eingelesener Kanal &#039;97CV=Wassergehalt &#039;98CV=K-Wert &#039;99CV=eingelesener digital Wert &#039;Assign Measurement to static Channel Variable IF(96CV&gt;&lt;1,2){100CV(&quot;W1&quot;)=97CV 101CV(&quot;K1&quot;)=98CV} IF(96CV&gt;&lt;2,3){102CV(&quot;W2&quot;)=97CV 103CV(&quot;K2&quot;)=98CV} IF(96CV&gt;&lt;3,4){104CV(&quot;W3&quot;)=97CV 105CV(&quot;K3&quot;)=98CV} IF(96CV&gt;&lt;4,5){106CV(&quot;W4&quot;)=97CV 107CV(&quot;K4&quot;)=98CV} IF(96CV&gt;&lt;5,6){108CV(&quot;W5&quot;)=97CV 109CV(&quot;K5&quot;)=98CV} IF(96CV&gt;&lt;6,7){110CV(&quot;W6&quot;)=97CV 111CV(&quot;K6&quot;)=98CV} IF(96CV&gt;&lt;7,8){112CV(&quot;W7&quot;)=97CV 113CV(&quot;K7&quot;)=98CV} IF(96CV&gt;&lt;8,9){114CV(&quot;W8&quot;)=97CV 115CV(&quot;K8&quot;)=98CV} IF(96CV&gt;&lt;9,10){116CV(&quot;W9&quot;)=97CV 117CV(&quot;K9&quot;)=98CV} &#039;Assign Measurement to static Channel Variable IF(96CV&gt;&lt;10,11){118CV(&quot;W10&quot;)=97CV 119CV(&quot;K10&quot;)=98CV} IF(96CV&gt;&lt;11,12){120CV(&quot;W11&quot;)=97CV 121CV(&quot;K11&quot;)=98CV} IF(96CV&gt;&lt;12,13){122CV(&quot;W12&quot;)=97CV 123CV(&quot;K12&quot;)=98CV} IF(96CV&gt;&lt;13,14){124CV(&quot;W13&quot;)=97CV 125CV(&quot;K13&quot;)=98CV} IF(96CV&gt;&lt;14,15){126CV(&quot;W14&quot;)=97CV 127CV(&quot;K14&quot;)=98CV} IF(96CV&gt;&lt;15,16){128CV(&quot;W15&quot;)=97CV 129CV(&quot;K15&quot;)=98CV} IF(96CV&gt;&lt;16,17){130CV(&quot;W16&quot;)=97CV 131CV(&quot;K16&quot;)=98CV} IF(96CV&gt;&lt;17,18){132CV(&quot;W17&quot;)=97CV 133CV(&quot;K17&quot;)=98CV} IF(96CV&gt;&lt;18,19){134CV(&quot;W18&quot;)=97CV 135CV(&quot;K18&quot;)=98CV} IF(96CV&gt;&lt;19,20){136CV(&quot;W19&quot;)=97CV 137CV(&quot;K19&quot;)=98CV} &#039;Assign Measurement to static Channel Variable IF(96CV&gt;&lt;20,21){138CV(&quot;W20&quot;)=97CV 139CV(&quot;K20&quot;)=98CV} IF(96CV&gt;&lt;21,22){140CV(&quot;W21&quot;)=97CV 141CV(&quot;K21&quot;)=98CV} IF(96CV&gt;&lt;22,23){142CV(&quot;W22&quot;)=97CV 143CV(&quot;K22&quot;)=98CV} IF(96CV&gt;&lt;23,24){144CV(&quot;W23&quot;)=97CV 145CV(&quot;K23&quot;)=98CV} IF(96CV&gt;&lt;24,25){146CV(&quot;W24&quot;)=97CV 147CV(&quot;K24&quot;)=98CV} IF(96CV&gt;&lt;25,26){148CV(&quot;W25&quot;)=97CV 149CV(&quot;K25&quot;)=98CV} IF(96CV&gt;&lt;26,27){150CV(&quot;W26&quot;)=97CV 151CV(&quot;K26&quot;)=98CV} IF(96CV&gt;&lt;27,28){152CV(&quot;W27&quot;)=97CV 153CV(&quot;K27&quot;)=98CV} IF(96CV&gt;&lt;28,29){154CV(&quot;W28&quot;)=97CV 155CV(&quot;K28&quot;)=98CV} IF(96CV&gt;&lt;29,30){156CV(&quot;W29&quot;)=97CV 157CV(&quot;K29&quot;)=98CV} &#039;Assign Measurement to static Channel Variable IF(96CV&gt;&lt;30,31){158CV(&quot;W30&quot;)=97CV 159CV(&quot;K30&quot;)=98CV} IF(96CV&gt;&lt;31,32){160CV(&quot;W31&quot;)=97CV 161CV(&quot;K31&quot;)=98CV} IF(96CV&gt;&lt;32,33){162CV(&quot;W32&quot;)=97CV 163CV(&quot;K32&quot;)=98CV} &#039;Set Multiplexer Channel IF(95CV&lt;90CV){2SERIAL(&quot;{\e}{#MCN%02d[95CV];}\m[,]%d[250CV]&quot;,=94CV,3,W)} &#039;Iniitiate active Channel Measurement IF(95CV&lt;90CV){2SERIAL(&quot;{#MES;}{\e}&quot;,=93CV,1,W)} 93CV(W)=2 &#039;Messung fertig wenn kein weiterer Kanal ; if no more channel then mesurement finishd IF(95CV&gt;90CV){93CV(W)=0 92CV(W)=0 XD XG} &#039;schedule definition RG(&quot;B:&quot;,ALARMS:OV:100KB,DATA:OV:1MB)X LOGONG GG &#039;Turn TRASE off 2SERIAL(&quot;{\r0\w[100]#P0;}&quot;,W) 2SERIAL(&quot;{\w[250]#P0;}&quot;,W) 2SERIAL(&quot;{\w[250]#P0;}&quot;,W) 2SERIAL(&quot;{\w[250]#P0;}&quot;,W) DO{HF CATTN} After closing this mesurement, i have to put out all Data to rs232 or rs485 for storeing to Webdatabase myDatanet with another device (http://www.microtronics.at/en/products/myDatalogMUC.html), but how can do it ? Please help me again . Best regards, John Renrod

Hi Renrod,

These are the script to control, poll Trase sensor:

'Power on TRASE 2x
2SERIAL("{\r1\w[250]\r0#P1;}",W)
2SERIAL("{\w[250]\r1\w[250]\r0#P1;}",W)
2SERIAL("{\w[250]#MOD 0;}",W)

Every string within {} will be sent to the sensor.
\r1 means set RTS value
\w[250] means wait for 250 ms
\r0 means clear RTS value
'#P1 is the command to turn on Trase


'Set TRASE Memory TAG
2SERIAL("{\w[1000]#TAG\034UMS\034;}",W)

\w[1000] means wait for 1000 ms
'#TAG\034UMS\034 is a command to set memory tag in ASCII (in normal characters: #TAG"UMS")


'Set Trase Time
1ST(W,=80CV)
2ST(W,=81CV)
3ST(W,=82CV)
2SERIAL("{\w[50]#TIM%02d[82CV]:%02d[81CV]:%02d[80CV];}\w[50]",W)

1ST to 3ST are dataTaker system timer for seconds, minutes and hours
\w[50] means wait for 50 ms
'#TIM%02d[82CV]:%02d[81CV]:%02d[80CV] is a command to set date and time to Trase in ASCII (in normal characters: #TIMHH:MM:SS)


'Get last reading
96CV(W)=99
IF(93CV><2,3){2SERIAL("{\e}{#GTRR,1,0;}\m[0,\034UMS\034,]%f[97CV]\044%f[98CV]\m[0,\034BUR\034,]%d[99CV],%d[96CV]\e\w[100]",=94CV,1)}

\e is used to clear memory buffer
'#GTRR,1,0 is a command to trigger data poll
\m[0,\034UMS\034,] will discard "UMS", from of the incoming string
%f[97CV] is one of parsing code which save the next string (after "UMS",) as a floating point into 97CV
\044 will declare a comma character as well as discard it
%f[98CV] is one of parsing code which save the next string (after a comma) as a floating point into 98CV
\m[0,\034BUR\034,] will discard "BUR",
%d[99CV] is one of parsing code which save the next string (after "BUR",) as an integer into 99CV
...

If you want to reuse all of those string in dEX, you need to write them into a manual channel.

Best regards,
Rudy Gunawan

Hi Renrod, These are the script to control, poll Trase sensor: &#039;Power on TRASE 2x 2SERIAL(&quot;{\r1\w[250]\r0#P1;}&quot;,W) 2SERIAL(&quot;{\w[250]\r1\w[250]\r0#P1;}&quot;,W) 2SERIAL(&quot;{\w[250]#MOD 0;}&quot;,W) Every string within {} will be sent to the sensor. \r1 means set RTS value \w[250] means wait for 250 ms \r0 means clear RTS value &#039;#P1 is the command to turn on Trase ------------------------------------------- &#039;Set TRASE Memory TAG 2SERIAL(&quot;{\w[1000]#TAG\034UMS\034;}&quot;,W) \w[1000] means wait for 1000 ms &#039;#TAG\034UMS\034 is a command to set memory tag in ASCII (in normal characters: #TAG&quot;UMS&quot;) ------------------------------------------- &#039;Set Trase Time 1ST(W,=80CV) 2ST(W,=81CV) 3ST(W,=82CV) 2SERIAL(&quot;{\w[50]#TIM%02d[82CV]:%02d[81CV]:%02d[80CV];}\w[50]&quot;,W) 1ST to 3ST are dataTaker system timer for seconds, minutes and hours \w[50] means wait for 50 ms &#039;#TIM%02d[82CV]:%02d[81CV]:%02d[80CV] is a command to set date and time to Trase in ASCII (in normal characters: #TIMHH:MM:SS) ------------------------------------------- &#039;Get last reading 96CV(W)=99 IF(93CV&gt;&lt;2,3){2SERIAL(&quot;{\e}{#GTRR,1,0;}\m[0,\034UMS\034,]%f[97CV]\044%f[98CV]\m[0,\034BUR\034,]%d[99CV],%d[96CV]\e\w[100]&quot;,=94CV,1)} \e is used to clear memory buffer &#039;#GTRR,1,0 is a command to trigger data poll \m[0,\034UMS\034,] will discard &quot;UMS&quot;, from of the incoming string %f[97CV] is one of parsing code which save the next string (after &quot;UMS&quot;,) as a floating point into 97CV \044 will declare a comma character as well as discard it %f[98CV] is one of parsing code which save the next string (after a comma) as a floating point into 98CV \m[0,\034BUR\034,] will discard &quot;BUR&quot;, %d[99CV] is one of parsing code which save the next string (after &quot;BUR&quot;,) as an integer into 99CV ... If you want to reuse all of those string in dEX, you need to write them into a manual channel. Best regards, Rudy Gunawan
16
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