DCC-EX / dcc-ex.github.io

The DCC-EX website, written in reStructuredText, generated using sphinx, and served by GitHub pages.
https://dcc-ex.com
GNU General Public License v3.0
12 stars 33 forks source link

[Documentation Update]: Mimic panel example(s) #504

Open peteGSX opened 1 year ago

peteGSX commented 1 year ago

Documentation details

There seems to be multiple users looking at mimic panels with DCC-EX, and it would be of great benefit to outline how this can be accomplished natively with EX-RAIL alone to accomplish this, without any need for JMRI or other custom Arduino based solutions.

One example has been provided by @Ash-4 here.

mimic_panel_EXRAIL_macro_v2.pdf

Page with issues

No response

Ash-4 commented 1 year ago

Here is the Word document.
mimic_panel_EXRAIL_macro_v2.docx

Ash-4 commented 1 year ago

Perhaps a section on implementation examples.

Here is another example. Mimic panel which effects CLOSE/THROW commands to any JMRI connected turnout using JMRI LogixNG -- and not dependent on dcc-ex as the CS; it uses the accessory control/setup of dcc-ex. mimic_panel_JMRI_LogixNG.pdf mimic_panel_JMRI_LogixNG.docx

Ash-4 commented 1 year ago

Mimic panel with info on ESP32 and some explanation on use of 1 signal pin to control two LEDs. mimic_panel_EXRAIL_macro.pdf mimic_panel_EXRAIL_macro_v2.docx

Kcsmith0708 commented 5 months ago

Perhaps start with a single simple example of Mega EXRAIL Servo Turnout, Signal, Throw & Close, and a mimic panel Button. then the more 'clever' ones further down.

myAutomation.h file enter

SERVO_TURNOUT(1,101,340,240,Slow,"Turnout T1") // Turnout T1 Servo vpin 101, angles 340 to 240, Slow 3 motion 'Description'

SIGNALH(106, 0, 107) // Red, Amber, Green For Turnout 1

ONCLOSE (1) PRINT("Close Turnout 1 on Track B, Signal Green") DELAY(1000) // delays give the servos time to move GREEN (106) PRINT("T1 Closed ~ B GREEN") DONE ONTHROW (1) PRINT("Throw Turnout 1 to Track A, Signal Red") DELAY(1000) RED (106) PRINT ("T1 Thrown ~ A RED") DONE

You now have one complete active running turnout on PCA9685 Servo/Signal board vpin101 and a Red Green LED on vpins 106 & 107 that will switch when you throw and close Turnout 1.

Add a momentary mimic panel button on Dpin31 to press & trigger the same turnout.

AUTOSTART SEQUENCE(31) // When button on Mega Dpin 31 is pressed AFTER(31)
IFCLOSED(1) THROW(1) PRINT("Panel Button31 T1 Throw") // {Throw} DELAY(250) ELSE IFTHROWN(1) CLOSE(1) PRINT("Panel Button31 T1 Close") // {Close} ENDIF ENDIF FOLLOW(31)

And you can see detail on turnouts here; https://dcc-ex.com/reference/hardware/servo-module.html#gsc.tab=0