Autor Thema: IF-OR-THEN programming??  (Gelesen 2626 mal)

Offline Per Olsen

  • Senior-Mitglied
  • Beiträge: 572
  • Ort: Bergen, Norway Ort bei GoogleMaps suchen no
IF-OR-THEN programming??
« am: 07. Januar 2006, 09:35:41 »
Hello !

"Deep" in routes/zugfahrten/automatic-programming, I have discovered that I need something extra. Well, it MIGHT be there somewhere, but I haven't found it yet.  Maybe you can help me..?

In "Zugfahrten-Automatic-Editor", there are some AND-conditions available.  As f.ex. "Nur, wenn ruckmeldekontakte.." and "Nur, wenn Magnetartikel-Stellungen.." and "Nur, wenn Lok mit Farbe.." etc.

All these are "IF-AND-THEN" conditions.  I mean, if you put in more than 1, the program really asks "If _this_ AND _that_ AND _next_ etc, is true, THAN the zugfahrt/route will be switched.  

All this is VERY fine and VERY useful!

But now I am in a position where a need a lot of IF-OR conditions in addition to all the current IF-ANDs.  Is this possible somewhere, using Zugfahrt-Automatic ?

I need to test "IF track A is free/busy OR track B is free/busy OR track C is free/busy etc, THEN" switch the route/Zugfahrt.
Also "IF Magnetartikel A is red/green OR Magnetartikel B is red/green etc, THEN" switch the route/Zugfart.
Etc.

Best regards,
Per, Bergen, Norway.
         
  • Win-Digipet-Version:
    WinDigiPet 2021
  • Anlagenkonfiguration:
    Tams Master Control.  Maerklin C-tracks. 6xBolls boosters.   2xLittfinski HSI-88 USB.  Bolls RMDs.   Viessmann and Bolls switch-decoders.
  • Rechnerkonfiguration:
    Windows 11 2,7GHz CPU, 16Gb RAM.

Offline Dietloff

  • Senior-Mitglied
  • Beiträge: 1639
  • Ort: Rheinland Ort bei GoogleMaps suchen
Re: IF-OR-THEN programming??
« Antwort #1 am: 09. Januar 2006, 07:49:30 »
Hi Per,

this is quite easy: As you've already mentioned the entries in ONE line are always AND-conditions and the Route or Tour will just be performed if ALL of the entered conditions are TRUE.
To enable OR-conditions simply enter the same line TWICE (or more if necessary) with DIFFERENT conditions.

Regards
Rüdiger
   

Offline Per Olsen

  • Senior-Mitglied
  • Beiträge: 572
  • Ort: Bergen, Norway Ort bei GoogleMaps suchen no
Re: IF-OR-THEN programming??
« Antwort #2 am: 09. Januar 2006, 19:35:30 »
Hello.

Yes, I know this.  I have done this for a long time.  But the number of lines can be very big, like this.  I have very many lines that are inserted 2-4, even 8 times, with different conditions. I would like to reduce the number of lines, and with OR-conditions, I could reduce them a lot.  And also much easier to control and read my own programming.

I can only hope for this to be implemented later.  It can do no harm, only good....

Per.
   
  • Win-Digipet-Version:
    WinDigiPet 2021
  • Anlagenkonfiguration:
    Tams Master Control.  Maerklin C-tracks. 6xBolls boosters.   2xLittfinski HSI-88 USB.  Bolls RMDs.   Viessmann and Bolls switch-decoders.
  • Rechnerkonfiguration:
    Windows 11 2,7GHz CPU, 16Gb RAM.

Offline Dietloff

  • Senior-Mitglied
  • Beiträge: 1639
  • Ort: Rheinland Ort bei GoogleMaps suchen
Re: IF-OR-THEN programming??
« Antwort #3 am: 10. Januar 2006, 07:50:24 »
Hi Per,

let's put it this way: We never say never...
Considering that the German version is around 9 months in advance and up to now nobody asked about a different solution there is obviously no urgent demand right now.

In the way I described you are able to use AND and OR conditions. If you state that it may increase your amount of lines up to 8 times then I assume there would be a different solution to configure it more efficient.
Nevertheless even a max. of 800 lines for one single Tour-automatic seems to be convenient, 'cause nobody obviously touched the limit (yet).

But let's see what the future brings and of course - as usual - we collect also all user needs and wishes for eventually future releases.

Regards
Rüdiger