¿ªÔÆÌåÓý

Re: WHERE USED doesn't find sensors located in setSensorState statements #logixng


 

Jim,

PR #14140 has been created to implement searching formulas.

Dave Sand



----- Original message -----
From: Dave Sand <ds@...>
Subject: Re: [jmriusers] WHERE USED doesn't find sensors located in setSensorState statements
Date: Thursday, May 29, 2025 1:19 PM

Jim,

Maybe something like this:

LogixNG: Simulate E-14 Signal Mast Logic
?? ConditionalNG: Milw East Bound
????? ! A
???????? If Then Else. Always execute
??????????? ! Then
?????????????? If Then Else. Always execute
????????????????? ! Then
???????????????????? If Then Else. Always execute
??????????????????????? ? If
?????????????????????????? And. Evaluate All
????????????????????????????? ? E1
???????????????????????????????? Turnout T-Hopkins-West is Closed?? <<====
??????????????????????? ? Else_If_1
?????????????????????????? And. Evaluate All
????????????????????????????? ? E1
???????????????????????????????? Turnout T-Hopkins-West is Thrown?? <<====
?? ConditionalNG: Milw West Bound
????? ! A
???????? If Then Else. Always execute
??????????? ! Then
?????????????? Many
????????????????? ! A3
???????????????????? If Then Else. Always execute
??????????????????????? ! Then
?????????????????????????? If Then Else. Always execute
????????????????????????????? ? If
???????????????????????????????? Turnout T-Hopkins-West is Closed?? <<====
????????????????????????????? ? Else_If_1
???????????????????????????????? Turnout T-Hopkins-West is Thrown?? <<====
?? ConditionalNG: Milw West Turnout
????? ! A
???????? If Then Else. Execute on change
??????????? ! Then
?????????????? Set turnout T-Hopkins-West to state Closed?? <<====
??????????? ! Then_1
?????????????? Set turnout T-Hopkins-West to state Thrown?? <<====
?? ConditionalNG: Test formula
????? ! A
???????? Many
??????????? ! A1
?????????????? Digital Formula: test = getTurnoutState("T-Hopkins-West")?? <<====


Dave Sand



----- Original message -----
From: Dave Sand <ds@...>
Subject: Re: [jmriusers] WHERE USED doesn't find sensors located in setSensorState statements
Date: Thursday, May 29, 2025 10:41 AM

Jim,

The Where Used looks for instances of an object, such as a sensor. ?The Digital Formula statements create temporary instances as needed when the text is executed. ?

It might be possible to extend the Where Used to also do a string search on the formula text.

Dave Sand



----- Original message -----
From: "Jim Moomaw - PDX via groups.io" <JMOOMAW_COM=[email protected]>
Subject: [jmriusers] WHERE USED doesn't find sensors located in setSensorState statements
Date: Thursday, May 29, 2025 3:38 AM

I have LogixNG statements using? Digital Formula: setSensorState("69-RWKE",getSensorState("69W-R")).? ?When using WHERE USED to find either of these sensor terms, these instances don't show up.? I assume this is also true for the other getX/SetX functions.? Is this a capability that can be added to WHERE USED in a future release??
?
--
Jim Moomaw
Portland, OR
- Willamette Model Railroad Club (WMRC)
- NMRA, Pacific NW


Join [email protected] to automatically receive all group messages.