> From: Jim Wagner
>
> So, are the variables internally determined (for example, from sensors)
while
> the expression is entered by the user such that the symbols (T1, and so
> forth) are just references to the internal variables?
Exactly Jim, currently the configuration allows specifying several variables
(i.e.: "if this track is occupied or that track is occupied set this signal
to red") but I want to make it more flexible for the user by allowing them
to specify an arbitrary logical expression involving an arbitrary number of
inputs (typically track occupancy sensors but expandable to contact
closures, etc.).
Later I will extend the expression processing to support references to
built-in functions such as:
(T1 & VO(T2,1.2))
Where "VO(I,v)" returns true if the value of sensor "I" is greater than
value "v".
Once this mechanism is in place it opens up a lot of flexibility with
minimum code investment on my part and, at the user level, makes it more
"extensible". This allows the railroad signal controller to do things that
I, the designer, didn't anticipate which has always been a goal of mine in
my professional carrier as a software developer. Now, using
microcontrollers, I have to accomplish it in a MUCH smaller container :-)
Cheers,
Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck