• No results found

JMRI Panel Tutorial Part 2

N/A
N/A
Protected

Academic year: 2021

Share "JMRI Panel Tutorial Part 2"

Copied!
61
0
0

Loading.... (view fulltext now)

Full text

(1)

JMRI Panel Tutorial – Part 2

Introduction

To

Layout Editor

And

Panel Editor

(JMRI)

Robert Bucklew

[email protected]

06/26/2012

(2)
(3)

Panel Editor Development

We are ready to start development of the second panel using Panel Editor. The Panel Editor is a blank canvas

on which you can add graphic icons. Each icon is placed on a level, with 1 being the lowest-level background

and 10 being the highest-level foreground. Switches, buttons and levers will go on level 10. We'll move the

background icons to level 2 after they are added. Plates and lamps go in between. Graphic images are in the

resources\icon directory of JMRI. You select the graphic icons and add them to the panel, moving them into

place. The icons drop onto the panel at the x,y coordinates indicated on the panel editor. (See FIG 32) You

can then right click and move them as needed. Some icons may be hard to see based on the background at

0,0. But you can grab them and move them just the same.

1. From the main screen, select, Panels, New Panel, Panel Editor as shown in F

IG

31.

FIG 31 – STARTING PANEL EDITOR

2. The blank panel is shown waiting for you to add icons, sensors and turnouts in the right places. Also

open is the Panel Editor, which you will use to add elements to the panel. See F

IG

32.

(4)

3. Click the drop down box “Select the type of icon to Add to the panel” and scroll down to the bottom

entry “Icon” as shown in F

IG

33.

FIG 33 – SELECTING ICONS WITH PANEL EDITOR

4. This opens the “Add Icon” screen and you will click on the “Change Icon” button. Expand the Program

Directory by clicking on the key at the left side. Expand the icons directory as well. Click on Program

Directory as shown in F

IG

34.

(5)

5. To add an icon, we must drag it to the top button labeled Icon. First add a left side CTC panel

background slice icon. In the Icons folder, scroll down to the USS folder and open it. Find the icon

named Panel-left-7 and drag it to the Icon button. Its picture appears ready to be added to the panel.

See F

IG

35.

FIG 35 – ADD ICONS WITH LEFT BACKGROUND PANEL SELECTED

6. Click the “Add to panel” button and the left slice appears in position.

When you drag the icon, a box with a cross hair will appear. Please note that the arrow point of your mouse

pointer must be inside the Icon button before releasing the mouse button, not the box picture you are

dragging.

7. Now drag the icon “Panel-blank-7” to the Icon position and click Add to Panel.

8. As it is added at coordinates 0,0 it is on top of the left side slice. Right click the icon and move it to the

right.

(6)

9. Right click on the full slice and select and edit x & y as shown in F

IG

36. Move it to position 12,0 so it is

adjacent to the left slice.

FIG 36 – CTC PANEL WITH TWO BACKGROUND ICONS – EDITING X Y LOCATION

10. Click on the panel editor and change the x coordinate to 77. Click on the Add Icon panel and the Add to

panel button. The new slice lines up with the first full slice.

11. Repeat this adding 65, which is the width of each slice. So 142 is next, then 207.

12. Continue adding a total of 7 lever slices at 272, 337 and 402.

13. Then select and add the Panel-right-7 at x position 467.

14. Right click and delete any icon if needed.

(7)

15. You can re-size the borders of your new panel by dragging them to fit. Your new panel should look like

F

IG

37.

FIG 37 - COMPLETED CTC BACKGROUND WITH RE-SIZED FRAME

I have also turned off the scroll bars on the Panel Editor and re-sized the frame to show the complete CTC

panel background. Note the center icon slice is highlighted in yellow as the mouse hovers over it. You can use

this feature to identify icons on your panel as it grows. Right click on each slice and Edit Level, Set Level to 2

for each of the background slices. Now is a good time to Store your panels with a new file name.

(8)

Adding Turnout and Signal Plates

Now we will add the turnout plates.

1. Add turnout plates 3, 5, 9 and 11 as shown in F

IG

37. These icons are in the

\resources\icons\USS\plate\numbered-plates\turnout directory. Drag each one to the Icon position

and add to panel at x, y = 0,0 position. Right click and drag them into position over the plugs in the

background slices. They should be on level 3, just above the background image.

2. The x, y coordinates for the turnout 3 plate is 77,337. You can add 65 to the x position for each new

plate, skipping the 7 position. Add signal plates 4, 6, 10 and 12 from the signal directory in a similar

manner. The first (signal 4) goes at x, y = 77,435.

3. You may also add the US&S plate from the \USS\plate\base-plates\misc directory and the Code plate

from the same directory. You might like to add the JMRI48x48 icon from the Program Directory itself.

You panel should look like F

IG

38.

(9)

Adding Turnout Levers and Code Buttons

The turnout or switch lever is an internal sensor that through the Logix controls the railroad turnouts. So we

need to create these sensors before adding them to the panel. We will use IS03, IS05, IS09 and IS11 for the

turnout levers and IS04, IS06, IS10 and IS12 as the code buttons. US&S practice was to number turnout levers

odd and signal levers even. Open spots were reserved for a future lever, so we will start with lever 3 and leave

1 and 7 open. The signal levers will be multi-position sensors, so we will use the even numbers for the code

buttons.

1. From the main screen, select, Tools, Tables, Sensors as we did before; shown in Part 1, F

IG

14

2. Press the ADD button and enter the new internal sensor IS03 with name “Turnout Lever 3”

3. Continue to add turnout lever sensors IS05, IS09 and IS11.

4. Add 4 code button sensors IS04 IS06, IS10 and IS12 as Code Button 4, etc. Your complete sensor table

should look like F

IG

39.

FIG 39 – EIGHT INTERNAL SENSORS ADDED

(10)

Now we will add the turnout levers and code buttons to the panel. Sensors have 4 states and we need to

define an icon image for each. The four states are active, inactive, unknown and inconsistent.

1. In the Panel Editor, click the drop down box to add a sensor to the panel as shown in F

IG

40.

(11)

2. Click Change Icons and open the Program Directory\USS\plate\levers\ directory. Drag the l-left lever to

the inactive image as shown in F

IG

41.

FIG 41 – ADDFING THE LEVER ICONS

3. Drag the l-right lever icon to the active image.

4. Drag the l-unknown icon to the unknown image.

5. Drag the l-inconsistent icon to the inconsistent image.

6. Click on the button to Close

(12)

7. Highlight sensor IS03 in the table and click the Add to panel button as shown in F

IG

42.

FIG 42 – ADD A LEVER SENSOR TO PANEL

8. The sensor icon for IS03 is added at coordinates 0,0; drag it into position. Click on it to change the

sensor status.

9. While you have the lever icons selected, add IS05, IS09 and IS11. They will stack on each other at

position 0,0.

10. Right click and move them into position, noting the correct order.

11. Click the change icon button. The code buttons are in the same icon directory.

12. Drag the code button icon to the inactive image.

13. Drag the code-press icon to the active image.

14. Drag the code-unknown icon to the unknown image.

15. Drag the code-inconsistent icon to the inconsistent image.

16. Click the Close Catalog button.

17. Highlight the IS04 sensor in the table and click on the Add to panel button.

18. As it is added at coordinates 0,0 drag it into position.

19. While you have the code button icons selected, add IS06, IS10 and IS12. They will stack on each other

at position 0,0.

(13)

21. Right click a code button so the menu appears. Check the momentary feature so that the code button

will immediately go inactive after being pushed. Do the same for each code button. Your CTC panel

should look like F

IG

43.

FIG 43 – CTC PANEL WITH TURNOUT LEVERS AND CODE BUTTONS

22. Close the Add Sensor frame. JMRI will ask if you want to keep the icons for future use. Click No.

Now you can play with your new CTC panel with the sensor table open along side. Mouse click the code

buttons and note they change from unknown to active (momentary) to inactive. Each new push will make

them active for a moment, returning to the inactive state.

23. Click the turnout levers and watch the sensor table. They should move from unknown to inactive and

active, toggling between the two known states with each additional touch.

24. Clean up the screen by closing the Sensor table and Panel Editor.

(14)

Adding Turnout Lever Logix

Now let us start to construct the “mechanism” behind the CTC panel. First we need to add the turnout lamps

to our panel. We’re going to use the defined NCE turnouts, so there is no sensor on the turnout. If we tell

turnout NT1 to throw, we assume it is thrown. Of course you could have contacts and monitor them just as

well. In fact if you want to get more complicated, the turnouts lamps could both go out until the turnout state

matches the feedback sensor. Just more Logix to construct. For this tutorial, we are going to stay simple. But

these lamps will be turnouts as they are tied to the NTxxx hardware. Turnouts also have four states, closed,

thrown, unknown and inconsistent

1. First click on the Panel Menu, Edit to open the Panel Editor

2. In the drop down box, select right hand turnout as shown in F

IG

44

FIG 44 – SELECTING THE TURNOUT ICON

(15)

4. Open the resources\icons\USS\sensor directory as shown in F

IG

45

FIG 45 – SENSOR ICONS FOR THE TURNOUT LAMPS

5. Drag the green-on lamp icon to the closed image.

6. Drag the green-off icon to the thrown image.

7. Drag the s-unknown icon to the unknown image.

8. Drag the s-inconsistent icon to the inconsistent image.

9. Click on the Close

(16)

10. Highlight NT1 and click the Add to Panel button to add the lamp as shown in F

IG

46

FIG 46 – ADDING THE TURNOUT LAMP

11. Add turnout icons for NT2, NT3 and NT4 to the panel. They will stack on each other at position 0,0.

12. Right click and move them into position in the left position above each turnout lever, noting the correct

order, NT1 to NT4 from left to right.

13. Click on the Change Icon button again.

14. Open the \USS\lamps\ directory again. Drag the amber-off lamp icon to the closed image.

15. Drag the amber-on icon to the thrown image. This opposite what we did for the green lamp.

16. Close the catalog and add the turnout icons for NT1, NT2, NT3 and NT4 to the panel. They will stack on

each other at position 0,0.

(17)

17. Right click and move them into position in the right position above each turnout lever, noting the

correct order. Your panel should look like F

IG

47.

FIG 47 – CTC PANEL WITH TURNOUT LAMPS AND LEVERS AND CODE BUTTON IN PLACE.

The typical US&S panel showed a green lamp for Normal or Closed turnout and a yellow lamp for a Reverse or

Thrown turnout. You can make changes for your particular prototype. Now click on the lamp and the turnout

lamp will change, one green and one yellow. Not prototypical at all, but we will fix that as we continue. Note

also that the turnout lamp on the CTC panel follows the turnout on the layout panel (and vice versus).

(18)

Time to automate the first lever:

1. From the main screen, select, Tools, Tables, Logix as shown in F

IG

48

FIG 48 – LOGIX TABLE OPENED

2. Press the ADD button and create a new Logix IX03 with the name “Turnout Lever 3”. See F

IG

49.

(19)

3. Create a new conditional for the Closed turnout position. See F

IG

50 and F

IG

51. You will enter the

Conditional User Name “Lever Normal”. Then click on the button Add State Variable

FIG 50 - CREATE NEW CONDITIONAL

(20)

4. In the new frame, pick a Variable Type “Sensor” as shown in F

IG

52

FIG 52 – ADDING STATE VARIABLES TO CONDITIONAL FOR LEVER NORMAL

5. Enter the User name “Turnout Lever 3” and change the state to Inactive as shown in F

IG

53

FIG 53 – SENSOR VARIABLE FOR CONDITIONAL

(21)

7. Uncheck the Trigger Cal box for the Turnout Lever. Your screen should look like F

IG

54

FIG 54 – COMPLETE CONDITIONAL VARIABLES

We will add additional conditions to prevent throwing a turnout under a train or changing once a route is set

across the turnout. But we'll keep it simple now. If you notice, we have set the logic to AND, so both events

have to be true. And changing the lever will not “trigger” the action. Only the code push will trigger the

action. Note the Status of the first variable is true, that is the turnout lever 3 is inactive or set to the Normal

or Closed position. Now add the action we want.

(22)

2. Select Turnout for the Action Group as shown in F

IG

55

FIG 55 – ACTION GROUP ITEMS

3. We will enter the System name NT1 here. Or you can enter the user name. We want to Set Turnout to

the Closed position when the condition changes to True as shown in F

IG

56.

(23)

4. Click on the Update Button and your screen should look like F

IG

57. Click on the Update Conditional

Button

FIG 57 - COMPLETE ACTIONS

(24)

6. This conditional should look like F

IG

58

(25)

7. Click on Update Conditional and you should return to Logix IX03 screen which should look like F

IG

59

FIG 59 – COMPLETED LOGIX IX03

8. Click Done and you will get a reminder to save your Logix. Don't worry. When you save your panel, all

Logix, turnout and sensor tables are saved along with your open panels.

Now you can test your lever Logix. Bring the CTC panel to the foreground and flip the turnout lever 3 back and

forth. Nothing else should change. Now set it to the right “R” position. Click the code button. The Thrown

Logix should execute and set the turnout NT1 to the thrown position. You should see this on both the CTC

Panel and the Layout Panel. Move the lever back to the “N” position and click the code button. The turnout

should return to a Closed position.

The Logix conditionals permit you to monitor many sensors and only take action when all of the Logix you

create lines up. The Trigger box is used to activate the conditional when that sensor goes true. So flipping the

turnout lever does not trigger the conditional. Only pushing the code button triggers the action.

(26)

We should add some conditions to the new Logix to prevent throwing a turnout under a train on turnout 3.

But we need to create some more internal sensors to accomplish that. Before we add the Logix for the

remaining turnouts, let us more fully develop the first turnout position.

Now is a good time to save your panel.

The CTC Panel Track Diagram

There are several ways to develop the track diagram for the CTC panel. On my Quaker Valley Railroad, there

are two panels and the track diagrams were developed using MS Paint. This is simply a gif file icon that is

placed on the panel at level 3, just above the background. One of my complete track diagrams is provided on

the web site. A sample for this tutorial is also available. If you want to see this, add the icon “sampleCTC.gif”

to the panel. It should be located in the JMRI panels directory if you followed the directions in Part 1.

1. To add this large track diagram icon, click on the CTC panel menu, Editor, Open Editor

2. Click on the drop and select Icon as we have before in F

IG

33

3. Click on the Change icon button as in F

IG

34

4. Select the menu option for Find Icons, Search File system for icons

5. Navigate to the C:\JMRI_Panels\ directory

6. Click on the sampleCTC.gif file and click the open button

7. After a brief wait, a Preview Directory frame will open. Click on Add to Catalog

8. The JMRI_Panels directory will appear as a resource below the standard Program Directory

9. Click on this directory and drag the sampleCTC.gif to the Icon position

(27)

11. Drag the track diagram to position as shown in F

IG

60

FIG 60 – SAMPLE CTC GIF TRACK DIAGRAM ON PANEL

This sample diagram includes a schematic diagram of the track layout, turnout numbers in gold, signal

locations and text to identify locations. It was developed in MS paint. Right click and remove this sample if

you want to see how to develop the track diagram in another way.

For this tutorial, we will build the track diagram using the JMRI icons provided.

1. From the Panel Editor, select a Left Hand Turnout

2. Keep the standard icons and highlight NT1

(28)

3. Click Add to Panel and examine your CTC panel. In the upper left corner should appear a turnout as

shown in F

IG

61

FIG 61 – TURNOUT ICON

4. Throw your turnout lever and push the code button.

5. Note your turnout icon is live and follows the lamps on the panel.

6. This is not very prototypical, so right click and remove the turnout icon

Lets build a track diagram using the standard JMRI icons.

1. From the Panel Editor, select Icon

(29)

3. Click on the Dark Grey bullet at the bottom to set the background to make it easier to see the white

icons – see F

IG

62

FIG 62 – TURNOUT ICON SELECTION

4. Drag the east-l icon to the Icon image at top and Add to Panel

5. Add a second one to the panel

(30)

6. Navigate to the turnout\right\west directory and add two west-r icons to the panel, Now go the panel

and drag your four icons into position as shown in F

IG

63

FIG 63 - TURNOUT ICONS IN POSITION FOR TRACK DIAGRAM

Now lets add some straight track

7. From the Panel Editor, select Icon

8. Click on Change Icon and open the Program Directory\USS\track\block

9. Drag the block.gif to the Icon position and add 15 icons to the panel

10. Drag the b-45-dark gif to the Icon and add 1 copy to the panel.

11. Go to the panel and select the gray line on the diagonal as shown in F

IG

64. Drag it onto the track

diagram.

(31)

12. Right click on it and select rotate (degrees)

13. Enter 90 degrees and set

14. Now drag it down between the two passing sidings. This will represent your stub yard track.

15. Now drag the rest of the blocks onto the diagram and work toward F

IG

65

FIG 65 – TRACKS IN PLACE ON DIAGRAM

16. Note I overlapped some straight block and the turnouts to create a larger place for block indicators.

Now we can add text to the track diagram.

1. On the Panel Editor, add WESTON to the block next to the Add text button

2. Click the Add text button

(32)

4. Add numbers 3, 5, 9 and 11 and change color and move as shown in F

IG

66

FIG 66 - TEXT ADDED TO TRACK DIAGRAM

We are now ready to place block sensors.

1. Click the Panel Editor to add a sensor.

2. We'll use the standard sensors here.

3. Highlight sensor IS801 and add two icons to the panel

4. Highlight each sensor IS802 through IS806 and add 1 icon to the panel for each

5. Add an extra for IS804

6. Go to the panel and drag them into place. IS801 shows twice, on each end of the track diagram, as the

layout is a loop. IS802 is the main at Weston, IS803 is the siding. IS804 shows twice on the single track

on either side of the yard turnout. IS805 is the main at Eastville. IS805 is the siding there. Note that

IS806 will be on top as it was added last. As you right click you can confirm the name of the icon you

are moving.

Now we will add the sensors in the interlockings. We will select a red icon for active from the

\icons\smallschematics\LEDs directory.

7. Drag the red icon to the active position and Close Catalog.

(33)

10. When you are done, you should have F

IG

67. Note some sensors may still be in an unknown state.

FIG 67 – TRACK SENSORS IN PLACE

Activating the Block Sensors

Now we need a way to activate the block sensors. Since we are working as a simulator, we'll do it with some

additional sensors.

1. From the main menu, select Tools, Tables, Sensors as we did in the part 1 of the tutorial.

2. Click the Add button and set the sensor drop down box to NCE.

(34)

3. The first new sensor will be 801 for Detector 801 as shown in F

IG

68.

FIG 68 – ADDING NCE SENSORS

4. Add NCE sensors for Detectors 802 through 806.

5. Your sensor table should look like F

IG

69.

(35)

6. Open the Panel Editors and click on sensor in the drop down box.

7. Click on Change Icon and Open the Program Directory – Icons – USS – plate – levers.

8. Drag the switch-off icon to the Inactive position.

9. Drag the switch-on icon to the Active position.

10. Drag the switch-unknown and inconsistent icons to their respective positions.

11. Your Add Sensor frame should look like F

IG

70.

FIG 70 – ADDING NCE SWITCH SENSORS TO PANEL

12. Click on Close Catalog

13. Highlight sensor NS801and click on Add to Panel.

14. Add sensors for NS802 through NS806.

15. Close the Add Sensor frame

(36)

17. NS806 is above Eastville, NS805 is below Eastville, NS803 is above Weston, NS801 is the left most block,

as shown in F

IG

71.

(37)

Now we will add Logix to tie the NCE sensors and internal block sensors together.

1. From the Main panel, select Tools, Tables, Logix as shown in F

IG

72.

FIG 72 – SELECTING THE LOGIX TABLE

2. Click the Add button and enter 801 for the system name and Block 801 for the user name as shown in

F

IG

73. Note here that I did not have you enter the IX prefix as we did when entering the Turnout Lever

Logix. I confirmed with the JMRI developers that it doesn't matter with Logix as it does with sensors

and turnouts. I might suggest you be consistent and use the IX prefix on all Logix.

(38)

FIG 73 – ADDING BLOCK 801 LOGIX

3. Click the Create Logix button.

4. Click the New Conditional button on the Edit Logix frame.

5. Enter the Conditional name “Block 801 Occupied”

6. Click on the Add State Variable button

7. In the Variable Type drop down box, select Sensor as shown in F

IG

74.

(39)

8. In the Edit Variable frame, enter Sensor NS801 going Active as shown in F

IG

75.

FIG 75 – ADDING NS801 TO THE CONDITIONAL

9. Click the Update Button

10. We only need one action item so click on the Add Action Button at the bottom of the frame.

11. Select Sensor from the Action Group drop down box as shown in F

IG

79.

(40)

12. We want to set IS801 Active On Change to True as shown in F

IG

77.

FIG 77 – SETTING ACTION FOR CONDITIONAL

13. Click the Update button

14. Add a sound for fun here. Click the Add Action button and select Audio from the drop down box as

shown in F

IG

78

(41)

15. Select Play Sound File On change to True and click the File button as shown in F

IG

79.

FIG 79 – SELECTING AN AUDIO FILE

16. Click the toggle-on.wav file and click Open

17. The file name will show and just click on the Update button as shown in F

IG

80.

FIG 80 – SETTING THE AUDIO FILE

18. Our two actions are set, so hit the Update Conditional button at the bottom of the Edit Conditional

frame.

19. In the same way, click the New Conditional button.

20. Enter “Block 801 Unoccupied” for the name.

(42)

21. Add a sensor action for NS801 Inactive as shown in F

IG

81.

FIG 81 - INACTIVE SENSOR ACTION

22. Click the Update button.

23. Click on the Add Action button and select a sensor action.

24. Select a Delayed Set Sensor for IS801 and enter 5 seconds as shown in F

IG

82.

FIG 82 – DELAYED SENSOR ACTION

25. Click Update and then click Add Action.

26. Select the sound file toggle-off.wav and click on the Update button as shown in F

IG

83.

(43)

27. You now have the Unoccupied conditional set as shown in F

IG

84.

FIG 84 – UNOCCUPIED CONDITIONAL

(44)

29. You should see the Block 801 Logix as shown in F

IG

85.

FIG 85 – COMPLETE LOGIX

30. Click on the Done button

31. Click on the Okay button when reminded to save your Logix

32. You should now have two Logix as shown in F

IG

86.

(45)

Now let us test our new Logix. Move aside the Logix frame and click on the toggle switch for NS801. It should

turn IS801 on when active and off after 5 seconds when inactive. This delay will help stop flicker when a real

block detector is sensing a lighted cabin on dirty track. I set the delay to 15 seconds on my Quaker Valley

Railroad. Note the second IS801 icon at the far right follows as shown in FIG 87.

FIG 87 – TESTING THE BLOCK 801 DETECTOR LOGIX

Continue to create new Logix in the same manner for NS802 controlling IS802 with Occupied and Unoccupied

conditionals. You need not add the sound files if you want silent operation. You need to create four more

Logix for blocks 803 through 806.

Now is a good time to Save your panel file.

Once you have all six block detectors controlling their internal block sensors, we need to create Logix for the

sensors over the turnouts. These are the interlocking sensors. Dependent on turnout position, these Logix

will turn on the interlocking sensor over the turnout when both adjacent block sensors are active. After a 5

second delay, they will turn off the sensor when either adjacent sensor is turned off. So we will use AND logic

(46)

Logix for the Interlocking Sensors

1. From the main menu, select Tools Tables, Logix.

2. Click the Add button to create a new Logix.

3. Enter IX901 for the Logix System Name and Interlock 901 for the Logix User Name as shown in F

IG

88.

FIG 88 – NEW LOGIX FOR INTERLOCK 901

4. Click on the Create Logix button

5. Click on the New Conditional button in the next frame.

6. Enter “Turnout Normal Occupied” for the conditional User Name as shown in F

IG

89.

FIG 89 – ADDING TURNOUT NORMAL OCCUPIED CONDITIONAL

7. Click on the Add State Variable button

8. Select sensor from the drop down box and enter IS801 Active for the first variable.

9. Click the Update button.

10. Click on the Add State Variable button

(47)

12. Click the Update button.

13. Click on the Add State Variable button

14. Select turnout from the drop down box and enter NT1 Closed for the third variable.

15. Click the Update button.

16. Deselect the Trigger Cal box for the turnout. Your screen should look like F

IG

90.

FIG 90 – ACTION VARIABLES

17. Click on the Add Action button at the bottom of the frame.

18. Select sensor IS901 and set it active on a change to true as shown in F

IG

91.

FIG 91 – ACTION SET SENSOR

19. Click the Update button and you have a complete conditional.

20. Click Update Conditional

21. Click on the New Conditional button

(48)

23. Click on the Add State Variable button and add three variables as before but with the block sensors

IS801 and IS802 inactive. Your screen should be as in F

IG

92.

FIG 92 – UNOCCUPIED CONDITIONAL BEFORE LOGIC CORRECTION

We need to change the Logic because as it is both would have to be inactive to set the interlocking sensor off.

We want either to turn it off if the turnout is normal.

(49)

25. Change the first AND within the parentheses to an OR as shown in F

IG

93.

FIG 93 – MIXED LOGIC EXPRESSION

If you consider the logic now, the parentheses group either sensor IS801 or IS802 going inactive will trigger the

conditional if the turnout is Closed.

26. Click the Add Action button

27. Select an action sensor and make IS901 inactive (Delayed Set Sensor) after 5 seconds as shown in F

IG

94.

FIG 94 – DELAYED INACTIVE SET FOR SENSOR IS901

28. Click the Update button.

29. Click Update Conditional in the next frame.

30. Click Done to close the Logix IX901.

(50)

Now let us test the Logix. Set the turnout lever 3 to the left and push the code button 4. The green turnout

lamp should light with the turnout in the closed position. Now turn on the blocks on either side of the

turnout. The Interlocking sensor should turn on or red immediately. Now turn off one of the adjacent block

detector sensors. That block should go dark in 5 seconds and the interlocking should go dark 5 seconds after

that.

That only considers the turnout in the closed position. We can add two conditionals to the Logix to handle the

turnout in the thrown position. Open the Logix IX901 by clicking on select next to it in the Logix table. A drop

down will show Edit as an option.

32. Click on New Conditional and add a conditional “Turnout Reverse Occupied”.

33. Add the variables and action items as we did before, only with the turnout thrown. Your complete

conditional should look like F

IG

95.

FIG 95 – TURNOUT REVERSE OCCUPIED CONDITIONAL

34. Click on Update Conditional.

(51)

36. Add the variables and action items as we did before, only with the turnout thrown. Your complete

conditional should look like F

IG

96.

FIG 96 – TURNOUT REVERSE UNOCCUPIED CONDITIONAL

37. Click on Update Conditional

38. Click Done

39. Click Okay when reminded to save your Logix.

Test the new conditionals. Turn off Block 802. The Interlocking should go dark in 10 seconds. Change the

turnout to the reverse position. Turn on Block 802. The Interlocking should stay dark as the turnout is against

it. Turn off Block 802 and turn on Block 803. The interlocking should follow based on the turnout setting.

(52)

Now edit the Logix IX03 for the turnout lever 3. Add that sensor IS901 must be inactive in order to throw the

turnout. The revised conditional should look like FIG 97.

FIG 97 – TURNOUT CONDITIONAL WITH NEW INTERLOCKING SENSOR

Be sure to uncheck the trigger for the new sensor. We only want the code button to trigger the turnout

action.

(53)

Also add the sensor IS901 to the reverse action of the turnout Logix as shown in FIG 98.

FIG 98 – TURNOUT CONDITIONAL WITH NEW INTERLOCKING SENSOR

There is a lot of work to now add the remainder of the interlocking Logix and Turnout lever Logix. You may

also want to right click the block sensors on the track diagram. Check the “disable” menu item so they cannot

be changed manually using the mouse. Likewise, disable the turnout lamps.

Before we finish part 2 of the tutorial, we want to add block detection to the layout panel.

Now is a good time to save your panel.

(54)

Adding Block Detection to the Layout Panel

Now that we have block detection working on the CTC panel, let’s go back to the Layout panel and add block

detection there too.

1. On the layout editor, click the menu item Options and click on Edit Mode.

2. Right click on the straight track segment at the top, corresponding to the first block on the CTC panel.

Select Edit as shown in F

IG

99.

(55)

3. Enter the Block Name “Block 801” and click the button to Create/Edit Block as shown in F

IG

100.

FIG 100 – CREATE A BLOCK

4. Enter Sensor IS801 and change the Occupied Track Color to Red as shown in F

IG

101.

FIG 101 – CHANGE BLOCK OCCUPIED TO RED

5. Click Done on both frames.

6. Turn on the Block detector NS801 on the CTC panel and the block should change to red. Turn off the

detector and the block should go back to black after 5 seconds.

(56)

7. Do the same thing for the Block 802 circular segments on the left side of the layout.

8. Enter Block 802 name, IS802 sensor and change to red when Occupied. When entering the second

segment with the same Block 802 name, you need not create it again.

9. Do the same for the straight segments at the bottom using Block 804 and IS804.

10. Also Edit the turnout IT5, as shown in F

IG

102.

FIG 102 – EDITING A TURNOUT BLOCK

11. Edit the block at right for Block 805 and IS805.

12. The three siding segments to the right are IS806. Make them Orange when occupied.

13. The siding on the left is IS803. Make it Orange also.

14. Now select the upper left turnout and change NT1 to Block 901 and IS901.

15. Do the same for lower left NT2, Block 902, IS902 and red when occupied.

16. Complete setting blocks for NT3 and NT4.

17. Turn the Edit Mode off. Edit the panel size and position.

18. Click menu Options, Save Size and Position.

(57)

19. Your finished panel should look like F

IG

103.

FIG 103 – COMPLETED PANELS FOR PART 2

The above panels show all turnouts in the normal or closed position. Blocks 801 and 802 are occupied so the

Interlocking for Turnout NT1, IS901 is also active. Make sure all of your Logix are in place and working. You

have a fully functioning set of panels with control of your turnouts and indication of all block detection. I

operated for three or four years at this stage on my Quaker Valley Railroad.

In Part 3, we will learn to create signals on the Layout panel and to create Simple Signal Logic (SSL) to relate

the turnouts and signals and block detectors. We will then add signal lamps and signal levers to the CTC panel

and learn how and to create Logix to automatically drop and hold the signals based on the CTC levers and

track occupancy. Then signals will only be released under dispatcher control.

(58)

Panel Startup Route

When you open your panels, the sensors and turnouts may be in an unknown state. Some hardware will

report back and you need not include them in a startup route. Since we are all simulated, we will create the

route to set the turnouts, levers and code buttons.

1. From the main panel, select Tools, Tables, Sensors and add a new internal sensor 999 named RESET.

2. From the main panel, select Tools, Tables, Routes and you will get a blank frame as shown in F

IG

104.

FIG 104 – ROUTE TABLE

3. Click the Add button.

4. On the Add/Edit Route frame, enter the Route name R999, the user name “Reset Panel at Startup” and

select all of the turnouts closed.

5. We only need set some sensors, the Logix will set the rest. Set the Turnout Levers and Code Buttons

inactive. Set the Block detectors NS801 – NS806 inactive. Enter “RESET” or IS999 for the Sensor to

trigger the route.

(59)

7. Your frame should look like F

IG

105.

FIG 105 – COMPLETE RESET ROUTE

8. Click the Update Route button and close the Route frame, hitting Okay when you are reminded to save

your routes.

9. Add a sensor RESET to your CTC panel and move it to the upper right corner above the track diagram.

10. Right click on the new sensor and make it momentary.

11. Add text to identify the Reset Button you just added.

(60)

CTC Panel Components

To help a novice understand the parts of a CTC panel, I include FIG 109. To better understand how these

panels work, I highly recommend a DVD video available from

http://www.ctcparts.com/video.htm

This video shows the development of signaling on the prototype, the history of CTC panels on the prototype

and how to use them with a model railroad.

(61)

Tutorial Part 2 Conclusion

Now you have a foundation to further explore JMRI on your own. As stated up front, there are a number of

different ways to accomplish each of these tasks. For example, we did not use the Routes table until the end.

But Routes and Logix can be used in similar ways.

Part 3 of the Panel Tutorial will show you how to add signals to the Layout Panel and how to add signal levers

and Logix to hold the signals under dispatcher control.

I have more information on CTC panels and the development of my panels at my web site:

http://www.quaker-valley.com/CTC/JMRI_Demo_xml.html

http://www.quaker-valley.com/CTC/CTC_Index.html

And my newest panels are at

http://www.quaker-valley.com/CTC/QV_CTCnew.html

And the JMRI yahoo group is always available

at

http://groups.yahoo.com/group/jmriusers/

Special thanks to Dan Foltz for improving the format of the tutorial.

If you have a question for me, contact me via email at

[email protected]

Bob Bucklew

References

Related documents

It is evident from these authoritative sources that the Roman Catholic Church teaches that the Lord Jesus Christ personally instituted the office of priesthood for the exercise of

HIPAA was enacted to protect the confidentiality and security of health-care data.. This is done by establishing and enforcing standards and by standardizing electronic data

Click Zoom icon > Settings to open the Settings panel to add additional security to the Zoom meeting.. Scheduling

The reservoir engineering topics covered range from basic reservoir rock and fluid characteristics to reservoir management, modeling and field development planning and

Or open [Control Panel], select [Network] icon, then [Adapters] tab, select “MOXA Intellio C320Turbo Series Adapter” item in the “Installed Adapter Cards:” and click on

 Select the Admin icon then select the Authorisation submenu and then click on Authorisers  Select a User from the drop-down menu and click the Retrieve button.

Unpublishing a menu item: click on the Menu Manager icon from the control panel.. In the published column of the appropriate menu item click on the green check mark to change it to

Open the Firewall application by clicking on the Start menu icon  Control Panel  Windows Firewall and Advanced Security. Click on ‘Inbound Rules’ and then Right click it 