Maker Pro
Maker Pro

Arduino control of model train signalling (was: LED Power Supply for Control Panel)

I DO
[CFY_DA_I_DFA] Accept Fast Down (MO pushbutton On/Off)
[CFY_DA_I_RNS] Ready Next Service
[CFY_DA_I_DFA] Down Fast Accepted

Somehow we have 2 x Down Fast lemme look at that

Code:
**CFY PANEL STATES AND TRANSITIONS**

**[CFY_DA PANEL] STATES AND TRANSITIONS**

Inputs [CFY_DA_I]

[CFY_DA_I_DTA]           Down Train Accepted
[CFY_DA_I_RNS]           Ready Next Service
[CFY_DA_I_DFA]           Down Fast Accepted

Code on post 139 ammended to reflect correction

Also have a problem with this part of the code... have asked previously
Code:
**CFY PANEL STATES AND TRANSITIONS**

**[CFY_DA PANEL] STATES AND TRANSITIONS**

Inputs [CFY_DA_I]

[CFY_DA_I_DTA]           Down Train Accepted
[CFY_DA_I_RNS]           Ready Next Service
[CFY_DA_I_DFA]           Down Fast Accepted

[CFY_DA_I_STRD]          Connected to [ERM_DD_O_CFY_STRD]   Signal from ERM_DD Panel Indicates a slow train ready for dispatch from ERM
[CFY_DA_I_FSRD]          Connected to [LFY_DD_O_CFY_FSRD].  Signal from LFY_DD Panel. Indicates a fast train ready for dispatch from LFY
[CFY_DA_I_ADT]           Connected to [ERM_DA_O_CFY_ADT].   Signal from ERM DA Panel. Indicates fast train acceptance at ERM (Route Set)

Outputs [CFY_DA_O]

[CFY_DA_O_TWA]           Train Waiting Acceptance
[CFY_DA_O_DTA]           Down Train Accepted
[CFY_DA_O_RNS]           Ready Next Service
[CFY_DA_O_DFRD]          Down Fast Ready Dispatch (Amber on/off)
[CFY_DA_O_FRS]           Fast Route Set (green flashing/off)
[CFY_DA_O_DFA]           Down Fast Accepted (5 LEDS chasing/off)

[COLOR="Red"][CFY_DA_O_LFY_ADT].      Connected to [LFY_DD_O_CFY_ADT].   Signal from ERM DA Panel. Indicates fast train acceptance at ERM (Route Set)[/COLOR]

THIS INTERFERES WITH THIS (code on post 123, 125)

Code:
Inputs [ERM_DA_I]
[COLOR="Red"][ERM_DA_I_ADT]           Accept Down Train[/COLOR]
[ERM_DA_I_RNS]           Ready Next Service
[ERM_DA_I_RS]            Route Set

Outputs [ERM_DA_O]
[ERM_DA_O_TWA]           Train Waiting Acceptance
[ERM_DA_O_ADT]           Accept Down Train
[ERM_DA_O_RNS]           Ready Next Service
[ERM_DA_O_DFRD]          Down Fast Ready Dispatch
[ERM_DA_O_FRS]           Fast Route Set
[ERM_DA_O_DFN]           Down Fast Next
[COLOR="Red"][ERM_DA_O_CFY_ADT]       Connected to CFY_DA_I_ADT.  Asserted when fast train accepted.  Cleared when route set.[/COLOR]

Reason: [ERM_DA_I_ADT] Accept Down Train relates to interface between [ERM_DA] and [LFY_DD] PANELS and is for slow train use only.

[CFY_DA_I_ADT] is an input on the CFY_DA panel from the ERM_DA panel that indicates it has accepted a fast train. (This was something I asked you to check).

ERM doesnt accept fast train it sets the route... something i had commented on... Can i change this to [ERM_DA_O_CFY_FRS] ????
 
Last edited:
Inputs and Outputs Down Sequence Control

Code:
***STATES AND TRANSITIONS**

**LFY PANEL STATES AND TRANSITIONS**

**[LFY_DD PANEL] STATES AND TRANSITIONS**

Inputs [LFY_DD_I]

[LFY_DD_I_TRD]        Train Ready Dispatch
[LFY_DD_I_STA]        Connected to [ERM_DA_O_LFY_SDTA]  Signal from ERM_DA Panel Indicates a Slow Down Train Accepted by ERM
[LFY_DD_I_ANS]        Connected to [ERM_DA_O_LFY_RNS]   Signal from ERM_DA_Panel Indicated Ready Next Service by ERM

[LFY_DD_I_FSRD]       Fast Service Ready Dispatch
[LFY_DD_I_FRS]        Connected to [ERM_DA_O_LFY_FRS]   Signal from ERM_DA_Panel Indicates Fast Route Set by ERM
[LFY_DD_I_FTA]        Connected to [CFY_DA_O_LFY_DFA]   Signal from CFY_DA_Panel Indicates Fast Route Set by CFY


Output LEDs [LFY_DD_O]

[LFY_DD_O_TRD]        Train Ready Dispatch
[LFY_DD_O_TA]         Train Accepted
[LFY_DD_O_ANS]        Awaiting Next Service
[LFY_DD_O_FSRD]       Fast Service Ready Dispatch
[LFY_DD_O_FRS]        Fast Route Set
[LFY_DD_O_DFA]        Down Fast Accepted

Output Signals

[LFY_DD_O_ERM_STRD]   Signal to ERM_DA Panel @ [ERM_DA_I_TWA]   Indicates a Slow Train Ready Dispatch by LFY
[LFY_DD_O_ERM_FSRD]   Signal to ERM_DA Panel @ [ERM_DA_I_DFRD]  Indicates a Fast Service Ready Dispatch by LFY
[LFY_DD_O_CFY_FSRD]   Signal to CFY_DD Panel @ [CFY_DD_I_FRSD]  Indicates a Fast Service Ready Dispatch by LFY


**ERM PANEL STATES AND TRANSITIONS**

**[ERM_DA PANEL] STATES AND TRANSITIONS**

Inputs [ERM_DA_I]

[ERM_DA_I_TWA]       Connected to [LFY_DD_O_ERM_STRD]   Signal from LFY_DD Panel. Indicates Slow Train Ready Dispatch by LFY
[ERM_DA_I_ADT]       Accept Down Train
[ERM_DA_I_RNS]       Ready Next Service

[ERM_DA-I_DFRD]      Connected to [LFY_DD_O_ERM_FRSD]   Signal from LFY_DD Panel. Indicates Fast Service Ready Dispatch by LFY
[ERM_DA_I_FRS]       Fast Route Set
[ERM_DA_I_DFN]       Connected to [CFY_DA_O_ERM_DFA]    Signal from CFY_DA Panel. Indicated Down Fast Accepted by CFY

Output LEDs [ERM_DA_O]

[ERM_DA_O_TWA]       Train Waiting Acceptance
[ERM_DA_O_ADT]       Accept Down Train
[ERM_DA_O_RNS]       Ready Next Service
[ERM_DA_O_DFRD]      Down Fast Ready Dispatch
[ERM_DA_O_FRS]       Fast Route Set
[ERM_DA_O_DFN]       Down Fast Next

Output Signals

[ERM_DA_O_LFY_SDTA]  Signal to LFY_DD PaneL @ [LFY_DD_I_STA] Indicates Slow Down Train Accepted by ERM     
[ERM_DA_O_LFY_RNS]   Signal to LFY_DD Panel @ [LFY_DD_I_ANS] Indicates Ready Next Service by ERM
[ERM_DA_O_LFY_FRS]   Signal to LFY_DD Panel @ [LFY_DD_I_FRS] Indicates Fast Route Set by ERM
[ERM-DA-O-CFY-FRS]   Signal to CFY_DA Panel @ [CFY-DA-I-FRS] Indicates Fast Route Set by ERM



**[ERM_DD PANEL] STATES AND TRANSITIONS**

Inputs [ERM_DD_I]

[ERM_DD_I_TRD]       Train Ready Dispatch
[ERM_DD_I-DTA]       Connected to [CFY_DA_O_ERM_SDTA]  Signal from CFY_DD Panel. Indicates Slow Down Train Accepted by CFY
[ERM_DD_I_ANS]       Connected to [CFY_DA_0_ERM_RNS]   Signal from CFY_DD Panel. Indicates Ready for Next Service by CFY
            
Outputs LEDs [ERM_DD_O]

[ERM_DD_O_TRD]       Train Ready Dispatch
[ERM_DD_O_TA]        Train Accepted
[ERM_DD_O_ANS]       Awaiting Next Service

Output Signals

[ERM_DD_O_CFY_STRD]  Signal to CFY_DA Panel @ [CFY_DA_I_STRD]  Indicates Slow Train Ready Dispatch by ERM



**CFY PANEL STATES AND TRANSITIONS**

**[CFY_DA PANEL] STATES AND TRANSITIONS**

Inputs [CFY_DA_I]

[CFY_DA_I_STRD]      Connected to [ERM_DD_O_CFY_STRD]. Signal from ERM_DD Panel Indicates a Slow Train Ready Dispatch by ERM
[CFY_DA_I_DTA]       Down Train Accepted
[CFY_DA_I_RNS]       Ready Next Service

[CFY_DA_I_FSRD]      Connected to [LFY_DD_O_CFY_FSRD]. Signal from LFY_DD Panel. Indicates a Fast Train Ready Dispatch by LFY
[CFY-DA-I-FRS]       Connected to [ERM_DA_O_CFY_FRS].  Signal from ERM_DA Panel. Indicates Fast Route Set by ERM 
[CFY_DA_I_DFA]       Down Fast Accepted


Outputs [CFY_DA_O]

[CFY_DA_O_TWA]       Train Waiting Acceptance
[CFY_DA_O_DTA]       Down Train Accepted
[CFY_DA_O_RNS]       Ready Next Service
[CFY_DA_O_DFRD]      Down Fast Ready Dispatch (Amber on/off)
[CFY_DA_O_FRS]       Fast Route Set (green flashing/off)
[CFY_DA_O_DFA]       Down Fast Accepted (5 LEDS chasing/off)

Output Signals

[CFY_DA_O_ERM_SDTA]  Signal to ERM_DD Panel @ [ERM_DD_I_DTA]  Indicates Slow Down Train Accepted on ERM_DD
[CFY_DA_0_ERM_RNS]   Signal to ERM_DD Panel @ [ERM_DD_I_ANS]  Indicates Ready Next Service on ERM_DD
[CFY_DA_O_LFY_DFA]   Signal to LFY_DD Panel @ [LFY_DD_I_FTA]  Indicates a Down fast Accepted on LFY_DD
[CFY_DA_O_ERM_DFA]   Signal to ERM_DA Panel @ [ERM_DA_I_DFN]  Indicates a Down Fast Accepted on ERM_DA
 
Last edited:
Inputs/Outputs and States

LFY_DD PANEL

Code:
**[LFY_DD PANEL] STATES AND TRANSITIONS**

Inputs [LFY_DD_I]

[LFY_DD_I_TRD]        Train Ready Dispatch
[LFY_DD_I_STA]        Connected to [ERM_DA_O_LFY_SDTA]  Signal from ERM_DA Panel Indicates a Slow Down Train Accepted by ERM
[LFY_DD_I_ANS]        Connected to [ERM_DA_O_LFY_RNS]   Signal from ERM_DA_Panel Indicated Ready Next Service by ERM

[LFY_DD_I_FSRD]       Fast Service Ready Dispatch
[LFY_DD_I_FRS]        Connected to [ERM_DA_O_LFY_FRS]   Signal from ERM_DA_Panel Indicates Fast Route Set by ERM
[LFY_DD_I_FTA]        Connected to [CFY_DA_O_LFY_DFA]   Signal from CFY_DA_Panel Indicates Fast Route Set by CFY


Output LEDs [LFY_DD_O]

[LFY_DD_O_TRD]        Train Ready Dispatch
[LFY_DD_O_TA]         Train Accepted
[LFY_DD_O_ANS]        Awaiting Next Service
[LFY_DD_O_FSRD]       Fast Service Ready Dispatch
[LFY_DD_O_FRS]        Fast Route Set
[LFY_DD_O_DFA]        Down Fast Accepted

Output Signals

[LFY_DD_O_ERM_STRD]   Signal to ERM_DA Panel @ [ERM_DA_I_TWA]   Indicates a Slow Train Ready Dispatch by LFY
[LFY_DD_O_ERM_FSRD]   Signal to ERM_DA Panel @ [ERM_DA_I_DFRD]  Indicates a Fast Service Ready Dispatch by LFY
[LFY_DD_O_CFY_FSRD]   Signal to CFY_DD Panel @ [CFY_DA_I_FRSD]  Indicates a Fast Service Ready Dispatch by LFY

States [LFY_DD_STATE]

0. LFY_DD_S_INIT         The initial (or reset state) nothing is happening.
                         [LFY_DD_O_TRD]  Off        
                         [LFY_DD_O_TA]   Off   
                         [LFY_DD_O_ANS]  Off      
                         [LFY_DD_O_FSRD] Off      
                         [LFY_DD_O_FRS]  Off      
                         [LFY_DD_O_DFA]  Off
                        
1. LFY_DD_S_RSIE         Ready next Service Initiated by ERM operator.
                         [LFY_DD_O_TRD]  Off        
                         [LFY_DD_O_TA]   Off   
                         [LFY_DD_O_ANS]  On (Flashing)    
                         [LFY_DD_O_FSRD] Off      
                         [LFY_DD_O_FRS]  Off      
                         [LFY_DD_O_DFA]  Off
                         
2. LFY_DD_S_SDIL         Slow train Dispatch Initiated by LFY operator.
                         [LFY_DD_O_TRD]  On        
                         [LFY_DD_O_TA]   Off   
                         [LFY_DD_O_ANS]  Off      
                         [LFY_DD_O_FSRD] Off      
                         [LFY_DD_O_FRS]  Off      
                         [LFY_DD_O_DFA]  Off                
      
3. LFY_DD_S_SAIE         Slow train Accepted Initiated by ERM operator.
                         [LFY_DD_O_TRD]  Off        
                         [LFY_DD_O_TA]   On  
                         [LFY_DD_O_ANS]  Off      
                         [LFY_DD_O_FSRD] Off      
                         [LFY_DD_O_FRS]  Off      
                         [LFY_DD_O_DFA]  Off
                         
4. LFY_DD_S_FDIL         Fast train Dispatch Initiated by LFY operator.
                         [LFY_DD_O_TRD]  Off        
                         [LFY_DD_O_TA]   Off   
                         [LFY_DD_O_ANS]  Off      
                         [LFY_DD_O_FSRD] On      
                         [LFY_DD_O_FRS]  Off      
                         [LFY_DD_O_DFA]  Off

5. LFY_DD_S_FRSE         Fast Route Set by ERM.
                         [LFY_DD_O_TRD]  Off        
                         [LFY_DD_O_TA]   Off   
                         [LFY_DD_O_ANS]  Off      
                         [LFY_DD_O_FSRD] Off   
                         [LFY_DD_O_FRS]  On     
                         [LFY_DD_O_DFA]  Off
                         
6. LFY_DD_S_FAIC         Fast train Accepted Initiated by CFY operator.
                         [LFY_DD_O_TRD]  Off        
                         [LFY_DD_O_TA]   Off   
                         [LFY_DD_O_ANS]  Off      
                         [LFY_DD_O_FSRD] Off      
                         [LFY_DD_O_FRS]  Off      
                         [LFY_DD_O_DFA]  On (Chase}
                         
Transitions
0 -> 1   if [LFY_DD_I_ANS]   asserted (level sensitive)
1 -> 2   if [LFY_DD_I_TRD]   pressed (edge sensitive)
2 -> 3   if [LFY_DD_I_STA]   asserted (level sensitive) 
3 -> 1   if [LFY_DD_I_ANS]   asserted (level sensitive)

1 -> 4   if [LFY_DD_I_FSRD]  pressed (edge sensitive)   
4 -> 5   if [LFY_DD_I_FRS]   asserted (level sensitive)
5 -> 6   if [LFY_DD_I_FTA]   asserted (level sensitive)
6 -> 1   if [LFY_DD_I_ANS]   asserted (level sensitive)

Edit: Transitions Added to LFY_DD
Edit: Minor Spelling/Layout to LFY-DD

ERM_DA PANEL

Code:
**ERM PANEL STATES AND TRANSITIONS**

**[ERM_DA PANEL] STATES AND TRANSITIONS**

Inputs [ERM_DA_I]

[ERM_DA_I_TWA]       Connected to [LFY_DD_O_ERM_STRD]   Signal from LFY_DD Panel. Indicates Slow Train Ready Dispatch by LFY
[ERM_DA_I_ADT]       Accept Down Train
[ERM_DA_I_RNS]       Ready Next Service

[ERM_DA_I_DFRD]      Connected to [LFY_DD_O_ERM_FRSD]   Signal from LFY_DD Panel. Indicates Fast Service Ready Dispatch by LFY
[ERM_DA_I_FRS]       Fast Route Set
[ERM_DA_I_DFN]       Connected to [CFY_DA_O_ERM_DFA]    Signal from CFY_DA Panel. Indicated Down Fast Accepted by CFY

Output LEDs [ERM_DA_O]

[ERM_DA_O_TWA]       Train Waiting Acceptance
[ERM_DA_O_ADT]       Accept Down Train
[ERM_DA_O_RNS]       Ready Next Service
[ERM_DA_O_DFRD]      Down Fast Ready Dispatch
[ERM_DA_O_FRS]       Fast Route Set
[ERM_DA_O_DFN]       Down Fast Next

Output Signals

[ERM_DA_O_LFY_SDTA]  Signal to LFY_DD PaneL @ [LFY_DD_I_STA] Indicates Slow Down Train Accepted by ERM     
[ERM_DA_O_LFY_RNS]   Signal to LFY_DD Panel @ [LFY_DD_I_ANS] Indicates Ready Next Service by ERM
[ERM_DA_O_LFY_FRS]   Signal to LFY_DD Panel @ [LFY_DD_I_FRS] Indicates Fast Route Set by ERM
[ERM-DA-O-CFY-FRS]   Signal to CFY_DA Panel @ [CFY-DA-I-FRS] Indicates Fast Route Set by ERM

States [ERM_DA_STATE]

0. ERM_DA_S_INIT         The initial (or reset state) nothing is happening.
                         [ERM_DA_O_TWA]  Off       
                         [ERM_DA_O_ADT]  Off  
                         [ERM_DA_O_RNS]  Off      
                         [ERM_DA_O_DFRD] Off      
                         [ERM_DA_O_FRS]  Off       
                         [ERM_DA_O_DFN]  Off 

1. ERM_DA_S_RSIE         Ready Next service Initiated by ERM operator.
                         [ERM_DA_O_TWA]  Off       
                         [ERM_DA_O_ADT]  Off  
                         [ERM_DA_O_RNS]  On      
                         [ERM_DA_O_DFRD] Off      
                         [ERM_DA_O_FRS]  Off       
                         [ERM_DA_O_DFN]  Off
                         
2. ERM_DA_S_SDIL         Slow train Dispatch Initiated by LFY operator.
                         [ERM_DA_O_TWA]  On (Flashing)     
                         [ERM_DA_O_ADT]  Off  
                         [ERM_DA_O_RNS]  Off      
                         [ERM_DA_O_DFRD] Off      
                         [ERM_DA_O_FRS]  Off       
                         [ERM_DA_O_DFN]  Off
                         
3. ERM_DA_S_SAIE         Slow train Accepted Initiated by ERM operator.
                         [ERM_DA_O_TWA]  Off       
                         [ERM_DA_O_ADT]  On  
                         [ERM_DA_O_RNS]  Off      
                         [ERM_DA_O_DFRD] Off      
                         [ERM_DA_O_FRS]  Off       
                         [ERM_DA_O_DFN]  Off
                         
4. ERM_DA_S_FDIL         Fast train Dispatch Initiated by LFY operator.
                         [ERM_DA_O_TWA]  Off       
                         [ERM_DA_O_ADT]  Off  
                         [ERM_DA_O_RNS]  Off      
                         [ERM_DA_O_DFRD] On (Flashing)     
                         [ERM_DA_O_FRS]  Off       
                         [ERM_DA_O_DFN]  Off
                         
5. ERM_DA_S_FRSE         Fast Route Set by ERM.
                         [ERM_DA_O_TWA]  Off       
                         [ERM_DA_O_ADT]  Off  
                         [ERM_DA_O_RNS]  Off      
                         [ERM_DA_O_DFRD] Off      
                         [ERM_DA_O_FRS]  On       
                         [ERM_DA_O_DFN]  Off
                         
6. ERM_DA_S_FAIC         Fast train Accepted Initiated by CFY operator.
                         [ERM_DA_O_TWA]  Off       
                         [ERM_DA_O_ADT]  Off  
                         [ERM_DA_O_RNS]  Off      
                         [ERM_DA_O_DFRD] Off      
                         [ERM_DA_O_FRS]  Off             
                         [ERM_DA_O_DFN]  On (Chase}
Transitions
0 -> 1   if [ERM_DA_I_RNS]   pressed (edge sensitive)
1 -> 2   if [ERM_DA_I_TWA]   asserted (level sensitive)
2 -> 3   if [ERM_DA_I_ADT]   pressed (edge sensitive) 
3 -> 1   if [ERM_DA_I_RNS]   pressed (edge sensitive)

1 -> 4   if [ERM_DA_I_DFRD]  asserted (level sensitive)   
4 -> 5   if [ERM_DA_I_FRS]   pressed (edge sensitive)
5 -> 6   if [ERM_DA_I_DFN]   asserted (level sensitive)
6 -> 1   if [ERM_DA_I_RNS]   pressed (edge sensitive)

Edit: Transitions Added to ERM_DA
Edit: Minor Spelling/Layout to ERM_DA


ERM_DD PANEL

Code:
**[ERM_DD PANEL] STATES AND TRANSITIONS**

Inputs [ERM_DD_I]

[ERM_DD_I_TRD]       Train Ready Dispatch
[ERM_DD_I-DTA]       Connected to [CFY_DA_O_ERM_SDTA]  Signal from CFY_DA Panel. Indicates Slow Down Train Accepted by CFY
[ERM_DD_I_ANS]       Connected to [CFY_DA_0_ERM_RNS]   Signal from CFY_DA Panel. Indicates Ready for Next Service by CFY
            
Outputs LEDs [ERM_DD_O]

[ERM_DD_O_TRD]       Train Ready Dispatch
[ERM_DD_O_TA]        Train Accepted
[ERM_DD_O_ANS]       Awaiting Next Service

Output Signals

[ERM_DD_O_CFY_STRD]  Signal to CFY_DA Panel @ [CFY_DA_I_STRD]  Indicates Slow Train Ready Dispatch by ERM

States [ERM_DD_STATE]

0. ERM_DD_S_INIT         The initial (or reset state) nothing is happening.
                         [ERM_DD_O_TRD]  Off       
                         [ERM_DD_O_TA]   Off  
                         [ERM_DD_O_ANS]  Off     

1. ERM_DSA_S_RSIC         Ready next Service Initiated by CFY operator.
                         [ERM_DD_O_TRD]  Off        
                         [ERM_DD_O_TA]   Off  
                         [ERM_DD_O_ANS]  On (Flashing)
                         
2. ERM_DD_S_SDIE         Slow train Dispatch Initiated by ERM operator.
                         [ERM_DD_O_TRD]  On       
                         [ERM_DD_O_TA]   Off  
                         [ERM_DD_O_ANS]  Off
                    
3. ERM_DD_S_SAIC         Slow train Accepted Initiated by CFY operator.
                         [ERM_DD_O_TRD]  Off       
                         [ERM_DD_O_TA]   On   
                         [ERM_DD_O_ANS]  Off                              

Transitions
0 -> 1   if [ERM_DD_I_ANS]   asserted (level sensitive)
1 -> 2   if [ERM_DD_I_TRD]   pressed (edge sensitive)
2 -> 3   if [ERM_DD_I_DTA]   asserted (level sensitive) 
3 -> 1   if [ERM_DD_I_ANS]   asserted (level sensitive)

Edit: Transitions Added to ERM_DD
Edit: Minor Spelling/Layout to ERM_DD

CFY_DA PANEL

Code:
**[CFY_DA PANEL] STATES AND TRANSITIONS**

Inputs [CFY_DA_I]

[CFY_DA_I_STRD]      Connected to [ERM_DD_O_CFY_STRD]. Signal from ERM_DD Panel Indicates a Slow Train Ready Dispatch by ERM
[CFY_DA_I_DTA]       Down Train Accepted
[CFY_DA_I_RNS]       Ready Next Service

[CFY_DA_I_FSRD]      Connected to [LFY_DD_O_CFY_FSRD]. Signal from LFY_DD Panel. Indicates a Fast Train Ready Dispatch by LFY
[CFY-DA-I-FRS]       Connected to [ERM_DA_O_CFY_FRS].  Signal from ERM_DA Panel. Indicates Fast Route Set by ERM 
[CFY_DA_I_DFA]       Down Fast Accepted


Outputs [CFY_DA_O]

[CFY_DA_O_TWA]       Train Waiting Acceptance
[CFY_DA_O_DTA]       Down Train Accepted
[CFY_DA_O_RNS]       Ready Next Service
[CFY_DA_O_DFRD]      Down Fast Ready Dispatch (Amber on/off)
[CFY_DA_O_FRS]       Fast Route Set (green flashing/off)
[CFY_DA_O_DFA]       Down Fast Accepted (5 LEDS chasing/off)

Output Signals

[CFY_DA_O_ERM_SDTA]  Signal to ERM_DD Panel @ [ERM_DD_I_DTA]  Indicates Slow Down Train Accepted on ERM_DD
[CFY_DA_0_ERM_RNS]   Signal to ERM_DD Panel @ [ERM_DD_I_ANS]  Indicates Ready Next Service on ERM_DD
[CFY_DA_O_LFY_DFA]   Signal to LFY_DD Panel @ [LFY_DD_I_FTA]  Indicates a Down fast Accepted on LFY_DD
[CFY_DA_O_ERM_DFA]   Signal to ERM_DA Panel @ [ERM_DA_I_DFN]  Indicates a Down Fast Accepted on ERM_DA

States [CFY_DA_STATE]

0. CFY_DA_S_INIT         The initial (or reset state) nothing is happening.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS    Off
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

1. CFY_DA_S_RSIC         Ready next Service Initiated by CFY operator.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   On
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

2. CFY_DA_S_SDIE         Slow train Dispatch Initialed ERM operator.
                         [CFY_DA_O_TWA]   On (Flashing)
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

3. CFY_DA_S_SAIC         Slow train Accepted Initiated by CFY operator.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   On
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

4. CFY_DA_S_FDIL         Fast train dispatch initiated by LFY operator.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  On
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

5. CFY_DA_S_FRSE         Fast route set by ERM
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  On
                         [CFY_DA_O_FRS]   On (Flashing)
                         [CFY_DA_O_DFA]   Off
              
6. CFY_DA_S_FAIC         Fast train Accepted Initiated by CFY operator.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   On (Chase}         
     
Transitions
0 -> 1   if [CFY_DA_I_RNS]   pressed (edge sensitive)
1 -> 2   if [CFY_DA_I_STRD]  asserted (level sensitive)
2 -> 3   if [CFY_DA_I_DTA]   pressed (edge sensitive) 
3 -> 1   if [CFY_DA_I_RNS]   pressed (edge sensitive) 

1 -> 4   if [CFY_DA_I_FSRD]  asserted (level sensitive)   
4 -> 5   if [CFY_DA_I_FRS]   asserted (level sensitive)
5 -> 6   if [CFY_DA_I_DFA]   pressed (edge sensitive)
6 -> 1   if [CFY_DA_I_RNS]   pressed (edge sensitive)


Edit: Transitions Added to CFY_DA
Edit: Minor Spelling/Layout to CFY-DA


Just the transitions to do :D -DONE
 
Last edited:
Hi Steve,

As you will see I've altered some of the State identifiers in CFY_DA panel.. it all makes more sense now:D (well to me LOL)

Its been quite interesting doing this and i have had some time to contemplate some things......"Oh No" i hear you shout

So we started to discuss the transition from fast to slow states.

Its seems logical that at present slow trains are controlled by Ready Next Service at ERM_DA Panel (for LFY_DD to ERM_DA) and CFY_DA panel for( ERM_DD to CFY_DA) movements.

When it comes to fast movements is it possible to have ERM_DA Panel clear for Ready Next Service (for LFY_DD to ERM_DA movements) allowing a slow to follow the fast.(both on same line at once).. but also if not cleared by the time fast reaches CFY for CFY operator to clear both sections by Ready Next Service button press on his panel and still maintain the slow logic as outlined before..

I'm guessing the answer is yes ... (more states, more signals will achieve this and some extra button logic) but can you confirm

BTW
Is the LFY_UA panel similar in nature to the CFY_DA panel? If so, we may be able to just create the state transition diagram for it without a great deal of thought, just transposition.

Yes i think they will be :D I also think that ALL the down Panels will transpose to UP as the idea is exactly the same but from a different direction essentially
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
I DO


Somehow we have 2 x Down Fast lemme look at that

And I would not have spotted that. They do look different, and *could* mean different things)

ERM doesnt accept fast train it sets the route... something i had commented on... Can i change this to [ERM_DA_O_CFY_FRS] ????
That sounds perfectly reasonable.I suggested a need for the link. You are the expert in what that link should be.

By the way, I can see you've been really busy. I need to take a close look at what you've done and I may not have time to do that for several days.

I think it's important that I put in the time to do it though.

edit: by all means, work on the transitions.

The next step will be to validate them as a set. We'll have to go through the normal steps and make sure the states and transitions guide us correctly and don't end up in race conditions or deadlocks

(but I'll still look at these states first :))
 
Last edited:
Hi Steve,

By the way, I can see you've been really busy. I need to take a close look at what you've done and I may not have time to do that for several days.

I think it's important that I put in the time to do it though.

edit: by all means, work on the transitions.


(but I'll still look at these states first )

No problems, i appreciate your busy and as you say i'm the expert (well know in my head what i want to achieve).

As i have some time (caring for Mum after operation) at the moment. The post may be thick nd fast.
I intend to finish, well as far as possible the States and Transitions and to keep continuity i will update them in Post 143 https://www.electronicspoint.com/ar...ply-control-panel-t255905p15.html#post1579696 adding edit reason

When i have completed to the best of my abilities i will add a short narrative to help guide you on my thought process before moving onto the next.

Any major changes i will post seperately.

Mark
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
i will update them in Post 143

That's a great idea because I can compare the versions of your post so I can see before/after changes.

Beware that you can only edit a post for so long...

The only downside is that I won't get a notification of your change. Just post a very brief summary of the change as a new post and It will get my attention.
 
Clear All Blocks One Operator

Hi Steve,

When you get time can you look at the highlighted additions... don't worry haven't included them yet.

At present ( LFY_DD & ERM_DA) and (ERM_DD and CFY_DA) panels work independantly of each other with respect to Slow Train movements which is fab.

Its also nice in fast train movements but i wanted to add a state that would allow the receiving operator of a fast train [CFY in this case] the ability to "Clear the whole of the Down Line" (Ready Next Service) if this had not been done by ERM_DA operator before the train reached its destination.

MY LOGIC
1. This feature should only occur:

when in State 6 on the Down Line and [CFY_DA_O_RNS] is pressed before [ERM_DA_O_RNS] Ready Next Service
otherwise [CFY_DA_O_RNS] and [ERM_DA_O_RNS] should clear there blocks independently
Or
when in State 6 on the Up line and [LFY_UA_I_RNS] is pressed before [ERM_UA_I_RNS] Ready Next Service
otherwise [LFY_UA_I_RNS and [ERM_UA_I_RNS] should clear there blocks independently

Transition 6 -> 7 Created
new State added State 7. CFY_DA_S_CDIC Clear Down line Intiated by CFY operator

2. How can we tell that [ERM_DA_O_RNS] or [ERM_UA_I_RNS] have not been pressed?
If we send a signal when these have been pressed to the retrospective panel at CFY and LFY then [ERM_DA_O_RNS] or [ERM_UA_I_RNS] = true (when pressed) or false (when not pressed)

3.if signal == false then Transition 6 -> 7 equals clear all panels
4. if signal == true then State != 6

Input Added [CFY_DA_I_CDIC] Connected to [ERM_DA_O_CFY_RNS]
Output Added CFY_DA_0_ERM_CDIC] Signal Output back to ERM_DA

5. Tidy Up and Get back in Line

Transition 7 -> 2; added
Transition 7 -> 4; added

Code:
**[CFY_DA PANEL] STATES AND TRANSITIONS**

Inputs [CFY_DA_I]

[CFY_DA_I_STRD]      Connected to [ERM_DD_O_CFY_STRD]. Signal from ERM_DD Panel Indicates a Slow Train Ready Dispatch by ERM
[CFY_DA_I_DTA]       Down Train Accepted
[CFY_DA_I_RNS]       Ready Next Service

[CFY_DA_I_FSRD]      Connected to [LFY_DD_O_CFY_FSRD]. Signal from LFY_DD Panel. Indicates a Fast Train Ready Dispatch by LFY
[CFY-DA-I-FRS]       Connected to [ERM_DA_O_CFY_FRS].  Signal from ERM_DA Panel. Indicates Fast Route Set by ERM 
[CFY_DA_I_DFA]       Down Fast Accepted

[COLOR="Red"][CFY_DA_I_CDIC]      Connected to [ERM_DA_O_CFY_RNS]. Signal from ERM_DA panel. Indicates Ready Next Service On ERM_DA set by ERM[/COLOR]


Outputs [CFY_DA_O]

[CFY_DA_O_TWA]       Train Waiting Acceptance
[CFY_DA_O_DTA]       Down Train Accepted
[CFY_DA_O_RNS]       Ready Next Service
[CFY_DA_O_DFRD]      Down Fast Ready Dispatch (Amber on/off)
[CFY_DA_O_FRS]       Fast Route Set (green flashing/off)
[CFY_DA_O_DFA]       Down Fast Accepted (5 LEDS chasing/off)

Output Signals

[CFY_DA_O_ERM_SDTA]  Signal to ERM_DD Panel @ [ERM_DD_I_DTA]  Indicates Slow Down Train Accepted on ERM_DD
[CFY_DA_0_ERM_RNS]   Signal to ERM_DD Panel @ [ERM_DD_I_ANS]  Indicates Ready Next Service on ERM_DD
[CFY_DA_O_LFY_DFA]   Signal to LFY_DD Panel @ [LFY_DD_I_FTA]  Indicates a Down fast Accepted on LFY_DD
[CFY_DA_O_ERM_DFA]   Signal to ERM_DA Panel @ [ERM_DA_I_DFN]  Indicates a Down Fast Accepted on ERM_DA

[COLOR="Red"]CFY_DA_0_ERM_CDIC]   Signal to ERM_DA Panel @ [ERM_DA_I_CDIC] Indicates Clear all Down line post down fast on ERM_DA
[/COLOR]
States [CFY_DA_STATE]

0. CFY_DA_S_INIT         The initial (or reset state) nothing is happening.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS    Off
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

1. CFY_DA_S_RSIC         Ready next Service Initiated by CFY operator.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   On
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

2. CFY_DA_S_SDIE         Slow train Dispatch Initialed ERM operator.
                         [CFY_DA_O_TWA]   On (Flashing)
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

3. CFY_DA_S_SAIC         Slow train Accepted Initiated by CFY operator.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   On
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

4. CFY_DA_S_FDIL         Fast train dispatch initiated by LFY operator.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  On
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off

5. CFY_DA_S_FRSE         Fast route set by ERM
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  On
                         [CFY_DA_O_FRS]   On (Flashing)
                         [CFY_DA_O_DFA]   Off
              
6. CFY_DA_S_FAIC         Fast train Accepted Initiated by CFY operator.
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   Off
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   On (Chase} 
[COLOR="Red"]7. CFY_DA_S_CDIC         Clear Down line Intiated by CFY operator
                         [CFY_DA_O_TWA]   Off
                         [CFY_DA_O_DTA]   Off
                         [CFY_DA_O_RNS]   On
                         [CFY_DA_O_DFRD]  Off
                         [CFY_DA_O_FRS]   Off
                         [CFY_DA_O_DFA]   Off
                         [CFY_DA_O_ERM_CDIC] = true[/COLOR]
Transitions
0 -> 1   if [CFY_DA_I_RNS]   pressed (edge sensitive)
1 -> 2   if [CFY_DA_I_STRD]  asserted (level sensitive)
2 -> 3   if [CFY_DA_I_DTA]   pressed (edge sensitive) 
3 -> 1   if [CFY_DA_I_RNS]   pressed (edge sensitive) 
[COLOR="Red"]7 -> 2   if [CFY_DA_I_STRD]  asserted (level sensitive)
[/COLOR]
1 -> 4   if [CFY_DA_I_FSRD]  asserted (level sensitive)   
4 -> 5   if [CFY_DA_I_FRS]   asserted (level sensitive)
5 -> 6   if [CFY_DA_I_DFA]   pressed (edge sensitive)
6 -> 1   if [CFY_DA_I_RNS]   pressed (edge sensitive)
[COLOR="Red"]6 -> 7   if [CFY_DA_I_RNS] && [!CFY_DA_I_CDIC] pressed (edge sensitive) & asserted (level sensitive) [/COLOR]
[COLOR="Red"]7 -> 4   if [CFY_DA_I_FSRD]  asserted (level sensitive)
[/COLOR]

Could it Really be this Simple ?

Mark
 
Last edited:
Up Line I/O Transitions and Output States

Up Line I/O Transitions and Output States
Posted just incase i wipe it ...lol

Code:
***STATES AND TRANSITIONS UP LINE**


**CFY PANEL STATES AND TRANSITIONS**

**[CFY_UD PANEL] STATES AND TRANSITIONS**

Inputs [CFY_UD_I]

[CFY_UD_I_TRD]       Train Ready Dispatch
[CFY_UD_I_STA]       Connected to [ERM_UA_O_CFY_SUTA]  Signal from ERM_UA Panel Indicates a Slow Up Train Accepted by ERM
[CFY_UD_I_ANS]       Connected to [ERM_UA_O_CFY_RNS]   Signal from ERM_UA_Panel Indicated Ready Next Service by ERM

[CFY_UD_I_FSRD]      Fast Service Ready Dispatch
[CFY_UD_I_FRS]       Connected to [ERM_UA_O_CFY_FRS]   Signal from ERM_UA_Panel Indicates Fast Route Set by ERM
[CFY_UD_I_FTA]       Connected to [LFY_UA_O_CFY_UFA]   Signal from LFY_UA_Panel Indicates Fast Train Accepted  by LFY
   
Outputs LEDs [CFY_UD_O]

[CFY_UD_O_TRD]       Train Ready Dispatch
[CFY_UD_O_TA]        Train Accepted
[CFY_UD_O_ANS]       Awaiting Next Service
[CFY_UD_O_FSRD]      Fast Service Ready Dispatch
[CFY_UD_O_FRS]       Fast Route Set
[CFY_UD_O_UFA]       Up Fast Accepted

Output Signals

[CFY_UD_O_ERM_STRD]  Signal to ERM_UA Panel @ [ERM_UA_I_TWA]   Indicates a Slow Train Ready Dispatch by CFY
[CFY_UD_O_ERM_FSRD]  Signal to ERM_UA Panel @ [ERM_UA_I_UFRD]  Indicates a Fast Service Ready Dispatch by CFY
[CFY_UD_O_LFY_FSRD]  Signal to LFY_UA Panel @ [LFY_UA_I_FRSD]  Indicates a Fast Service Ready Dispatch by CFY

States [CFY_UD_STATE]

0. CFY_UD_S_INIT         The initial (or reset state) nothing is happening.
                         [CFY_UD_O_TRD]  Off        
                         [CFD_UD_O_TA]   Off   
                         [CFY_UD_O_ANS]  Off      
                         [CFY_UD_O_FSRD] Off      
                         [CFY_UD_O_FRS]  Off      
                         [CFY_UD_O_UFA]  Off
                        
1. CFY_UD_S_RSIE         Ready next Service Initiated by ERM operator.
                         [CFY_UD_O_TRD]  Off        
                         [CFY_UD_O_TA]   Off   
                         [CFY_UD_O_ANS]  On (Flashing)    
                         [CFY_UD_O_FSRD] Off      
                         [CFY_UD_O_FRS]  Off      
                         [CFY_UD_O_UFA]  Off
                         
2. CFY_UD_S_SDIC         Slow train Dispatch Initiated by CFY operator.
                         [CFY_UD_O_TRD]  On        
                         [CFY_UD_O_TA]   Off   
                         [CFY_UD_O_ANS]  Off      
                         [CFY_UD_O_FSRD] Off      
                         [CFY_UD_O_FRS]  Off      
                         [CFY_UD_O_UFA]  Off                
      
3. CFY_UD_S_SAIE         Slow train Accepted Initiated by ERM operator.
                         [CFY_UD_O_TRD]  Off        
                         [CFY_UD_O_TA]   On  
                         [CFY_UD_O_ANS]  Off      
                         [CFY_UD_O_FSRD] Off      
                         [CFY_UD_O_FRS]  Off      
                         [CFY_UD_O_UFA]  Off
                         
4. CFY_UD_S_FDIC         Fast train Dispatch Initiated by CFY operator.
                         [CFY_UD_O_TRD]  Off        
                         [CFY_UD_O_TA]   Off   
                         [CFY_UD_O_ANS]  Off      
                         [CFY_UD_O_FSRD] On (Flashing)      
                         [CFY_UD_O_FRS]  Off      
                         [CFY_UD_O_UFA]  Off

5. CFY_UD_S_FRSE         Fast Route Set by ERM.
                         [CFY_UD_O_TRD]  Off        
                         [CFY_UD_O_TA]   Off   
                         [CFY_UD_O_ANS]  Off      
                         [CFY_UD_O_FSRD] Off   
                         [CFY_UD_O_FRS]  On     
                         [CFY_UD_O_UFA]  Off
                         
6. CFY_UD_S_FAIL         Fast train Accepted Initiated by LFY operator.
                         [CFY_UD_O_TRD]  Off        
                         [CFY_UD_O_TA]   Off   
                         [CFY_UD_O_ANS]  Off      
                         [CFY_UD_O_FSRD] Off      
                         [CFY_UD_O_FRS]  Off      
                         [CFY_UD_O_UFA]  On (Chase}
                        
Transitions
0 -> 1   if [CFY_UD_I_ANS]   asserted (level sensitive)
1 -> 2   if [CFY_UD_I_TRD]   pressed (edge sensitive)
2 -> 3   if [CFY_UD_I_STA]   asserted (level sensitive) 
3 -> 1   if [CFY_UD_I_ANS]   asserted (level sensitive)

1 -> 4   if [CFY_UD_I_FSRD]  pressed (edge sensitive)   
4 -> 5   if [CFY_UD_I_FRS]   asserted (level sensitive)
5 -> 6   if [CFY_UD_I_FTA]   asserted (level sensitive)
6 -> 1   if [CFY_UD_I_ANS]   asserted (level sensitive)



**ERM PANEL STATES AND TRANSITIONS**

**[ERM_UA PANEL] STATES AND TRANSITIONS**

Inputs [ERM_UA_I]

[ERM_UA_I_TWA]       Connected to [CFY_UD_O_ERM_STRD]   Signal from CFY_UD Panel. Indicates Slow Train Ready Dispatch by CFY
[ERM_UA_I_AUT]       Accept Up Train
[ERM_UA_I_RNS]       Ready Next Service

[ERM_UA-I_UFRD]      Connected to [CFY_UD_O_ERM_FRSD]   Signal from CFY_UD Panel. Indicates Fast Service Ready Dispatch by CFY
[ERM_UA_I_RS]        Route Set
[ERM_UA_I_UFN]       Connected to [LFY_UD_O_ERM_UFA]    Signal from LFY_UA Panel. Indicated Up Fast Accepted by LFY
 
Outputs LEDs [ERM_UA_O]

[ERM_UA_O_TWA]       Train Waiting Acceptance
[ERM_UA_O_AUT]       Accept Up Train
[ERM_UA_O_RNS]       Ready Next Service
[ERM_UA_O_UFRD]      Up Fast Ready Dispatch
[ERM_UA_O_FRS]       Fast Route Set
[ERM_UA_O_UFN]       Up Fast Next

Output Signals

[ERM_UA_O_CFY_SUTA]  Signal to CFY_UD PaneL @ [CFY_UD_I_STA] Indicates Slow Up Train Accepted by ERM     
[ERM_UA_O_CFY_RNS]   Signal to CFY_UD Panel @ [CFY_UD_I_ANS] Indicates Ready Next Service by ERM
[ERM_UA_O_LFY_FRS]   Signal to LFY_UA Panel @ [LFY-UA-I-FRS] Indicates Fast Route Set by ERM
[ERM_UA_O_CFY_FRS]   Signal to CFY_UD Panel @ [CFY-UD-I-FRS] Indicates Fast Route Set by ERM

States [ERM_UA_STATE]

0. ERM_UA_S_INIT         The initial (or reset state) nothing is happening.
                         [ERM_UA_O_TWA]  Off       
                         [ERM_UA_O_AUT]  Off  
                         [ERM_UA_O_RNS]  Off      
                         [ERM_UA_O_UFRD] Off      
                         [ERM_UA_O_FRS]  Off       
                         [ERM_UA_O_UFN]  Off 

1. ERM_UA_S_RSIE         Ready Next service Initiated by ERM operator.
                         [ERM_UA_O_TWA]  Off       
                         [ERM_UA_O_AUT]  Off  
                         [ERM_UA_O_RNS]  On      
                         [ERM_UA_O_UFRD] Off      
                         [ERM_UA_O_FRS]  Off       
                         [ERM_UA_O_UFN]  Off
                         
2. ERM_UA_S_SDIC         Slow train Dispatch Initiated by CFY operator.
                         [ERM_UA_O_TWA]  On (Flashing)     
                         [ERM_UA_O_AUT]  Off  
                         [ERM_UA_O_RNS]  Off      
                         [ERM_UA_O_UFRD] Off      
                         [ERM_UA_O_FRS]  Off       
                         [ERM_UA_O_UFN]  Off
                         
3. ERM_UA_S_SAIE         Slow train Accepted Initiated by ERM operator.
                         [ERM_UA_O_TWA]  Off       
                         [ERM_UA_O_AUT]  On  
                         [ERM_UA_O_RNS]  Off      
                         [ERM_UA_O_UFRD] Off      
                         [ERM_UA_O_FRS]  Off       
                         [ERM_UA_O_UFN]  Off
                         
4. ERM_UA_S_FDIC         Fast train Dispatch Initiated by CFY operator.
                         [ERM_UA_O_TWA]  Off       
                         [ERM_UA_O_AUT]  Off  
                         [ERM_UA_O_RNS]  Off      
                         [ERM_UA_O_UFRD] On (Flashing)     
                         [ERM_UA_O_FRS]  Off       
                         [ERM_UA_O_UFN]  Off
                         
5. ERM_UA_S_FRSE         Fast Route Set by ERM.
                         [ERM_UA_O_TWA]  Off       
                         [ERM_UA_O_AUT]  Off  
                         [ERM_UA_O_RNS]  Off      
                         [ERM_UA_O_UFRD] Off      
                         [ERM_UA_O_FRS]  On       
                         [ERM_UA_O_UFN]  Off
                         
6. ERM_UA_S_FAIL         Fast train Accepted Initiated by LFY operator.
                         [ERM_UA_O_TWA]  Off       
                         [ERM_UA_O_AUT]  Off  
                         [ERM_UA_O_RNS]  Off      
                         [ERM_UA_O_UFRD] Off      
                         [ERM_UA_O_FRS]  Off             
                         [ERM_UA_O_UFN]  On (Chase}
Transitions
0 -> 1   if [ERM_UA_I_RNS]   pressed (edge sensitive)
1 -> 2   if [ERM_UA_I_TWA]   asserted (level sensitive)
2 -> 3   if [ERM_UA_I_AUT]   pressed (edge sensitive) 
3 -> 1   if [ERM_DA_I_RNS]   pressed (edge sensitive)

1 -> 4   if [ERM_UA_I_UFRD]  asserted (level sensitive)   
4 -> 5   if [ERM_DA_I_FRS]   pressed (edge sensitive)
5 -> 6   if [ERM_DA_I_UFN]   asserted (level sensitive)
6 -> 1   if [ERM_DA_I_RNS]   pressed (edge sensitive)



**[ERM_UD PANEL] STATES AND TRANSITIONS**

Inputs [ERM_UD_I]

[ERM_UD_I_TRD]       Train Ready Dispatch
[ERM_UD_I-UTA]       Connected to [LFY_UA_O_ERM_SUTA]  Signal from LFY_UA Panel. Indicates Slow Up Train Accepted by LFY
[ERM_UD_I_ANS]       Connected to [LFY_UA_0_ERM_RNS]   Signal from LFY_UA Panel. Indicates Ready for Next Service by LFY

Outputs LEDs [ERM_UD_O]

[ERM_UD_O_TRD]       Train Ready Dispatch
[ERM_UD_O_TA]        Train Accepted
[ERM_UD_O_ANS]       Awaiting Next Service

Output Signals

[ERM_UD_O_LFY_STRD]  Signal to LFY_UA Panel @ [CFY_UA_I_STRD]  Indicates Slow Train Ready Dispatch by ERM

States [ERM_UD_STATE]


0. ERM_UD_S_INIT         The initial (or reset state) nothing is happening.
                         [ERM_UD_O_TRD]  Off       
                         [ERM_UD_O_TA]   Off  
                         [ERM_UD_O_ANS]  Off     

1. ERM_UD_S_RSIL         Ready next Service Initiated by LFY operator.
                         [ERM_UD_O_TRD]  Off        
                         [ERM_UD_O_TA]   Off  
                         [ERM_UD_O_ANS]  On (Flashing)
                         
2. ERM_UD_S_SDIE         Slow train Dispatch Initiated by ERM operator.
                         [ERM_UD_O_TRD]  On       
                         [ERM_UD_O_TA]   Off  
                         [ERM_UD_O_ANS]  Off
                    
3. ERM_UD_S_SAIL         Slow train Accepted Initiated by LFY operator.
                         [ERM_UD_O_TRD]  Off       
                         [ERM_UD_O_TA]   On   
                         [ERM_UD_O_ANS]  Off                              


Transitions
0 -> 1   if [ERM_UD_I_ANS]   asserted (level sensitive)
1 -> 2   if [ERM_UD_I_TRD]   pressed (edge sensitive)
2 -> 3   if [ERM_UD_I_UTA]   asserted (level sensitive) 
3 -> 1   if [ERM_UD_I_ANS]   asserted (level sensitive)


**LFY PANEL STATES AND TRANSITIONS**

**[LFY_UA PANEL] STATES AND TRANSITIONS


Inputs [LFY_UA_I]

[LFY_UA_I_STRD]      Connected to [ERM_UD_O_LFY_STRD]. Signal from ERM_UD Panel Indicates a Slow Train Ready Dispatch by ERM
[LFY_UA_I_UTA]       Up Train Accepted
[LFY_UA_I_RNS]       Ready Next Service

[LFY_UA_I_FSRD]      Connected to [CFY_UD_O_LFY_FSRD]. Signal from CFY_UD Panel. Indicates a Fast Train Ready Dispatch by CFY
[LFY-UA-I-FRS]       Connected to [ERM_UA_O_LFY_FRS].  Signal from ERM_UA Panel. Indicates Fast Route Set by ERM
[LFY_UA_I_UFA]       Up Fast Accepted
 
Outputs LEDs [LFY_UA_O]

[LFY_UA _O_TWA]      Train Waiting Acceptance
[LFY_UA _O_UTA]      Up Train Accepted
[LFY_UA _O_RNS]      Ready Next Service
[LFY_UA _O_UFRD]     Up Fast Ready Dispatch
[LFY_UA _O_FRS]      Fast Route Set
[LFY_UA _O_UFA]      Up Fast Accepted 

Output Signals

[LFY_UA_O_ERM_SUTA]  Signal to ERM_UD Panel @ [ERM_UD_I_UTA]  Indicates Slow Up Train Accepted on ERM_UD
[LFY_UA_0_ERM_RNS]   Signal to ERM_UD Panel @ [ERM_UD_I_ANS]  Indicates Ready Next Service on ERM_UD
[LFY_UA_O_CFY_UFA]   Signal to CFY_UD Panel @ [CFY_UD_I_FTA]  Indicates a Up fast Accepted on CFY_UD
[LFY_UA_O_ERM_UFA]   Signal to ERM_UA Panel @ [ERM_UA_I_UFN]  Indicates a Up Fast Accepted on ERM_UA

States [LFY_UA_STATE]


0. LFY_UA_S_INIT         The initial (or reset state) nothing is happening.
                         [LFY_UA_O_TWA]  Off        
                         [LFY_UA O_UTA]  Off   
                         [LFY_UA_O_RNS]  Off      
                         [LFY_UA_O_UFRD] Off      
                         [LFY_UA_O_FRS]  Off      
                         [LFY_UA_O_UFA]  Off
                        
1. LFY_UA_S_RSIL         Ready next Service Initiated by LFY operator.
                         [LFY_UA_O_TWA]  Off        
                         [LFY_UA O_UTA]  Off   
                         [LFY_UA_O_RNS]  On     
                         [LFY_UA_O_UFRD] Off      
                         [LFY_UA_O_FRS]  Off      
                         [LFY_UA_O_UFA]  Off
                         
2. LFY_UA_S_SDIE         Slow train Dispatch Initiated by ERM operator.
                         [LFY_UA_O_TWA]  On (Flashing)        
                         [LFY_UA O_UTA]  Off   
                         [LFY_UA_O_RNS]  Off      
                         [LFY_UA_O_UFRD] Off      
                         [LFY_UA_O_FRS]  Off      
                         [LFY_UA_O_UFA]  Off                
      
3. LFY_UA_S_SAIL         Slow train Accepted Initiated by LFY operator.
                         [LFY_UA_O_TWA]  Off        
                         [LFY_UA O_UTA]  On   
                         [LFY_UA_O_RNS]  Off      
                         [LFY_UA_O_UFRD] Off      
                         [LFY_UA_O_FRS]  Off      
                         [LFY_UA_O_UFA]  Off
                         
4. LFY_UA_S_FDIC         Fast train Dispatch Initiated by CFY operator.
                         [LFY_UA_O_TWA]  Off        
                         [LFY_UA O_UTA]  Off   
                         [LFY_UA_O_RNS]  Off      
                         [LFY_UA_O_UFRD] On      
                         [LFY_UA_O_FRS]  Off      
                         [LFY_UA_O_UFA]  Off

5. LFY_UA_S_FRSE         Fast Route Set by ERM.
                         [LFY_UA_O_TWA]  Off        
                         [LFY_UA O_UTA]  Off   
                         [LFY_UA_O_RNS]  Off      
                         [LFY_UA_O_UFRD] On      
                         [LFY_UA_O_FRS]  On (Flashing)      
                         [LFY_UA_O_UFA]  Off
                         
6. LFY_UA_S_FAIL         Fast train Accepted Initiated by LFY operator.
                         [LFY_UA_O_TWA]  Off        
                         [LFY_UA O_UTA]  Off   
                         [LFY_UA_O_RNS]  Off      
                         [LFY_UA_O_UFRD] Off      
                         [LFY_UA_O_FRS]  Off      
                         [LFY_UA_O_UFA]  On (Chase)
Transitions
0 -> 1   if [LFY_UA_I_RNS]   pressed (edge sensitive)
1 -> 2   if [LFY_UA_I_STRD]  asserted (level sensitive)
2 -> 3   if [LFY_UA_I_UTA]   pressed (edge sensitive) 
3 -> 1   if [LFY_UA_I_RNS]   pressed (edge sensitive)

1 -> 4   if [LFY_UA_I_FSRD]  asserted (level sensitive)   
4 -> 5   if [LFY_UA_I_FRS]   asserted (level sensitive)
5 -> 6   if [LFY_UA_I_UFA]   pressed (edge sensitive)
6 -> 1   if [LFY_UA_I_RNS]   pressed (edge sensitive)
 
Last edited:
That's a great idea because I can compare the versions of your post so I can see before/after changes.

Beware that you can only edit a post for so long...

The only downside is that I won't get a notification of your change. Just post a very brief summary of the change as a new post and It will get my attention.

LOL Yup must have just ran out of time :mad:

So here are the narratives for Post 143

SLOW TRAIN MOVEMENT LFY_DD to ERM_DA


Code:
SLOW TRAIN MOVEMENT [LFY_DD] TO [ERM_DA]

1.  On ERM_DA PANEL – Next Service

         Start of the sequence [ERM_DA] Panel will have [ERM_DA_O_RNS] “Ready Next Service” On. 
         This will have been initiated from the end of a routine by pressing [ERM_DA_I_RNS]. (discussed  in Step 4). 
         
    On LFY_DD PANEL- Next Service
          
           Start of the sequence will have [LFY_DD_O_ANS] “Awaiting Next Service” On (Flashing). 
           This input has come by receiving a signal from [ERM_DA_O_LFY_RNS] at [LFY_DD_I_ANS] (discussed in Step 4).
           
           
2.  On LFY_DD PANEL – Dispatch

          LFY Operator will (when ready) Press button [LFY_DD_I_TRD] “Train Ready Departure] 
          this will cause [LFY_DD_O_TRD]”Train Ready Dispatch” On and [LFY_DD_O_ANS]
          “Awaiting Next Service” Off. It will also send a signal [LFY_DD_O_ERM_STRD] 
          back to [ERM_DA] Panel Informing Button Pressed.

    On ERM_DA PANEL - Dispatch

          Signal received from [LFY_DD_O_ERM_STRD] at [ERM_DA_I_TWA]. This signal will 
          cause [ERM_DA_O_TWA] “Train Waiting Acceptance”] On (flashing) and [ERM_DA_O_RNS] “Ready Next Service” Off.
          
          
3.  On ERM_DA PANEL –Accepted
      
        ERM Operator will (when ready) Press button [ERM_DA_I_ADT]”Accept Down Train”. 
        This will cause [ERM_DA_O_ ADT] “Accept Down Train” On and [ERM_DA_O_TWA] 
        “Train Waiting Acceptance” Off.  This will also send a signal via [ERM_DA_0_LFY_SDTA] to [LFY_DD] Panel.

    On LFY_DD PANEL - Accepted

        Signal received from [ERM_DA_O_LFY_SDTA] at [LFY_DD_I_STA] causing [LFY_DD_O_TA] 
        “Train Accepted” On and [LYD_DD_O_TRD] “Train Ready Dispatch” Off.                               


4.  On ERM_DA PANEL – End Routine

        ERM Operator will control the train movement to his location. Then ERM will press 
        button [ERM_DA_I_RNS]. This will cause [ERM¬_DA_O_RNS] “Ready Next Service” On 
        and [ERM_DA_O_ADT] “Accept Down Train” Off.  This will also send a signal [ERM_DA_O_LFY_RNS]
        to the [LFY_DD] Panel (step 1)

    On LFY_DD PANEL – End Routine	

        Signal received from [ERM_DA_O_LFY_RNS]  at [LFY_DD_I_ANS] causing [LFY_DD_O_ANS] 
        “Awaiting Next Service” On (Flashing) and [LFY_DD_O_TA]”Train Accepted” Off (step 1).

ERN_DD to CFY_DA

Code:
SLOW TRAIN MOVEMENT [ERM_DD] TO [CFY_DA]

1.  On CFY_DA PANEL – Next Service

        Start of the sequence [CFY_DA] Panel will have [CFY_DA_O_RNS] “Ready Next Service” On. 
        This will have been initiated from the end of a routine by pressing [ERM_DA_I_RNS]. (discussed in Step 4). 
        
    On ERM_DD PANEL – Next Service
    
        Start of the sequence [ERM_DD] Panel will have [ERM_DD_O_ANS] “Awaiting Next Service” On (Flashing).
        This input has come by receiving a signal from [CFY_DA_O_ERM_RNS] at [ERM_DD_I_ANS]. (discussed in Step 4).


2.  On ERM_DD PANEL – Dispatch

        ERM Operator will (when ready) Press button [ERM_DD_I_TRD] “Train Ready Departure] this will cause [ERM_DD_O_TRD]
        ”Train Ready Dispatch” On and [ERM_DD_O_ANS] “Awaiting Next Service” Off. 
        It will also send a signal [ERM_DD_O_CFY_STRD] back to [CFY_DA] Panel Informing Button Pressed.

    On CFY_DA PANEL – Dispatch
        
        Signal received from [ERM_DD_O_CFY_STRD] at [CFY_DA_I_STRD]. This signal will cause [CFY_DA_O_TWA] 
        “Train Waiting Acceptance”] On (flashing) and [CFY_DA_O_RNS] “Ready Next Service” Off.


3.  On CFY_DA PANEL - Accepted

        CFY Operator will (when ready) press button [CFY_DA_I_DTA] “Down Train Accepted. 
        This will cause [CFY¬¬_DA_O_DTA] “Down Train Accepted” On and [CFY_DA_O_TWA] “Train Waiting Acceptance” Off.
        It will also send a signal [CFY_DA_O_ERM_SDTA] to [ERM_DD].

    On ERM_DD Panel – Accepted

        Signal received from [CFY_DA_O_ERM_SDTA] at [ERM_DD_I_DTA] causing [ERM_DD_O_DTA] “Down Train Accepted” On 
        and [ERM_DD_O_TRD] “Train Ready Dispatch” Off.                               


4.  On CFY_DA PANEL – End Routine

        CFY Operator will control the train movement to his location. Then CFY will press button [CFY_DA_I_RNS]. 
        This will cause [CFY_DA_O_RNS] “Ready Next Service” On and [ERM_DD_I_DTA] “Down Train Accepted” Off. 
        This will also send a signal [CFY_DA_O_ERM_RNS] to [ERM_DD] Panel.                  

    On ERM_DD PANEL – End Routine   
    
        Signal received from [CFY_DA_O_ERM_RNS] at [ERM_DD_I_ANS] causing [ERM_DD_O_ANS] “Awaiting Next Service” 
        On (Flashing) and [ERM_DD_O_DTA]”Down Train Accepted” Off (step 1).


DOWN FAST LFY_DD TO CFY_DA

Code:
DOWN FAST TRAIN MOVEMENT [LFY_DD] TO [CFY_DA]


1.  On LFY_DD PANEL – Next Service

        Start of the sequence [LFY_DD] Panel will have [LFY_DD_O_ANS] On (Flashing) “Awaiting Next Service. 
        This input has come by receiving a signal from [ERM_DA_O_LFY_RNS] at [LFY_DD_I_ANS]. (discussed in step 5)
        
    On ERM_DA PANEL – Next Service

        Start of the sequence [ERM_DA] Panel will have [ERM_DA_O_RNS] On “Ready Next Service”. 
        This will have been initiated from the end of a routine (discussed in Step 5) 

    On CFY-DA PANEL– Next Service
        Start of the sequence [CFY_DA] Panel will have [CFY_DA_O_RNS] “Ready Next Service” On.
        This will have been initiated from the end of a routine (discussed in Step 5).


2.  On LFY_DD PANEL – Dispatch

        LFY Operator will (when ready) Press button [LFY_DD_I_FSRD] “Fast Service Ready Departure”  
        this will cause [LFY_DD_O_FSRD]” Fast Service Ready Dispatch” On and [LFY_DD_O_ANS] “Ready Next Service” Off. 
        It will also send a signal [LFY_DD_O_ERM_FSRD] and [LFY_DD_CFY_FSRD] to the respective panels.

    On ERM_DA Panel – Dispatch
    
        Signal received from [LFY_DD_O_ERM_FSRD] at [ERM_DA_I_DFRD] which will cause [ERM_DA_O_DFRD] 
        “Down Fast Ready Dispatch” On (flashing) and [ERM_DA_O_RNS] Off.
        
    On CFY-DA Panel – Dispatch
  
        Signal received from [LFY_DD_O_CFY_FSRD] at [CFY_DA_I_FSRD] which will cause [CFY_DA_O_DFRD] 
        “Down Fast Ready Dispatch” On and [ERM_DA_O_RNS] Off.

3.  On ERM_DA Panel – Fast Route

        ERM Operator will (when ready) press button [ERM_DA_I_FRS] “Fast Route Set”.
        This will cause [ERM_DA_O_FRS] “Fast Route Set” On and [ERM_DA_O_DFRD “Down Fast Ready Dispatch” Off.
        This will also send a signal via [ERM_DA_O_ LFY_FRS]   and [ERM_DA_O_CFY_FRS} to the respective panels.

    On LFY_DD PANEL – Fast Route
  
        Signal received from [ERM_DA_O_LFY_FRS] at [LFY_DD_I_FRS] causing [LFY_DD_O_FRS] “Fast Route Set” On
        and [LFY_DD_O_FSRD] “Fast Service Ready Dispatch” Off.
    
    On CFY-DA Panel – Fast Route

        Signal received from [ERM_DA_O_CFY_FRS] at [CFY_DA_I_FRS] causing [CFY_DA_O_FRS] “Fast Route Set” On (Flashing) and [CFY_DA_O_DFRD] “Down Fast Ready Dispatch (remains On from step 2). 


4.  On CFY_DA PANEL – Fast Train Accepted

        CFY Operator will (when ready) press button [CFY_DA_I_DFA] “Down Fast Accepted”. 
        This will cause [CFY_DA_O_DFA] “Down Fast Accepted” On (Chase) and both [CFY_DA_O_FRS] and [CFY_DA_O_DFRD] Off. 
        This will also send a signal via [CFY_DA_O_ LFY_DFA] and [CFY_DA_O_ERM_DFA] to their respective panels.

    On LFY_DD PANEL – Fast Train Accepted

        Signal received from [CFY_DA_O_ LFY_DFA] at [LFY_DD_I_FTA] which will cause [LFY_DD_O_ DFA] 
        “Down Fast Accepted On (chase) and [LFY_DD_O_FRS] “Fast Route Set” Off.

    On ERM_DA PANEL _ Fast Train Accepted

        Signal received from [CFY_DA_O_ERM_DFA] at [ERM_DD_I_DFN] which will cause [ERM_DA_O_DFN]
        “Down Fast Next” On (chase) and [ERM_DA_O_FRS] “Fast Route Set” Off.





5.	BACK TO READY NEXT SERVICE FROM FAST SERVICE

THERE ARE TWO WAYS BACK TO START SEQUENCE.
(A)	 CLEAR ALL BLOCKS. 
(B)	 CLEAR OWN BLOCK


(A)	CLEAR ALL BLOCK: 
        
        This option will Only be available to the Receiving Fast Train Operator Panel
        [CFY_DA] For Fast Down Trains
        [LFY_UA] For Fast Up Trains

        If [ERM_DA] operator has NOT cleared his own block then this option is available. 
        If [ERM_DA] has already cleared his own block then [CFY_DA] button press [CFY_DA_I_RNS]
        will act as 5(B) CLEAR OWN ROUTE.
        
5(A)	On CFY_DA Panel – Clear All Blocks

	Signal received [ERM_DA_O_XYZ] at [CFY-DA_I_XYZ] will determine if this is available
          If true:  [CFY_ DA_O_RNS] On
	            [CFY_DA_O_DFA] Off
	            Signal [CFY_DA_O_LFY_XYZ], [CFY_DA_O_ERM_DA_XYZ] 
                    and [CFY_DA_O_ERM_DD_XYZ] sent to respective Panel.
          If false:  5(B)
          
5(A)	On LFY_DA Panel - Clear All Blocks

	Signal received [CFY_DA_O_LFY_XYZ] at [LFY_DD_I_XYZ] will determine if this is available.
          If true: 
                  [LFY_DD_O_ANS] On
                  [LFY_DD_O_FTA] Off
          If false:  5(B)

5(A)	On ERM_DA Panel – Clear All Blocks

        Signal received [CFY_DA_O_ERM_DA_XYZ] at [ERM_DA_I_XYZ] will determine if this is available.
          If true:
		[ERM_DA_O_RNS] On
                [ERM_DA_O_DFN] Off
          If false:  5(B)
          
5(A)	On ERM_DD Panel – Clear All Blocks

         Signal received [CFY_DA_O_ERM_DD_XYZ] at [ERM_DD_I_XYZ] will determine if this is available.
          If true:
                [ERM_DD_O_ANS] On
	If false:  5(B)


(B)	CLEAR OWN BLOCK: 

        This option is available at [ERM_DA] and [CFY_DA] Panels. 
        It will control the Clear Fast Sequence on the Down Line in two blocks, 
        Namely [LFY_DD to ERM_DA] and [ERM_DD to CFY_DA]. The same will be implemented on the Up Line.
        

5(B)    [LFY_DD] to ERM_DA] – Clear Own Block

            On ERM_DA Panel – Clear Own Block
  
                ERM_DA Operator will press button [ERM_DA_I_RNS] this will cause [ERM_DA_O_RNS] Ready Next Service On 
                and [ERM_DA_O_DFN] “Down Fast Next” Off. It will also send a signal via [ERM_DA_O_LFY_RNS] to [LFY_DD] panel. (step 1)
                
            On LFY_DD Panel – Clear Own Block

                Signal received [ERM_DA_O_LFY_RNS] at [LFY_DD_I_ANS] will cause[LFY_DD_O_ANS]”Awaiting Next Service” On (flashing)
                and [LFY_DD_O_FTA]” Fast Train Accepted”  Off. (step1).
                
5(B)     [ERM_DD] to [CFY_DA] – Clear Own Block

            On CFY_DA Panel – Clear Own Block
          
                CFY_DA Operator will press button [CFY_DA_I_RNS] this will cause [ERM_DA_O_RNS]
                “Ready Next Service” On and [CFY_DA_O_DFN] “Down Fast Next” Off. 
                It will also send a signal via [CFY_DA_O_ERM_RNS] to [ERM_DD] panel. (step1)

            On ERM_DD Panel – Clear Own Block
	
                Signal received [CFY_DA_O_ERM_RNS] at [ERM_DD_I_ANS] this will cause 
                [ERM_DD_O_ANS] “Awaiting Next Service” On (flashing). (step 1)

The Up Line is a reverse of this but i can do the same for that if required

Mark
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
I've been a little unwell for a couple of days. I thought I let you know so you don't think I'm ignoring you. I'll have a look at your conundrum and get back to you.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Could it Really be this Simple ?

It looks to me that state 7 is not a state, but a transition. I'm going to take a look at it again, but it seems to me that if a reset is initiated, then all relevant states just need a transition to a reset state.

It's like you're going to the shops:

The states may be
1) at home
2) In car
3) driving to shops
4) at shops
5) driving back
6) parking car in garage

The normal transitions are 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8. and there are various transitions that take us from one to the other.

Let's suppose we have a new signal "Wife calls and asks us to come home".

That's just a transition. You might have new transitions from the states 2, 3, 4, 5, and 6 that transition immediately back to 1 on this signal.

More likely, the signal would cause transitions 2 -> 1, 3 -> 5, 4 -> 5 because the call does not teleport you back.

In your case, perhaps the signal can cause an immediate transition.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Inputs/Outputs and States

In reference to post 143, the states also need to nominate the output signals.

for example:

Code:
0. LFY_DD_S_INIT         The initial (or reset state) nothing is happening.
                         [LFY_DD_O_TRD]  Off        
                         [LFY_DD_O_TA]   Off   
                         [LFY_DD_O_ANS]  Off      
                         [LFY_DD_O_FSRD] Off      
                         [LFY_DD_O_FRS]  Off      
                         [LFY_DD_O_DFA]  Off

needs to be something like

Code:
0. LFY_DD_S_INIT         The initial (or reset state) nothing is happening.
                         [LFY_DD_O_TRD]  Off        
                         [LFY_DD_O_TA]   Off   
                         [LFY_DD_O_ANS]  Off      
                         [LFY_DD_O_FSRD] Off      
                         [LFY_DD_O_FRS]  Off      
                         [LFY_DD_O_DFA]  Off

                         [LFY_DD_O_ERM_STRD]  Off
                         [LFY_DD_O_ERM_FSRD]  Off
                         [LFY_DD_O_CFY_FSRD]   Off

We need this, because one important analysis is what happens if a panel (say CFT_DA) gets reset while LFY_DD is in a particular state. Can we still effect correct transitions? And can we get into a state where two panels are waiting for the other, or worse, that 2 panels are continuously commanding the other to change.

Fortunately, since we're not controlling real trains, we don't have to be too exhaustive in this analysis, but we certainly need it to ensure normal transitions go the way we want them to.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
So here are the narratives for Post 143

SLOW TRAIN MOVEMENT LFY_DD to ERM_DA


Code:
SLOW TRAIN MOVEMENT [LFY_DD] TO [ERM_DA]

1.  On ERM_DA PANEL – Next Service

You now need to take these and rewrite them in terms of states and signals

e.g.


Code:
SLOW TRAIN MOVEMENT [LFY_DD] TO [ERM_DA]

1) STATES:

ERM_DA_PANEL in state 0 [ERM_DA_S_INIT] or 1 [ERM_DA_S_RSIE], LFY_DD_PANEL in state 0 [LFY_DD_S_INIT] or 1 [blah], or 6 [blah]

ACTION:
LFY_DD_PANEL operator presses input LFY_SLOW_TRAIN 

TRANSITIONS:
LFY_DD_PANEL transitions to state 2 [blah] (asserting [LFY_DD_O_ERM_STRD] signal)
ERM_DA_PANEL transitions to state 4 [blah]

2) STATES:

ERM_DA_PANEL in state 2 [blah], LFY_DD_PANEL in state 4 [blah]

ACTION:
ERM_DA_PANEL operator pressed input ERM_DA_ACCEPT

TRANSITIONS
ERM_DA_PANEL transitions to state 5 [blah] (Asserting ERM_DA_O_SLOW ACCEPT)
LFY_DD_PANEL transitions to state 3 [LFY_DD_S_SLOW_TRAIN_COMING]

And so on.

At each point, you will name the states you have, and note whether the transition you're expecting occurs with the input you're changing. And then you can cascade through any transitions that might occur on other panels, making sure they go to the right state, and don't keep going, or trigger unwanted transitions, etc...

It's a good idea to tick off states and transitions as you use them.

At this point you will have created each panels states and transitions, then walked through them with the valid examples.

Are there any unused states or transitions? If so, either there are some additional examples you need to exercise them, or possibly you have superfluous states and transitions.

After sorting that out, you've done a "bench test" of the system, and you should be reasonably confident that you have defined things correctly.

And then we start writing code (well, almost)
 
Steve,

Can You confirm that the 8 panels (4 up and 4 down line) will be treated as seperate state machines as currently the transition states match for each panel.
Am i expected to create State/transitions for each panel seperately irrespective of slow movement/fast movement??

sorry to hear you been poorly
 
Last edited:
Ok well i re read your posts

You now need to take these and rewrite them in terms of states and signals

And took the rewrite as "keep in separate movements for the time being"

And

At this point you will have created each panels states and transitions, then walked through them with the valid examples.

As when happy transfer to create each panel states and transitions

Haven't got this far yet.... BUT whilst what i wrote in "The Narratives" is what IS supposed to happen ... I have met some strong resistance ..lol

Code:
SLOW TRAIN MOVEMENT [LFY_DD] TO [ERM_DA]

ERM DA STATES:

0	ERM_DA_S_INIT		INITIAL			
1	ERM_DA_S_RSIE		READY NEXT SERVICE	
2	ERM_ DA_S_SDIL		SLOW DISPATCH		
3	ERM_DA_S_SAIE		SLOW ACCEPT		
4	ERM_DA_S_FDIL		FAST DISPATCH
5	ERM_DA_S_FRSE		FAST ROUTE SET
6       ERM_DA_S_FAIC		FAST ACCEPTED

LFY_DD_STATES

0	LFY_DD_S_INIT		INITIAL			
1	LFY_DD_S_RSIE		READY NEXT SERVICE	
2	LFY_ DD_S_SDIL		SLOW DISPATCH		
3	LFY_DD_S_SAIE		SLOW ACCEPT		
4       LFY_DD_S_FDIL		FAST DISPATCH
5	LFY_DD_S_FRSE		FAST ROUTE SET
6	LFY_DD_S_FAIC		FAST ACCEPTED

1)	STATES:

    LFY_DD PANEL IN STATE 0 (LFY_DD_S_INIT) and
    ERM_DA PANEL IN STATE 0 (ERM_DA_S_INIT) 
    Or
    LFY_DD PANEL IN STATE 3 (LFY_DD_S_SAIE) and
    ERM_DA PANEL IN STATE 3 (ERM_DA_S_SAIE)
	
    ACTION:

      ERM_DA OPERATOR press Input [ERM_DA_I_RNS]

    TRANSITIONS:

      ERM_DA PANEL TRANSITION to STATE 1 (ERM_DA_S_RSIE)           
      Asserting Signal [ERM_DA_O_LFY _RNS] 

      LFY_DD_PANEL TRANSITION to STATE 1 (LFY_DA_S_RSIE) 
      From Signal [ERM_DA_O_LFY_RNS] asserted at [LFY_DD_I_ANS] 
      
2)	STATES:

      LFY_DD PANEL IN STATE 1 (LFY_DD_S_RSIE)
      ERM_DA PANEL IN STATE 1 (ERM_DA_S_RSIE)

    ACTION:
      LFY_DD  OPERATOR press Input [LFY_DD_I_TRD]

    TRANSITIONS:
    
      LFY_DD_PANEL TRANSITION to STATE 2 (LFY_DD_S-SDIL) 
      Asserting Signal [LFY_DD_O_ERM_STRD] 

      ERM_DA PANEL TRANSITION to STATE 2 (ERM_DA_S_SDIL)   
      From Signal [LFY_DD_O_ERM_STRD] asserted at [ERM_DA_I_TWA]     

3)	STATES:

      LFY_DD PANEL IN STATE 2 (LFY_DD_S_SDIL)
      ERM_DA PANEL IN STATE 2 (ERM_DA_S_SDIL)

     ACTION:
     
        ERM_DA OPERATOR press Input [ERM_DA_O_I_ADT]

     TRANSITIONS:

        ERM_DA PANEL TRANSITION to STATE 4 (ERM_DA_S_SAIE)   
        Asserting Signal [ERM_DA_O_LFY_STDA] 

        LFY_DD_PANEL TRANSITION to STATE 3 (LFY_DD_S_SAIE)
        From Signal [ERM_DA_O_LFY_STDA] asserted at [LFY_DD_I _STA]

This works fine at the moment :)

Code:
SLOW TRAIN MOVEMENT [ERM_DD] TO [CFY_DA]

ERM DD STATES:

0	ERM_DD_S_INIT		INITIAL			
1	ERM_DD_S_RSIC		READY NEXT SERVICE	
2	ERM_DD_S_SDIE		SLOW DISPATCH		
3	ERM_DD_S_SAIC		SLOW ACCEPT		

CFY_DA_STATES
0	CFY_DA_S_INIT		INITIAL			
1	CFY_DA_S_RSIC		READY NEXT SERVICE	
2	CFY_DA_S_SDIE		SLOW DISPATCH		
3       CFY_DA_S_SAIC		SLOW ACCEPT
4	CFY_DA_S_FDIL		FAST DISPATCH
5	CFY_DA_S_FRSE		FAST ROUTE SET
6	CFY_DA_S_FAIC		FAST ACCEPTED

1)	STATES:

        ERM_DD PANEL IN STATE 0 (ERM_DD_S_INIIT) and
        CFY_DA PANEL IN STATE 0 (CFY_DA_S_INIT) 
        Or
        ERM_DD PANEL IN STATE 3 (ERM_DD_S_SAIC) and
        CFY_DA PANEL IN STATE 3 (CFY_DA_S_SAIC)
	
    ACTION:
        CFY_DA OPERATOR press Input [ERM_DA_I_RNS]

    TRANSITIONS:
    
        CFY_DA PANEL TRANSITION to STATE 1 (CFY_DA_S_RSIC)           
        Asserting Signal [CFY_DA_O_ERM _RNS] 

        ERM_DD_PANEL TRANSITION to STATE 1 (ERM_DD_S_RSIC) 
        From Signal [CFY_DA_O_ERM_RNS] asserted at [ERM_DD_I_ANS] 

2)	STATES:

        ERM_DD PANEL IN STATE 1 (ERM_DD_S_RSIC) and
        CFY_DA PANEL IN STATE 1 (CFY_DA_S_RSIC) 
	
    ACTION:
    
        ERM_DD OPERATOR press Input [ERM_DD_I_TRD]

    TRANSITIONS:
    
        ERM_DD PANEL TRANSITION to STATE 2 (ERM_DD_S_SDIE)           
        Asserting Signal [ERM_DD_O_CFY _STRD] 

        CFY_DA_PANEL TRANSITION to STATE 2 (CFY_DA_S_SDIE) 
        From Signal [CFY_DA_O_ERM_STRD] asserted at [CFY_DA_I_STRD] 

3)	STATES:

        ERM_DD PANEL IN STATE 1 (ERM_DD_S_SDIE) and
        CFY_DA PANEL IN STATE 1 (CFY_DA_S_SDIE) 
	
    ACTION:
    
        CFY_DA OPERATOR press Input [CFY_DA_I_DTA]

    TRANSITIONS:
    
        CFY_DA PANEL TRANSITION to STATE 3 (CFY_DA_S_SAIC)           
        Asserting Signal [CFY_DA_O_ERM _SDTA] 

        ERM_DD_PANEL TRANSITION to STATE 3 (ERM_DA_S_SAIC) 
        From Signal [CFY_DA_O_ERM_SDTA] asserted at [ERM_DD_I_DTA]

This too :)

The problem lies in the Slow to Fast Interface.

Code:
FAST TRAIN MOVEMENTS [LFY_DD] TO [CFY_DA]

LFY_DD_STATES

0	LFY_DD_S_INIT		INITIAL			
1	LFY_DD_S_RSIE		READY NEXT SERVICE	
2	LFY_ DD_S_SDIL		SLOW DISPATCH  *NOT USED IN FAST TRAIN*	
3	LFY_DD_S_SAIE		SLOW ACCEPT    *NOT USED IN FAST TRAIN*		
4	LFY_DD_S_FDIL		FAST DISPATCH
5	LFY_DD_S_FRSE		FAST ROUTE SET
6	LFY_DD_S_FAIC		FAST ACCEPTED

ERM DA STATES:

0	ERM_DA_S_INIT		INITIAL			
1	ERM_DA_S_RSIE		READY NEXT SERVICE	
2	ERM_ DA_S_SDIL		SLOW DISPATCH  *NOT USED IN FAST TRAIN*		
3       ERM_DA_S_SAIE		SLOW ACCEPT    *NOT USED IN FAST TRAIN*		
4	ERM_DA_S_FDIL		FAST DISPATCH
5	ERM_DA_S_FRSE		FAST ROUTE SET
6	ERM_DA_S_FAIC		FAST ACCEPTED

CFY_DA_STATES
0	CFY_DA_S_INIT		INITIAL			
1	CFY_DA _S_RSIC		READY NEXT SERVICE	
2	CFY_DA _S_SDIE		SLOW DISPATCH	*NOT USED IN FAST TRAIN*	
3	CFY_DA _S_SAIC		SLOW ACCEPT     *NOT USED IN FAST TRAIN*
4	CFY_DA _S_FDIL		FAST DISPATCH
5	CFY_DA _S_FRSE		FAST ROUTE SET
6	CFY_DA _S_FAIC		FAST ACCEPTED


1)	STATES:

        LFY_DD PANEL IN STATE 1 (LFY_DD_S_RNS) and
        ERM_DA PANEL IN STATE 1 (ERM_DA_S_RNS) and
        CFY_DA PANEL IN STATE 1 (CFY_DA_S_RNS)

(can this be right as ERM_DD will also be in RNS when CFY-DA in RNS also what if ERM_DD and CFY DA not in RNS when input LFY_DD_I_FAST  selected ) 
	
     ACTION:
     
        LFY_DD  OPERATOR press Input [LFY_DD_I_FSRD]

    TRANSITIONS:

        LFY_DD PANEL TRANSITION to STATE 4 (LFY_DD_S_FDIL)           
        Asserting Signal [LFY_DD_O_ERM _FSRD] 
        Asserting Signal [LFY_DD_O_CFY_FSRD]

        ERM_DA PANEL TRANSITION to STATE 4 (ERM_DA_S_FDIL)
        From Signal [LFY_DD_O_ERM_FRSD] asserted at [ERM_DD_I_DFRD]

        CFY_DA PANEL TRANSITION to STATE 4 (CFY_DA_S_FDIL)
        From Signal [LFY_DD_O_CFY_FRSD] asserted at [ERM_DD_I_FSRD]

2)	STATES:

        LFY_DD PANEL IN STATE 4 (LFY_DD_S_FDIL) and
        ERM_DA PANEL IN STATE 4 (ERM_DA_S_FDIL) and
        CFY_DA PANEL IN STATE 4 (CFY_DA_S_FDIL)

    ACTION:
    
        ERM_DA OPERATOR press Input [ERM_DA_I_FRS]

    TRANSITIONS:

        ERM_DA PANEL TRANSITION to STATE 5 (ERM_DA_S_FRSE)           
        Asserting Signal [ERM_DA_O_LFY _FRS] 
        Asserting Signal [ERM_DA_O_CFY_FRS] 

        LFY_DD PANEL TRANSITION to STATE 5 (LFY_DD_S_FRSE) 
        From Signal [ERM_DA_O_LFY_FRS] asserted at [LFY_DD_I_FRS]

        CFY_DA PANEL TRANSITION to STATE 5 (CFY_DA_S_FRSE) 
        From Signal [ERM_DA_O_CFY_FRS] asserted at [CFY_DA_I_FRS]


3)	STATES:

        LFY_DD PANEL IN STATE 4 (LFY_DD_S_FRSE) and
        ERM_DA PANEL IN STATE 4 (ERM_DA_S_FRSE) and
        CFY_DA PANEL IN STATE 4 (CFY_DA_S_FRSE)

      ACTION:

        CFY_DA OPERATOR press Input [CFY_DA_I_DFA]

      TRANSITIONS:

        CFY_DA PANEL TRANSITION to STATE 6 (CFY_DA_S_FAIC)           
        Asserting Signal [CFY_DA_O_LFY _DFA] 
        Asserting Signal CFY_DA_O_ERM_DFA] 

        LFY_DD PANEL TRANSITION to STATE 6 (LFY_DD_S_FAIC) 
        From Signal [CFY_DA_O_LFY_DFA] asserted at [LFY_DD_I_FTA]

        ERM_DA PANEL TRANSITION to STATE 5 (ERM_DA_S_FAIC) 
        From Signal [CFY_DA_O_ERM_DFA] asserted at [CFY_DA_I_DFN]

4)	STATES:	Ready Next – Clear All Blocks

        LFY_DD PANEL IN STATE 6 (LFY_DD_S_FAIC) and
        ERM_DA PANEL IN STATE 6 (ERM_DA_S_FAIC) and
        CFY_DA PANEL IN STATE 6 (CFY_DA_S_FAIC)
	
    ACTION:
    
        CFY_DA OPERATOR press Input [CFY_DA_I_RNS]

    TRANSITIONS:

        CFY_DA PANEL TRANSITION to STATE 1 (CFY_DA_S_RSIC)           
        Asserting Signal [CFY_DA_O_LFY _XYZ] 
        Asserting Signal [CFY_DA_O_ERM_DA _XYZ]
        Asserting Signal [CFY_DA_O_ERM_DD _XYZ]

        LFY_DD_PANEL TRANSITION to STATE 1 (LFY_DD_S_RSIC) 
        From Signal [CFY_DA_O_LFY_XYZ] asserted at [LFY_DD_I_XYZ]

        ERM_DA_PANEL TRANSITION to STATE 1 (ERM_DA_S_RSIC) 
        From Signal [CFY_DA_O_ERM_DA _XYZ] asserted at [ERM_DA_I_XYZ]

        ERM_DD_PANEL TRANSITION to STATE 1 (ERM_DD_S_RSIC) 
        From Signal [CFY_DA_O_ERM_DD _XYZ] asserted at [ERM_DD_I_XYZ]

5)	STATES:	Ready Next – Clear Own Block (LFY_DD and ERM-DA)

        LFY_DD PANEL IN STATE 6 (LFY_DD_S_FAIC) and
        ERM_DA PANEL IN STATE 6 (ERM_DA_S_FAIC) 
	
    ACTION:
    
        ERM_DA OPERATOR press Input [ERM_DA_I_RNS]

    TRANSITIONS:

        ERM_DA PANEL TRANSITION to STATE 1 (ERM_DA_S_RSIE)           
        Asserting Signal [ERM_DA_O_LFY _RNS] 

        LFY_DD_PANEL TRANSITION to STATE 1 (LFY_DA_S_RSIE) 
        From Signal [ERM_DA_O_LFY_RNS] asserted at [LFY_DD_I_ANS] 

6)	STATES: 	Ready Next – Clear Own Block (ERM_DD and CFY-DA)

        ERM_DD PANEL IN STATE 3 (ERM_DD_S_SAIC) and
        CFY_DA PANEL IN STATE 3 (CFY_DA_S_SAIC)
	
    ACTION:
    
    CFY_DA OPERATOR press Input [ERM_DA_I_RNS]

    TRANSITIONS:
    
    CFY_DA PANEL TRANSITION to STATE 1 (CFY_DA_S_RSIC)           
    Asserting Signal [CFY_DA_O_ERM _RNS] 

    ERM_DD_PANEL TRANSITION to STATE 1 (ERM_DD_S_RSIC) 
    From Signal [CFY_DA_O_ERM_RNS] asserted at [ERM_DD_I_ANS]

So whats troubling me,

Well if LFY_DD decides to initiate a fast train movement.... but ERM_DD to CFY_DA are on a slow train movement... then what happens then. Is there a way to delay the input until the slow movement has been completed and the Instant a "ready next service" Is inputted at CFY the "Fast Train Sequence" is launched ??

The other thing that worries me is getting out of the fast train movement back to ready next service... mainly because ERM_DD is left out of the loop in "Fast Movements" .. One thought i had and i'm unsure if possible is to put ERM_DD in State 0 ( all lights off) during "fast movements".

The Only reason i say this is that the intention was that if a panel went to "Reset/Initial" state... the lights would go off...and the sequence would need to be started from scratch with a "Ready Next Service" Input.. this would also mean that there would be no recognised inputs from ERM_DD during fast movements.

The other idea was to have a set of "Ghost" inputs to ERM_DD that matched the fast sequence but had no "physical" outputs (LEDs)

What do you think ??

Oh ps i think state 7 is required because a seperate signal would need to be set on (XYZ in code) to signal all panels to go to "RNS" if CFY_DA actioned post "fast movements" this (signal) would not be so if ERM_DA actioned "Ready Next Service" first.

Mark
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Steve,

Can You confirm that the 8 panels (4 up and 4 down line) will be treated as seperate state machines as currently the transition states match for each panel.

Yep, that's where we are going.

Am i expected to create State/transitions for each panel seperately irrespective of slow movement/fast movement??

The state transition models for each station need to deal with both fast and slow train movements.

The states and transitions must be set up so that we can't start things when we're not supposed to .

sorry to hear you been poorly

So was I :)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
No :)

I'm also on a training course for three days at the moment, so I'm even more busy than usual.

I've briefly looked at what you have and it certainly seems to be the sort of thing I expect. However I really want to walk through the states and assure myself that everything is OK. If I find errors, I'll get you to walk through the states to see if you can figure out what needs to be changed.

Sorry about the delay.
 
Top