¿ªÔÆÌåÓý

Locked Reading the "value" in a block table


 

David,

You posted a while back the following code in order to be able to read the "value" of a given block. I know

1: LogixNG: IQ:AUTO:0002
2: ConditionalNG: IQC:AUTO:0002
3: ! A
4: If Then Else. Execute on change
5: ? If
6: Block "block one" value is equal to "T1234"
7: ! Then
8:
9: ! Else

I don't understand how this works. Is T1234 the string in the "value" column of the block table that it's reading or is it a local variable?
Your program doesn't seem to be complete.


 

Richard,

The If statement is getting the current value from the JMRI Blocks table for block "block one" and seeing if that value matches "T1234". If so, any actions in "Then" are executed. If not, any actions in "Else" are executed.

Note: The ConditionalNG is only executed when the "value" in "block one" has changed.

Dave Sand

----- Original message -----
From: "Richard Trilling via groups.io" <richard.trilling@...>
To: [email protected]
Subject: [jmriusers] Reading the "value" in a block table
Date: Monday, September 02, 2024 4:41 PM

David,

You posted a while back the following code in order to be able to read the "value" of a given block. I know

1: LogixNG: IQ:AUTO:0002
2: ConditionalNG: IQC:AUTO:0002
3: ! A
4: If Then Else. Execute on change
5: ? If
6: Block "block one" value is equal to "T1234"
7: ! Then
8:
9: ! Else

I don't understand how this works. Is T1234 the string in the "value" column of the block table that it's reading or is it a local variable?
Your program doesn't seem to be complete.