RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

http://wiki.rocrail.net/doku.php?id=roc ... netnode-en
Post Reply
peter&basti
Moderator
Posts: 6216
Joined: 09.01.2012, 22:09
Location: Vienna, Austria

RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by peter&basti » 11.02.2018, 23:21

Hallo Freunde,

bislang wurden die Bahnsteiganzeiger-Displays ja über eine komplette Text/Steuerzeichen-Sequenz aus dem Fahrplan angesteuert, siehe unter anderem hier: http://wiki.rocrail.net/doku.php?id=use ... fp-display

Mit den aktuellen Entwicklungen rund um den Fahrplananzeiger (Minimal- und Node-Red-HTML- Variante) haben sich ganz neue Möglichkeiten ergeben.

Ich leite nun die Bahnsteiganzeiger vollständig aus der Information aus dem Fahrplananzeiger ab. Es liegen im Fahrplananzeiger alle Informationen dynamisch und zum richtigen Zeitpunkt vor und werden dank Rob auch als Variablen bereit gestellt.

Die für die RocDisplay Anzeige notwendigen Steuerzeichen und Symbole werden nun per Script generiert.
rocdisplay.JPG
Ich habe noch nicht alle möglichen Symbole im Script eingebaut, aber der Demoplan läuft in der neuen Version mit den Bahnsteiganzeigern schon mal einwandfrei.
Wer schon Bahnsteiganzeiger hat und dies testen möchte: der Demoplan samt Scripte im Anhang.

Rückfragen gerne an mich.
Attachments
Rocdisplay.zip
(23.92 KiB) Downloaded 33 times

RedTrain
Posts: 718
Joined: 13.10.2012, 19:21
Location: Uetikon am See, Schweiz
Contact:

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by RedTrain » 12.02.2018, 16:44

Hallo Peter

Also das ist schon Hammer, danke für diesen 'Baustein' - Gerrit und Du - richtige HardcoreScripter, seids! :D :thumb_up:
...eine Kamerafahrt durch einen damit ausgerüsteten Bahnhof wäre sicher cool...
Meine Anzeigedingerchen schlummern leider noch in der Schublade..., :arrow: werke zur Zeit am Schattenbhf :roll:

Dagnall
Posts: 266
Joined: 15.05.2015, 14:41

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by Dagnall » 11.02.2019, 21:37

Basti,
I have been looking at the Display, but have trouble with the German translations. :oops:
I have a very simple (iniitial) question.
:?: Does Rocrail build a ASCII message so it can send a "simple" Ascii message to the display,
:?: OR, does Rocrail send a formatting message, noting variables to use etc, and then expect the display to build the actual displayed message?
If (2) where does the display get the destinations/arrival times etc from? :?: :?:

I hope this translates!!.
Many thanks
Dagnall

peter&basti
Moderator
Posts: 6216
Joined: 09.01.2012, 22:09
Location: Vienna, Austria

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by peter&basti » 11.02.2019, 23:08

Hi Dagnall,

its just text, prepared in a text object. All the infomation have to be composed in this text object either by actions or a XML script.
The text object gets a address, via this address the string is pushed to the display controller.
The controller provides the character font and some symbols.
Some control commands are defining the char size and line position, also other features like blinking.
The fonts, symbols, and control commands are part of the controller firmware, developed by Walter.

A special text object with a commo address is the model clock, one text object provides the model time to all connected displays.

All variable Information e.g. Destination Time, Destination, Train Number, is provided in and comes out of the Rocrail Schedules

Dagnall
Posts: 266
Joined: 15.05.2015, 14:41

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by Dagnall » 12.02.2019, 16:03

Peter,
Many thanks, the (Complicated!) DemoScript you provided in the earlier post this has made it much more obvious how the System works.
Can I ask a couple of more clarifications, just to check I have the correct understandings...
(I will not explain what mis-understandings I had :oops: , but you can probably imagine them!!)

I think I have these bits understood OK:
The "Bus" parameter is the RocNode ID
The "Address" parameter is the I2C bus address of the display
The "Display" parameter defines which Line of the display will be written to;

The "Text" Item defines which Display (And Line) will be written to using Bus,Address, Display.
The "Action" identifies a particular "Text" and updates it using "%calleruserdata%"

I have less understanding about these bits:
:?: How does the "Schedule" interact with the Actions, I could not find how this links in your example, but it seems very clever...
:?: Am I correct that there are only three "working Display lines, in your example, BB1-BA-A, B2-BA-A and BB3-BA-A ? (as the other text items do not have populated addresses..? )
:?: :?: (Or are you using BUS=0,Add=0 as a "Send to ALL DISPLAYS EVERYWHERE" command? :idea:

I have my ESP8266 0.96 OLED displays now showing the text, but without the formatting being resolved, so they just show {EB7} 234... I need on work on the formatting to see everything, but I am very happy with the results so far..

peter&basti
Moderator
Posts: 6216
Joined: 09.01.2012, 22:09
Location: Vienna, Austria

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by peter&basti » 12.02.2019, 16:50

Hi Dagnall,
How does the "Schedule" interact with the Actions, I could not find how this links in your example, but it seems very clever...
The Target Destination is the "Location" where the schedule ends.
The intermediate stations are written direct in the schedule line (only used for the departure table, not for the platform display)
The departure time comes also out of the schedule

https://wiki.rocrail.net/doku.php?id=schedules-dest-en

All this information is available via "built in" text variables ( %xxxx%)

https://wiki.rocrail.net/doku.php?id=te ... #variables (Chapter Schedules)
:?: Am I correct that there are only three "working Display lines, in your example, BB1-BA-A, B2-BA-A and BB3-BA-A ? (as the other text items do not have populated addresses..? )
I have only three displays installed on my demo & test board :wink:

One controller can support up to 4 displays
One rocnetnode can support up to 16 controllers

Except the mentioned text objects above, all other text objects in the plan are working areas to compose the text for the display.
so they just show {EB7} 234.
All values in brackets are part of the controller specific firmware !!! Without the RocDisplay Controller it makes no sense to use this specific control sequences.

SmileyVie
Posts: 93
Joined: 13.10.2011, 21:48
Location: Vienna, Austria

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by SmileyVie » 12.02.2019, 23:47

Hello Dagnall,

Peter told me that you are here asking for some help.
You are right - the text between { and } are formating sequences.
Every thing outside of { and } is text to be displayed.
It was choosen like this because the text and format can be easily and flexible handled without the need to adapt something in Rocrail to this specific Display.
The Displaycontroller handle the textmessages in two steps.
First step is to parse the format sequence and the text to the internal bitmapbuffer, because writing to the display in realtime is too slow and due to this it would be possible to miss some text updates. The second step is to write the whole bitmap from the internal buffer to the display.
That allows me to have features like blinking text or alternating text....
I saw that you are working with ESP32 - there you have more ram and flash like in the ATMega 328 and an 8k external i2c fram for fonts,bitmaps and textmodules.
If you have tecnically questions I will try to help, please be patient with me becaue I have not mutch time for my hobby right now.

Best regards
Walter

Dagnall
Posts: 266
Joined: 15.05.2015, 14:41

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by Dagnall » 13.02.2019, 19:42

Peter and Walter Many thanks!
I have managed to implement a simplified version of the display into my ESP8266/ESP32 WiFi node code.
This project started because I wanted to have a display to show if my nodes were connected OK and still talking to Rocrail while they are in the Garden. Then I saw the Rocrail Display stuff and thought it would be good to make my nodes as compatible as possible with "standard" RocRail practice in case anyone else wanted to use it.

Good News. I have got my code working and displaying reasonably well formatted Platform indications. (Tested using the example Peter attached a few messages ago)
It has limitations:
  • I only display in one (special monospaced) font, and have not attempted to do bitmaps.
  • I display the clock "above" the text as I have a standard 0.96 Oled
  • I also display the Rocrail Power status and WiFi signal strength.
  • I have coded for two instances of the Addresses, using 60d and 601d, as these are the ones on the commercially available 0.96" OLEDS.So can have two displays per node. I have to call two instances of my 1306 driver, one for each display, but I think this could be expanded if there were more displays connected. I am not sure if there are limits on how many instances of the driver one can call. - :?: I would be interested to know how you addressed this problem
  • My message parsing is very simplified, I have just implemented two columns, one for the text and one for the time. I have not got any flashing capability (yet!).
  • I display three lines as per your small oled, but could easily add more if needed
  • I update my display at one second intervals, and do get a small momentary flash as the screen rewrites.
I am a bit surprised you needed to go to all that bit bashing trouble with the displays, my code does not seem to be speed limited at all, and I am not missing any messages that I can see. This may be an advantage of using MQTT, as it takes care of all the lower level protocol and transmissions.
In case you are interested, the main purpose of my nodes is
  • To provide "pseudo" PI02 and PI03 interfaces to drive points servos, platform lights and detect trains using hall sensors.
  • I have stretched the code so it also works as a Loco decoder, with sound synchronized to speed (4 phase chuffs), plus a second audio simultaneous track for Bells, whistles, toots, brake squeal etc.
  • I have retained the sound capability in the stationary "station" nodes, so could use it to play Announcements, but have not tried this yet. My sound implementation for the stations so far has been to provide "internal" node addresses that initiate playing of specific sound files.
  • The esp8266 versions have 6 spare IO when used with the Display and sound.
  • The new Esp32 version has 16 "spare Pio2/Pio3 when used with the display and sounds
Thanks again for taking the time to comment in the forum, I plan to do more of a write up on my user pages if you are interested.
Dagnall
IMG_2635.JPG
OLED, Speaker and ESP8266 on Motor shield to give a convenient set of pin-outs

RedTrain
Posts: 718
Joined: 13.10.2012, 19:21
Location: Uetikon am See, Schweiz
Contact:

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by RedTrain » 13.02.2019, 21:36

Dagnall wrote:
13.02.2019, 19:42
... I plan to do more of a write up on my user pages if you are interested...
Hello Dagnall
This is really interesting stuff that you are presenting - I would certainly be interested to read more on your user pages! :thumb_up: :D

Dagnall
Posts: 266
Joined: 15.05.2015, 14:41

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by Dagnall » 14.02.2019, 19:30

RedTrain wrote:
13.02.2019, 21:36
Dagnall wrote:
13.02.2019, 19:42
... I plan to do more of a write up on my user pages if you are interested...
Hello Dagnall
This is really interesting stuff that you are presenting - I would certainly be interested to read more on your user pages! :thumb_up: :D
Carlo, I managed to update quite a lot of my user pages today :coding: to reflect the WiRocS code and its capabilities https://wiki.rocrail.net/doku.php?id=us ... escription
I also set up a Github with the code..
It seems to work for me :wink: but I will find out soon if others have issues!!!.

I took some better pictures as well!,
IMG_2658.jpg
Oled Screwed to the side of my Ticket Office (NEEDS Weatherproofing !!!)
Time for a rest..
Dagnall

RedTrain
Posts: 718
Joined: 13.10.2012, 19:21
Location: Uetikon am See, Schweiz
Contact:

Re: RocDisplay (Bahnsteiganzeige) Ansteuerung NEU

Post by RedTrain » 15.02.2019, 21:09

Thanks a lot, Dagnall - this is impressive, ...especially besides the 3D-printed Ticketshop :D

Post Reply

Return to “RocNetNode”