Switch IDs

Post Reply
PaulD
Posts: 8
Joined: 20.07.2017, 11:53

Switch IDs

Post by PaulD » 01.02.2018, 01:31

Hi,

I am trying to get switch IDs in a script and write it to a text box. I can see how this is done for loco IDs as per the following example

<tx id="tx1" format="the loco id is %lcid%"/>

but I can't get it happening for switch IDs. Is anyone able to provide the correct syntax?

Thanks
Paul

rjversluis
Site Admin
Posts: 41706
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: Switch IDs

Post by rjversluis » 01.02.2018, 07:17

Hi Paul,

if the action is initiated by a switch object you can use %callerid%.

PaulD
Posts: 8
Joined: 20.07.2017, 11:53

Re: Switch IDs

Post by PaulD » 01.02.2018, 08:41

Hi Rob,

Thanks for the reply - the action is actually initiated at system startup. This is what I am trying to do.


<foreach table="swlist">
<sw cmd="straight"/>

<tx id="Status" format="<SWITCH ID HERE>"/>

<while condition="#var1 < 25" max="25">
<sleep time="100"/>
<vr id="var1" value="#var1 + 1"/>
</while>
</foreach>

Basically I need the switchID from swlist.......

Cheers
Paul

rjversluis
Site Admin
Posts: 41706
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: Switch IDs

Post by rjversluis » 01.02.2018, 09:24


PaulD
Posts: 8
Joined: 20.07.2017, 11:53

Re: Switch IDs (SOLVED)

Post by PaulD » 01.02.2018, 11:17

Rob,

Thanks. One of those things that obviously didn't register.

Appreciate your help

Cheers
Paul

Post Reply

Return to “General”