From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

how to print variable to the channel

Hello Friends,

 

i am  a fish in diadem, now i have a problem with the script. I want the two variable Gefaellsstecke and Steigungsstecke

 to export in the channel. All of the variables are definited. The following is my programm. Thank you very much for the help.

 

 kanalname =

"[4]/Speed"

kanalname1 =

"[2]/Altitude"

kanalname2 =

"[4]/Zeitkanal"

kanallaenge =

ChnPropValGet(kanalname, "length")

kanallaenge1 =

ChnPropValGet(kanalname1, "length")

kanallaenge2 =

ChnPropValGet(kanalname2, "length")

For

i=1tokanallaenge

 

For j=1tokanallaenge2

 

For k=1tokanallaenge1

v=

CHD(i,kanalname)

zeit=

CHD(j,kanalname2)

zeit1=

CHD(j+1,kanalname2)

wert=

CHD(k,kanalname1)

wert1=

CHD(k+1,kanalname1)

 

If wert1-wert >0Then

Steigungsstecke= v*(zeit1-zeit)

If wert1-wert<0Then

Gefaellsstecke= v*(zeit1-zeit)

EndIf

EndIf

i=i+

1

j=j+

1

k=k+1

Next

Next

Next

0 Kudos
Message 1 of 2
(4,123 Views)

I habe solved this problem. Thank you everyone!Smiley Happy

0 Kudos
Message 2 of 2
(4,099 Views)