User Tools

Site Tools


users:dagnall53:using_schedules

Index

To help test the code, and gain experience, I have modified a simple schedule created by Jan VanderBorden Test Workspace to illustrate Schedule

This workspace is based around a "Location" (Haarlem) and a schedule of trains.
In the Details, Actions, for this Location object, you will see that when the "scheduleupdate" state is met, Rocrail sends out a lot of actions. Taking just one example:

ACTION "row1" sends the parameter "{L1F0w3T0} Tijd{L0F4w30T0} 60:1{L1T1F0}  spr {L0W103T1F0SC}{}"  
to TEXT object "tx1", which is set to interface "bus 50, Address60, display1.

So, every time the schedule is updated, this code will set up the Top two lines of the OLED on Address 60. It displays Tidj (Time) in the far left column of row 1, and the words " 60:1" in large characters ("font F4") in the middle, and the current time on the top right (line 0) , and "spr" on line 1 far right (Commands L1T1F0 "line 1 tab 1 font 0"). See also:How to send messages to WiRocS OLEDS

NOTE: This example workspace shows "60:1" rather than the station name to help check which display is showing what..
In "proper use" the "60:1" would be replaced with "HAARLEM".

Because the action is called regularly, it can be convenient to change the rocdisplay commands in this action to see how they affect the message.

Action row2 is more complex and uses lots of text variables to show the main timetable.

The text variables are extracted from the schedule by the "scedule.xml" script.

For simplicity in the text all the OLEDS show the same schedule.

There are also two push buttons to test the WiRocS sound effects.


—Expected Node setup—

The workspace expects a WiRocS node with Address 50, and has been tested with up to 3 OLEDS. In my example the node has the name "8266 test Node"

users/dagnall53/using_schedules.txt · Last modified: 2019/05/20 19:09 by dagnall53