Jump to content

Pause-Resume


Recommended Posts

I can't work out how you would have a likely scenario for a controlling  external 'program' that would disable/re-enable the internal program.

 

Could you please explain how you would expect to be in a set up for this to take place.

Link to comment
Share on other sites

 There are moments when running a Railmaster program, that I need to walk away for a bit longer. Currently I let the program just continue in my absence. But I have been wondering, is there something I could devise that just stops the program for the period that I am away and that allows me to resume it when I return. Literally an on screen Pause button (or something similar).

Link to comment
Share on other sites

@Peter

I am almost certain the answer is no.  The problem I have found with stopping programs is that although the program stops, the Loco's keep going, quite often resulting in a collision of some sort, either with another Loco or because a point is set incorrectly and cannot be corrected because the program has been stopped.  

 

I can imagine that pausing, if it was available, would be exactly the same.

Link to comment
Share on other sites

Just to add to what RDS has said. I would think that any pause command would have to be quite sophisticated. As well as pausing the program, you would have to stop all programmed activity i.e locos from continuing their journey. Loco stops would need to be abrupt else different loco deceleration (controlled stop) and subsequent acceleration times on a restart i.e a 90MPH Express versus a 10MPH Shunter could result with the positional synchronisation of locos being corrupted when the program was restarted. This could be significantly compounded if sound locos are deployed as their start up procedures can be somewhat extended time wise and vary from one loco type to another.

.

If LD was a reality, then the pause concept might be deliverable as it might be possible for the feedback from track sensors to dynamically alter the program to reinstate loco position synchronicity.

.

All in all, to me at least, it seems that including such a feature would be difficult to achieve reliably except for the simplest of programs.

Link to comment
Share on other sites

Even so, still one to add to Desirable Features Peter?

 

Yes, I think so.  Peter, just in case you do not know what we mean, do a forum search for the word 'desirable' and this gives you 2 threads, one of which is those features we would like to see in future RailMaster versions.

Link to comment
Share on other sites

I agree with previous comment that to pause a program you would need to freeze frame any moving locos and this is impracticable given decell / acell considerations, but I thought that maybe a program could be paused by stopping each element in turn, but even that doesn't hold water as you may have a train on merry-go-round which isn't due to stop until the end and in any case the sequencing would get all awry as previously stated.

 

Definitely a conundrum for which there is no obvious answer.

Link to comment
Share on other sites

I don't see why a global pause function would be outside the realms of possibility.

 

Essentially on activation the software would be programmed to store the current direction and speed of active locos in memory (temporary table) and then trigger an emergency stop.  On the next activation (i.e. un-pause) the software would just need to loop through the temporary "pause status" table and send instructions to each loco with the original direction/speed and overriding the normal acceleration profile (assuming that is possible).

 

The result might end up a few seconds out of sync if a timed routine had been interrupted but would that normally cause much of a problem?

Link to comment
Share on other sites

... trigger an emergency stop ...

 

I agree and I think an 'emergency stop' is the only way around it with the 'unpause' just starting up again where everything left off.  As you say, it would probably result in a few glitches but as long as we know that would be the outcome, I think it would be a good feature to have.

Link to comment
Share on other sites

  • 1 month later...

I stumbled across the seemingly undocumented  'Pause Message' program function today, and then found this recent thread by searching for 'pause'.

I have a simple program that starts a train from a station with various announcements and much slamming of doors, wheel slip etc, then runs around the outer loop for a given time and then decelerates to a stop with further sound effects and announcements. Of course it doesn't stop at the station but at some random point. I found that by inserting a Pause Message command straight after the departure sequence, followed by the arrival sequence with times following on straight after the time of the Pause command, I can leave the train running round the loop for as long as I like and then click on the message box when the engine reaches a point on the track (determined by experiment) to cause the arrival sequence to run and the train to stop exactly at the platform. I think this is quite a useful feature.

 

Although I didn't try this, I think the pause message box is a modal dialogue box and so would prevent controlling other trains or points manually during the pause, which limits its usefulness. Another approach might be to have separate programs for the departure and arrival sequences, and start the arrival program at the appropriate point on the track. Other manual activities could then take place while the train was circulating.

 

Regards, John

Link to comment
Share on other sites

  • 9 months later...

I have been playing around with the (now undocumented) Pause Command in a program. Like John in the previous post, I thought it might be a useful way of stopping a train precisely at a station platform (and in my case, in the correct position relative to a Kadee uncoupling magnet). I found, however, that although the execution of program steps is suspended at this command until the Enter key is pressed, unfortunately the clock keeps on going. The program clock at the top of the main screen stops at the pause, but as soon as you press Enter, this clock jumps forward to where it would have been if the pause had not occurred. The result is that if there are commands immediately following the Pause command, RM tries to execute as many of them as it can in order to catch up with the clock. This extract from a log.txt file will show what I mean...

 

30/03/17 15:39:56 01:48  Executing: Pause message:Press Enter to continue.

30/03/17 15:39:56 Loading message window

30/03/17 15:40:08 Message displayed: Press Enter to continue. (ProgMsg : RailMaster/ProgramTimer) - Response=6

30/03/17 15:40:08 01:49  Executing: Stop for: 60860 Durham School

30/03/17 15:40:08 01:50  Executing: Stop for: 60860 Durham School

30/03/17 15:40:08 01:52  Executing: F15: Faded Sound on/off for: 60860 Durham School

30/03/17 15:40:09 01:53  Executing: Play sound: C:Program FilesRailMasterSoundsR_DoorsSlam.wav

30/03/17 15:40:09 01:55  Executing: F1: Sound on/off for: 60860 Durham School

30/03/17 15:40:09 01:57  Executing: Play sound: C:Program FilesRailMasterSoundsL_DoorsSlam.wav

30/03/17 15:40:09 01:59  Executing: F15: Faded Sound on/off for: 60860 Durham School

30/03/17 15:40:10 02:01  Executing: Play sound: C:Program FilesRailMasterSoundsL_DoorsSlam.wav

 

The commands from 01:49 to 02:01 (program times) should have been executed spread out over 12 seconds, but the log shows RM executing them all within 2 seconds - 15:40:08 to 15:40:10

 

If the background program clock was suspended as well, then this Pause command would be quite useful.

 

Ray

Link to comment
Share on other sites

This is from a Oct 15 email with RM

 

We have been looking at this area, and the possibility of resuming a program after a short, however there is a minefield regarding loco acceleration and deceleration of currently running locos. We are looking at coming up with something as clever as possible to get a program to neraly where it was when a short occurred.

Link to comment
Share on other sites

Hi Ray

 

After my posting above from 9 months ago, I did encounter the same problem that you describe with the timings after the Pause command - I could do a simple deceleration into the station OK, but any attempt to play sounds after coming to rest failed because they were all executed almost immediately. I tried putting the extra commands in a separate program and chaining to it after the pause, but that made no difference. I think that the Pause should either stop the clock, or alternatively it should increment all the times on the steps after the pause so that they stay in line with the clock time.

 

Regards, John 

Link to comment
Share on other sites

I've now found a rather devious way of making this work. After the Pause command at the end of the first program that sets the train running, add a Set Clock command to set the clock to some time when you won't normally be running trains (eg 04:00:00?). Then put the commands for stopping the train and the associated sounds etc in a separate program, and set that program to run at a scheduled time (eg 04:00:02, allowing a couple of seconds leeway after the clock has been changed for the schedule to be actioned - it doesn't work if you put exactly the same time in the schedule). The second program will then run with correct timings after you press Enter to resume after the Pause. Put a Set Clock - Actual to restore the real time at the end of the second program. You could use different scheduled times to do this for more than one program.

 

Regards, John

Link to comment
Share on other sites

I've now found a rather devious way of making this work. 

You're right - it is devious, but also brilliant. Well done.

Meanwhile, after further experimentation, I find that if I can get the train to "walking pace" close to (within 5 seconds) of the place I want to stop it, then place the pause followed immediately (one second later) by a stop command, then I can leave a gap of 5 seconds after the stop before doing anything else. In that way, the gap I leave "soaks up" the time the clock is running in the background while the Pause message is displayed on the screen.

However, I've added this to the Desirable Features thread in the hope that they can pause the running clock while the message is being displayed.

 

Ray

Link to comment
Share on other sites

Hi Ray

 

I like your idea of inserting a Pause after getting the train down to walking pace in the station, so that it can be stopped at a precise point by pressing Enter. I've now combined this with my idea above so that the first Enter at roughly the right point starts the deceleration sequence into the station, and a second Enter in the station stops the train at the right spot and then plays all the arrival sounds.

 

Regards, John

Link to comment
Share on other sites

Hi Ray

 

I like your idea of inserting a Pause after getting the train down to walking pace in the station, so that it can be stopped at a precise point by pressing Enter. I've now combined this with my idea above so that the first Enter at roughly the right point starts the deceleration sequence into the station, and a second Enter in the station stops the train at the right spot and then plays all the arrival sounds.

 

Regards, John

Hi John,

Have you noticed anything peculiar happening when you hit the Enter key. I find that sometimes I get a message saying that there is a program already running - do I want to abort the current one. Then sometimes, the current program starts again from the beginning. I think I know why. When you select a program to run from the dropdown list on the main screen, then press the Run Program button, this button (in computing terms) "retains the focus". This means that if you press the Enter key at any time after clicking that button, then provided you haven't clicked on anything else in the meantime, pressing the Enter key is the same as clicking that button again with your mouse.

There is a way around this problem - as soon as you have clicked the Run Program button, click on a bit of blank space in the middle of your layout diagram. This will cause the Run Program button to lose the Focus so that pressing the Enter key won't try to run the program again.

By the way, this can also happen if you run such a program from within the program editor.

Ray

Link to comment
Share on other sites

Hi Ray

 

No, I hadn't noticed this, but I understand what you're saying. In fact when I said 'press Enter' I think I've actually been clicking the green tick button in the dialogue box that says 'press Enter to continue', so this would have bypassed the problem that you describe.

 

Regards, John

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...