Jump to content

Variable Is Changed


Recommended Posts

I'm not sure I understand the question.    I will try to answer.         Train enters track. > Set Variable (Train Present) to 1     /    check variable (Variable is changed checks Train Present for value 1.   result   stop train (Other Track)         train leaves track  > Set variable (train present) to 0     /   (same check as above)  value 0  result, do not stop train (other track)   (this is all done by the same check as above)       It's simple Boolean Algebra.    Hope this helps


Link to comment
Share on other sites

Hi folks,

Please note - 'variable is changed' is an Event and not a condition or query in terms of a condition. It refers to a single specific value to trigger the specified actions under well-known conditions. Therefore, there can be no event that applies to ANY value.

var is changed 1.jpg

var is changed 2.jpg

var is changed  3.jpg


bitte beachten - 'Variable wird geändert' ist ein Ereignis und nicht eine Bedingung oder Frage in Bezug auf eine Bedingung. Es bezieht sich auf einen einzelnen spezifischen Wert, um die angegebenen Aktionen unter wohlbekannten Bedingungen auszulösen. Deshalb kann es kein Ereignis geben, das für IRGENDEINEN Wert gilt.

Regards, Grüße,


Edited by Henry
Link to comment
Share on other sites

Hi yes I do understand the specific value methodology of the function. However I am trying to code a more generic system so that I can reuse as much of it as possible. In my example, the calling event passes a track section name to a common handler function. I did create a work around that uses two variables instead. The variable changed handler then looks up the value from the original variable. It works fine, but seems overly complicated. For  numeric values you can do this by setting the lookup value to <9999999 or some such, but there is no such trick with text values.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...