Jump to content

Recommended Posts

Posted

The event "Variable Is Changed" looks for a value. How do I make it trip for ANY value. Or more specifically, if it is a text variable how do I make it trip if I don't care about the actual content of the variable at that point?

Posted

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

 

Posted (edited)

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.

Event
var is changed 1.jpg

Conditions
var is changed 2.jpg

Actions
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,

Henry

Edited by Henry
something
Posted

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.

 

Posted
Am ‎11‎.‎09‎.‎2016 um 17:05 schrieb trevor:

How do I make it trip for ANY value.

By entering the variable's name in the field where the value is expected.

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...