Let’s Configure a Node – The Beauty of LCC (With a bonus section on connecting LCC to PanelPro)




Recall one of the drivers for trying out LCC was to avoid writing detailed code.  Yes, I ~can~ write code.  But it is not my interest or hobby.  As such, anything that can help me translate what is in my head to implementation on a chip somewhere with as little brain damage as possible is quite welcome in my book.  Additionally I did not want the brains of the layout to live in a PC.  There are days when I just want to come down to the basement, flip on the power switch, and run trains.  And… if I am going to go through the trouble of having signals, I want them to come up and operating properly immediately.  Yea, I know I can set up a PC to boot up, execute the right programs and get running on its own.  Sorta.  It’s just one more piece of equipment and step I just don’t care to deal with.  
  
Anyway….

So a big part of my hesitation of leaping into LCC was the angst associated with programming one of these nodes.  I do not have any model rail friends nearby who have LCC, and never attended a clinic where it was demonstrated.  The on-line vids were OK, but frankly a bit scary.  When they time out at over an hour (some longer), it felt like the process could be challenging and confusing.  Maybe I should just stick with programming Arduinos and stick with what I know.  But… that Arduino I installed still has some programming glitches in it (for some reason on a flashing red indication, it will double flash when the control point is occupied – go figure!), and it’s been long enough ago that I really don’t feel like diving back into it and reverse engineer what I did 3 years ago.  Back to LCC I went.  And off the diving board I went.

One thing I noticed about the LCC info I came across was I had a hard time finding a single place where someone just outlined each step.  So for everyone’s edification, here is an example of programming a node.  This programming, mind you, is pretty basic.  But it walks you through the steps, step by step.  Hopefully this is helpful to someone. 

Not shown here is making sure the hardware is set up correctly.  That is, the LCC network is a single string of connections, with each node daisy chained to the next.  Terminators are required at the end of the string.  Somewhere along the string, a power supply (power injection point) is included to energize the network.  And one of the node will be the USB interface.  A simple USB cable between the LCC network connects to the PC you’ll use to configure the node.  Generally as soon as you plug it in, the PC will recognize that a new “COM” port has appeared.  All is well.

I used DecoderPro to interface between the PC and the LCC network.  There are TONS of vids on how to download and install DecoderPro, and its sister package PanelPro.  Actually I used PanelPro for all the interfacing, but both come in the same download.  When you open it up, you’ll need to let it know where to find the “LCB” connection.  LCB is the communications bus terminology for LCC.  (That simple fact took me a while to sort out!)  Again, there are TONS of vids on how to install and connect PanelPro to a network, so I wont repeat here.  (But if there is interest to go into that, I’ll add it into this blog.)  Once that is in place, we can get to programming the nodes.

For this node, I am configuring a RR-CirKits Tower-LCC fitted with two (2) BOD-8’s.  The Tower-LCC has two 10-pin connectors (slots) for I/O (inputs/outputs) capable of accepting up to 8 inputs or outputs each, for a total of 16 inputs or outputs.  The BOD-8 has the mating connector format, and can accept 8 detection inputs off of current coils (CTs) for detection.  So with 2 BOD-8’s plugged in I can get 16 detection signals brought onto the LCC bus to share with the world.  On that point, all these I/O will be behaving as “Producers.”  They will send out a signal to the LCC bus to let it know something is on a particular track.  In this case, it’s a bunch of staging tracks.  There will be “Consumers” of this data on the LCC network… but that’s for another day.

OK, assuming you are with me so far, here we go….


Open up PanelPro:



Click on OpenLCB…. Configure Nodes:


This will reveal the tree structure of your LCC network.   



You can see I have 4 nodes on the network; 2 are configured (or at least named) and 2 are not.  The node ending in …80 will be the one we will work with in this example.  Note that what you are following is as it comes straight out of the package.  I did not configure anything on this node before taking these screen shots.

Click on the + symbol and it’ll open up our options for that node.   


What is remarkable about LCC is from this point on, everything you will see is COMING FROM THAT BOARD.  It’s is not being configured by PanelPro or the PC.  All the configuration info actually resides right on the LCC node.  PanelPro is simply acting as a window onto the LCC network and we are actually looking at what resides on the node.  This little fact put a huge smile on my face.  For those of you who have played with Arduinos know that programming them requires the software to be written on the PC, and then compiled and uploaded to the microcontroller.  Conceptually it’s an entirely different animal.

OK, now click on Open Configuration Dialog.  You’ll see the communications light flash on the USB interface, and it’ll read the config info off the board. 

 

To be honest the first time I saw this, it was a bit overwhelming to me.  But hang with me.  Once you see how RR-CirKits laid out the interface, it’ll make perfect sense.  Each block of options logically groups functions together, and really a lot of them we will not use.  

The top block is the node name.  Nothing special and you can name it whatever you want.  I was tempted to use some cryptic abbreviation, but I thought to myself, what the heck – just name it what it is.  So I did.  


Note that as soon as you type in some info, the field turns yellow.  What this means is the info is still on the PC and has not yet been written to the node.  Just click on “Write” and the info is written to the node, and the field turns white again.  Easy to see what’s going on.  Very easy!

The next section is pretty important, and where I got tripped up a bit.  Here is where you define whether the node is accepting inputs and issuing out producer signals, or receiving data as a consumer and outputting some kind of function, such as for a turnout or signal.  So INPUTS into the LCC network becomes a PRODUCER of data on the LCC network, and OUTPUTS from the LCC network are handled by the node as a CONSUMER of such data.  Make sense?  So in our example here, the track detector is an input in this first section of the config screen, and it will then output (produce) a signal in the lower part.  Note that on the Tower-LCC, EACH I/O point can be set up to either be an input or an output.  Recall the Arduino can do the same.  For the purposes of configuring this node, I am making them all inputs/producers.  So let’s follow along.

Each of the 16 I/O has a tab on the node as seen here.  We will start with I/O point 1. Remember how it’s important to keep good notes of where things are wired out?  Well here is where it pays off.  My very simplistic notation scheme for staging I/O was this: “S” means staging, “[number]” means track, “[Letter]” means which part of the track is being detected – E=east; C=center; W=west.  So my first I/O point will be S1C – staging track 1 center.  

As before, just name the point whatever you want.  Then write.  Note that the name of the point shows up on the tab.   


Ain’t that the coolest thing?!  Self-documenting software!  It’s about time.

The next section determines if the point is an input or an output.  All these are inputs.   


Note the node defaults to that configuration, so no changes there.  Also note that the output dialog shows “No Function.”  That’s what you want, else the node configuration will fight with itself.  Also note that you can set up anti-bounce and time delay features right here.  Slick, huh?  I don’t need these as the BOD-8’s already come with anti-bounce and time delay to pick up/drop off.  But if I had another type of detector, I could set all that up here.
 
OK, now scroll down.  Under the “Indications” block are some tabs.   



This specified what signal is produced if it is either on or off.  Turns out the default settings will work fine.  “Event 1” activates when it is “On.”  Below that you’ll see the data that is produced whenever that detector turns on.  Click on “Event 2” and you’ll see the data that is created when the detector turns off.   


Also note you can actually specify up to SIX events associated with that detector (or whatever input) turning on and turning off.  



Think about the flexibility that can provide!  For this use, I will just leave as is – Event 1 and Event 2 is all I need. 

Now do the same for the next 15 I/O… 


Aaaannd…. We are done. 

What?  That’s it?  Yes.  That’s it.  Done.  The node will now send those signals when the detectors detect something. The node is configured for inputs.

--------------------------------------------------------------------------------------------------

I promised a bonus section.  Me being as impatient as I am about things, I wanted to see if this node really was doing its job.  I don’t have the local panels and signals set up yet, so I figure I’ll do a quick panel on PanelPro to watch the lights go on and off as trains run through the staging yard. 
Again, there are OODLES of tutorials on how to set up panels in PanelPro.  So I am just going to show how to get an LCC signal from the node to PanelPro.  

If you scroll down to the bottom of the configuration screen, you’ll see a little carrot called “Sensor/Turnout Creation.”   


This is a tool to ease having to manually type those incredibly long LCC codes into the PanelPro sensor screen.  Ya, really.  It’ll basically do it for you.  Follow along…

First you’ll need to have your panel open, and it’s a good idea to have your Sensor Table open.  Again, refer to a PanelPro tutorial for how to do this.


Open the panel.
 

And then open the Sensor Table:


Now go back to your node configuration window.  Scroll down to the Sensor/Turnout Creator tool, and let's make a PanelPro sensor.



You’ll see the option to name the signal (again, you can make it whatever you want, and can be different than what you called the incoming signal), followed by two fields corresponding to the two states of that signal.  First, type in the name.  I added a “D-“ in front of the input name to denote “Detection”.  So my first signal is D-S1C.  


Go back up to your input section.  Remember those Event data IDs?  Yep.  That’s what PanelPro needs to know to do its thing, and what goes here.  Now here is the cool part.  You don’t need to type in all those numbers.  Yea!  Just go to the Event 1 tab, go to the event ID, and click on Copy.



Note it changed from Copy to Copied.     Now go to the Sensor/Turnout Creation tool, and go next to the first field.  Click on Paste.   


There ya go.  Scroll back up for copying Event 2 data, paste into the second field.  


Now comes the magic.  Click on Make Sensor.  BOOM.  You should see it show up in your PanelPro Sensor Table.   



Ya, it’s really there.  Go through this for all 16 inputs and the sensor table is fully populated with the relevant LCC addresses and events.  With this, you can go back your panel and locate the sensors on your track diagram or whatever you have.


Note that at this point the PC is just an indication panel.  There is no smarts in the PC or PanelPro to poll the LCC network.  The LCC network is TELLING the PC about the events.  Also note that I have 2 test trains sitting on the staging yard.  You can see the two blocks show active.  This automatically came up, into PanelPro.   

Ya, I am smiling.




Comments

  1. I am attempting to do step 2 of a basic test of a rr-cirkit system. Step one was get the parts out of the Package. I am stuck at step 2, what connects to what. Do I need the LCC terminator pair? I have no way of connecting the BOD 8 to anything (I do not have ribbon cable)
    I have LCC Buffer USB (which the windows 10 computers appears to be clueless about)
    a LCC Powerpoint
    A LCC Signal LCC-8
    A BOD 8

    I have connected the buffer, powerpoint and signal using cat 5. I put the terminators in the two remaining open ports. I plugged the usb cab into my computer and I plug in the powerpoint to the wall wart.

    I start decoder pro and no programming systems exist. I followed some steps I found on internet to setup a signal man roster entry, but can only edit and cannot program or read from the nodes. I tried setting up an OpenLCB under preferences but have no idea what settings I should set. When I did this I did get some more lights to turn on the LCC USB buffer but none of them ever flash when i try to do any reading or writing from the signalman, so I am thinking that system is not working.

    I have looked for awhile to find a manual for setting the LCC USB buffer up but there is no manual on the RR-Cirkits site nor do I find a really basic hey plug this into that. Did find drivers for windows but it was for older windows machines and not windows 10 so I did not try to install them.

    Can you point me to a manual or someone's write up on very basic initial setup and what settings are needed in decoder pro. Everything I find, these steps are already done.

    ReplyDelete
    Replies
    1. Hi Willamor, Sorry for the delayed response - I did not see your question until now. Yes! There is a lot of good stuff out there to get you your answers. But I have to agree, what is out there seems to be geared to folks who already know what it is supposed to look like.

      Here is a link to a slide (or two) that will help you get your head around the pieces:

      https://openlcb.org/wp-content/uploads/2015/04/LCC-introduction-presentation-Indy-2016.pdf

      Go to page 31 and you will see all the key parts laid out and interconnected.

      As for settings in DP, it's really straight forward from the set up screen. Well, first of all, go to PanelPro, not DecoderPro. From there, click on Preferences - then connections, and in the pull-down menu for system manufacturer, select OpenLCB. It'll then ask you for the system connection (some COM port); usually it'll find it and all you have to do is select it. That's it.

      Let me know if you have any q's. - Detlef

      Delete

Post a Comment

Popular posts from this blog

Configuring Push-buttons for Turnout Control in LCC (with BONUS section on Adapting JMRI for Feedback)

LCC - Configuring a Push Button ~WITH~ Indication