Support Forums
Invert "state" value

We use a DT80 for monitoring digital state's and the analog inputs also for state value.
Is it posible to invert the values in the program. When we measuring a "1" we must recording a "0"

We use a DT80 for monitoring digital state's and the analog inputs also for state value. Is it posible to invert the values in the program. When we measuring a "1" we must recording a "0"

Hi Frank,

You may assign a variable to hold an inverted value:

RA1M
1DS(=1CV)
IF(1CV==0){2CV=1}
IF(1CV==1){2CV=0}
2CV("Inverted State" )

Best regards,
Rudy Gunawan

Hi Frank, You may assign a variable to hold an inverted value: RA1M 1DS(=1CV) IF(1CV==0){2CV=1} IF(1CV==1){2CV=0} 2CV("Inverted State" ) Best regards, Rudy Gunawan

Hi Frank

Here is another method that uses the span function

Begin

S1=1,0,0,1

RA1S
1DS(S1)
end

Cheers

Roger

Hi Frank Here is another method that uses the span function Begin S1=1,0,0,1 RA1S 1DS(S1) end Cheers Roger
34
3
3
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