Autor Thema: Conditions in profiles to activate macros  (Gelesen 4044 mal)

Offline ebarra

  • Senior-Mitglied
  • Beiträge: 239
  • Ort: Monaco Ort bei GoogleMaps suchen mc
Conditions in profiles to activate macros
« am: 20. Oktober 2023, 17:17:16 »
Hi everyone,
Her is my question:
if a condition in a profile line is fulfilled and it calls a macro would the system:
1) run the given macro?
2) Once the macro completed return to the next line of the profile and complete the following lines?

It might sounds complex , so I attached a screen shot showing the mentionned profile / macro?

3) Any reason for this to not work the way I describe it?
Thanks for any coments?

Regards.
Eric.
nota this is using WDGP 2018 premium.

Zu diesem Beitrag gehören 1 Anhäng(e). Um diese zu sehen oder zum Download müssen Sie sich einloggen.
  • Win-Digipet-Version:
    2015
  • Anlagenkonfiguration:
    Intellibox and simultaneous 2 and 3 rails.

Offline Markus Herzog

  • Administrator
  • Senior-Mitglied
  • Beiträge: 16899
  • Ort: Rheinland Ort bei GoogleMaps suchen de
  • WDP-Entwickler
Re: Conditions in profiles to activate macros
« Antwort #1 am: 20. Oktober 2023, 23:52:53 »
Hi Eric,

I don´t see any reason why this should not work.

Regards
Markus
  • Win-Digipet-Version:
    WDP 2021.x Beta
  • Anlagenkonfiguration:
    3-Leiter Anlage, Rollendes Material Märklin/Roco/Brawa/Mehano, Fahren: DCC, m3 via Tams MC, Schalten/Melden: Selectrix, BiDiB, Motorola (nur wenige Sonderaufgaben)
  • Rechnerkonfiguration:
    Intel i7

Offline ebarra

  • Senior-Mitglied
  • Beiträge: 239
  • Ort: Monaco Ort bei GoogleMaps suchen mc
Re: Conditions in profiles to activate macros
« Antwort #2 am: 21. Oktober 2023, 07:54:32 »
Hi Markus,
Thanks for your reply,
Can you also also confirm that step 2 described is also valid ?
I mean nothing should begin in the profile’s line following the call to the macro until this one is completed ?
Thanks.
Eric
  • Win-Digipet-Version:
    2015
  • Anlagenkonfiguration:
    Intellibox and simultaneous 2 and 3 rails.

Offline ebarra

  • Senior-Mitglied
  • Beiträge: 239
  • Ort: Monaco Ort bei GoogleMaps suchen mc
Re: Conditions in profiles to activate macros
« Antwort #3 am: 28. Oktober 2023, 00:00:28 »
Hi Markus,
following your reply I pushed my investigations to understand why the macros is not executed when a line condition seems to be fullfilled.
1) the Macro I am trying through a logical test in the profile line works perfectly well when called from one of the loco function. In addition I am turning green and red a signal in order to double check it is active or not.

2) Having run some logical tests (I haven't test all of them) it appears that the test being made on some matrix
 elements  gives coherent logic positive results when tested but the macro is not activated.
I then did then run the test with a basic occupied function shown positive results and the macro was was activated.

3) you will see on the pictures attached:
    ° How I renamed the criterias of the 3rd and 4th columns of the matrix system configuration.
    ° the two tests run with no results while verification was positive (circled in red)
    ° the working test which did run the macro as expected. (circled in green)

Apparently the logical test made on the matrix seems to not work propoerly.

Note: the line calling the macro 35 was updated and saved for each configuration (not represented on the picture).

Can you investigate in your code why the logic test is positive but the macro not activated with matrix elements tested?

Tahnks in advance.
Best regards.

 

Zu diesem Beitrag gehören 2 Anhäng(e). Um diese zu sehen oder zum Download müssen Sie sich einloggen.
  • Win-Digipet-Version:
    2015
  • Anlagenkonfiguration:
    Intellibox and simultaneous 2 and 3 rails.

Offline Markus Herzog

  • Administrator
  • Senior-Mitglied
  • Beiträge: 16899
  • Ort: Rheinland Ort bei GoogleMaps suchen de
  • WDP-Entwickler
Re: Conditions in profiles to activate macros
« Antwort #4 am: 28. Oktober 2023, 09:13:00 »
Hi Eric,

your condition ist not correct. You are testing the vehicle/train on this train number display 022, but in Win-Digipet logic is transferred to the destination contact 042 at the start of the route. So you have to change your condition to this train number display.
Or just change the train number display in the condition to 0. This should result in testing the loco/train using the route/profile regardless of its current position (should already possible in 2018.2d, but I can only say it for sure for 2021).

Regards
Markus
  • Win-Digipet-Version:
    WDP 2021.x Beta
  • Anlagenkonfiguration:
    3-Leiter Anlage, Rollendes Material Märklin/Roco/Brawa/Mehano, Fahren: DCC, m3 via Tams MC, Schalten/Melden: Selectrix, BiDiB, Motorola (nur wenige Sonderaufgaben)
  • Rechnerkonfiguration:
    Intel i7

Offline ebarra

  • Senior-Mitglied
  • Beiträge: 239
  • Ort: Monaco Ort bei GoogleMaps suchen mc
Re: Conditions in profiles to activate macros
« Antwort #5 am: 29. Oktober 2023, 00:53:17 »
Markus,
Many thanks for your reply and explanations.
I will test it A.S.A.P
2021 order is on its way to.
Best regards.
  • Win-Digipet-Version:
    2015
  • Anlagenkonfiguration:
    Intellibox and simultaneous 2 and 3 rails.