Press A button Closed

Post Reply
welshdodger
Posts: 18
Joined: 09.10.2014, 08:45
Location: South Wales U.K

Press A button Closed

Post by welshdodger » 04.01.2016, 13:17

Happy New Year to all at Rocrail Forum
I have a query that you might be able to help with
I been doing some work with rocrail Locations and Schedules
All my testing works well
My query is that it takes 3 stages to run each tour or schedules
and if you run 4 or 5 tour or schedules one after each other
it can take a time to get all trains started
Is there a command i can use to combine 3 stages like a push button
push a button for each tour or schedules on the rocrail screen for Go and Stop
it would make a nice feature and much easier to use
thanks
Roger Newton
welshdodger
Last edited by welshdodger on 18.01.2016, 23:17, edited 1 time in total.

cds
Moderator
Posts: 5235
Joined: 03.02.2012, 19:24
Location: Tullnerbach, Austria

Re: Press A button

Post by cds » 04.01.2016, 17:13

Hello Roger!

I am sorry but I do not understand your query.

Could you please provide your plan and explain again using your plan?

smitt48
Moderator
Posts: 6111
Joined: 04.04.2014, 01:07
Location: Kralendijk, Bonaire - Dutch Caribbean

Re: Press A button

Post by smitt48 » 04.01.2016, 18:08

Hi Roger,
My query is that it takes 3 stages to run each tour or schedules
and if you run 4 or 5 tour or schedules one after each other
it can take a time to get all trains started
Can you explain which 3 stages (steps?) do you use?
I do the following:
1. select a block with a train
2. right mouse click and select schedule/tour option
3. select a schedule or a tour
4. start the loco

I agree that are a lot of steps/time if you have 5 trains running (5 * 4 = 20 steps)

Which of the above steps can be eliminated by your proposal?

Do you want a specific schedule for a specific train repeated every time?
You can use http://wiki.rocrail.net/doku.php?id=loc ... artup_tour

Or you can use XML, to start schedules in certain blocks.

You realize that when you uses schedules/tours and end the session correctly, the selected schedules are maintained. You select "resume all locs" in the "Automatic" tab and all trains that had a previous session continue on their way.

Tom

smitt48
Moderator
Posts: 6111
Joined: 04.04.2014, 01:07
Location: Kralendijk, Bonaire - Dutch Caribbean

Re: Press A button

Post by smitt48 » 04.01.2016, 18:57

Hi Roger,

Another option that I just discovered. :oops:
roger.PNG
This kind of eliminates a step or two. You van find under view-loco menu. It brings up a list of schedules /tours for that block.

See if it works for you.

Tom
You do not have the required permissions to view the files attached to this post.

welshdodger
Posts: 18
Joined: 09.10.2014, 08:45
Location: South Wales U.K

Re: Press A button

Post by welshdodger » 05.01.2016, 22:55

Thanks Guys for all your support
up until now I have been running my loco's in (Auto mode) Block to block 3 or 4 loco's looking for the next free block
this system works very well a adjusting blocks what loco can enter or not allowed in the blocks (Aquarium effect)
The Locations systems mixed with the Schedules gives me more control over the Loco and the locality of blocks i can put together
Great it all works Well
I placed a loco in the start position of my schedule
Set (Auto mode) to On
1: Then going back to my Loco on my start schedule
2: Left click the mouse which brings up the menu
3: Right click for Go with tour or schedule
4 :Then back up to Active locos Left click on mouse to open menu then click start
Which is the standard way to start each tour or schedule
Which works well no problems
What i was hoping for was a way to combine some of these operations under ONE Command
using a press A Button on the Screen to start the schedule
Thanks
Roger Newton :beer:

cds
Moderator
Posts: 5235
Joined: 03.02.2012, 19:24
Location: Tullnerbach, Austria

Re: Press A button

Post by cds » 06.01.2016, 10:35

Hello Roger!

Thanks, now I've understood your query.
What i was hoping for was a way to combine some of these operations under ONE Command
using a press A Button on the Screen to start the schedule
Simply add and configure an output (e. g. "A") on your layout. Define and configure an action which starts a schedule. Finally have the action started by pressing the output/button "A" (Output/Properties .../Actions ...).

welshdodger
Posts: 18
Joined: 09.10.2014, 08:45
Location: South Wales U.K

Re: Press A button

Post by welshdodger » 06.01.2016, 20:32

Thanks Guys for Help
I will try add and configure an output and see what i can manage
Not being a computer boffin it will take me some time
but when I or If I get there i let you all know
thanks again
Roger Newton :coding:

smitt48
Moderator
Posts: 6111
Joined: 04.04.2014, 01:07
Location: Kralendijk, Bonaire - Dutch Caribbean

Re: Press A button

Post by smitt48 » 07.01.2016, 02:12

Hi Roger,

I know you wanted a generic button in Rocview. That would have been difficult because everyone has different schedule names and different block names and how many trains did you want to start this way, etc. You realize now that you have to individualize these commands for your layout. The action that follows activates the locos in block B10 and B11 and assigns them a predefined schedule. Here SAL clock, (train runs clockwise) and SAL cclock (trains run counter clockwise).
Step 1, create a (red) output button on the layout, here tied to Block B10
output.PNG
Pushing this button starts an action
Step 2, here is the action an external XML file called test. Put the file in your workspace.
act.PNG
The "usage" tab has the button name here (Output 1).
use.PNG
XML script:
<?xml version="1.0" encoding="utf-8"?>
<xmlscript>
<!--Automode on-->
<auto cmd="on" />
<sleep time="100" />
<!--Start Loc in Block B10-->
<lc bkid="B10" cmd="useschedule" scheduleid="SAL clock test" />
<lc bkid="B10" cmd="go" />
<!--Start Loc in Block B11-->
<lc bkid="B11" cmd="useschedule" scheduleid="SAL cclock" />
<lc bkid="B11" cmd="go" />

</xmlscript>

Trains in Block B10 and B11 start with their respective schedules.
Modify to use your own blocks and schedules.

Tom
You do not have the required permissions to view the files attached to this post.
Last edited by smitt48 on 12.01.2016, 22:53, edited 1 time in total.

welshdodger
Posts: 18
Joined: 09.10.2014, 08:45
Location: South Wales U.K

Re: Press A button

Post by welshdodger » 07.01.2016, 20:25

Thanks Tom
In railways terms the saying( that's the Ticket ) is just what i am looking for
thanks for the coding and help
a good step forward
Thanks Again
Roger Newton :rr_for_ever:

welshdodger
Posts: 18
Joined: 09.10.2014, 08:45
Location: South Wales U.K

Re: Press A button

Post by welshdodger » 12.01.2016, 16:47

Thanks Tom
The code works well
Now you explained that the "SAL" was your name of your schedule
Entered my schedule works well
I intend to put a output Press A button on each of my start block of a schedule
As each schedule has a different Start Block, this makes the visual set up easy to see
all i need to do is turn the green button back to red with a little extra code when schedule completed
then i know quickly when the schedule Stops
This makes the running of my layout much easier
Thanks again Tom
Roger :D

smitt48
Moderator
Posts: 6111
Joined: 04.04.2014, 01:07
Location: Kralendijk, Bonaire - Dutch Caribbean

Re: Press A button

Post by smitt48 » 12.01.2016, 22:56

Hi Roger,

Thanks, glad I could help!

Please close your post, by selecting edit on your original post and prefixing the subject with (closed) or (solved) etc.

Tom

welshdodger
Posts: 18
Joined: 09.10.2014, 08:45
Location: South Wales U.K

Re: Press A button

Post by welshdodger » 15.01.2016, 23:43

Thanks tom
For your XML script
Just to let you know that i have 5 schedules working using your XML code
All working using the toggle switch on the output command. Press the red button it turns to green and the schedule runs

Is there a way with your XMl script code when the schedule finished the now green button can turn back to red
thanks for all your help
Roger Newton :?

smitt48
Moderator
Posts: 6111
Joined: 04.04.2014, 01:07
Location: Kralendijk, Bonaire - Dutch Caribbean

Re: Press A button Closed

Post by smitt48 » 21.01.2016, 16:09

Hi Roger,

I read this in the German Forum, maybe you can add an action to your schedule to light a light bulb, to indicate the schedule is done.

http://forum.rocrail.net/viewtopic.php? ... 11#p109311

Tom

Post Reply

Return to “Smalltalk”