MERG CBUS/VLCB hardware support

Steven, My observation is that JMRI does react to the OFF events. When an OFF event arrives then the turnout is drawn with no connections. When the ON event arrives the turnout is drawn in that direction. This is with the TWOSENSOR configuation for the turnout.

Hi @sven-e,

Is it fine for Traintastic to use 0x7A? Then I’m going to implement it :slight_smile:

Is the registration list somewhere public? (then I can put that as comment for the constant in the Traintastic source code)

Did you find anything that caused this? If not, is there anything I can help with?

@sven-e / VLCB team

Something just crossed my mind. Technically Traintastic is a node within the CBUS/VLCB network, so should it response to a QNN request? Just like other nodes Traintastic produces and consumes events (and is a CAB too).

For the Marklin CS2/3 (also CAN based) I did something similar, there Traintastic announces itself as node on the network:

What is the VLCB team opinion on this?

Greetings,
Reinder

Sorry, I have not got a response on this yet. I don’t see anything else using it. I assume you will use a constant so that it will be easy to change if this number is already taken.

The number is not critical. It is used for collision detection on the CAN bus. But the bus is usually very quiet and there is very little risk for collisions.

Yes. Unfortunately there are two such registers. One for CBUS and one for VLCB (which I am coordinating). I try to keep the VLCB in sync with anything new in CBUS. I would suggest you use the VLCB register of constants. See GitHub - SvenRosvall/VLCB-defs: Master file from which to create language specific versions of VLCB-defs. Includes generation tool. · GitHub

The source is a CSV file. The CANID’s are listed at the bottom of this file. There are a few generated files for some commonly used languages. You can copy the file you want into your project and use those constants. As you are using C++ I suggest you use vlcbdefs.hpp .

Sorry, have been busy with other things so this is still up in the air.

Interesting thought. I can see why you ask.

Simple answer: No, there is no need to treat Traintastic as a node. FCU, MMC and JMRI don’t do this.

Longer answer: If you do treat Traintastic as a node then you need to assign a node number (different to the CANID). You also need to support a lot of OP-codes (such as QNN and the answer PNN). I think you will run into a lot of work where you need to figure out what the responses should look like.

You mention the CAB functionality. JMRI has this functionality without being a node. So this works without a node number. The existing CBUS CANCAB throttle is a node, although it is a SLiM node (thus it is not fully configured) and it has a fixed node number of 65535. Note here that if I have several CANCAB throttles connected to my CAN bus they all have the same node number. The CBUS messages for running a train (with DCC) does not use node numbers. Instead they use the DCC session numbers to keep track of the different throttles.

I hope this makes sense. If you really want to make Traintastic a fully fledged CBUS node, then please describe why and I’ll bring this up with the rest of the VLCB team.

/ Sven

Hi @sven-e,

Thanks for the fast reply.

No problem, I’ve add it, using the interface settings it is also possible to change it, for now the constant is 0x7A (122), I added a note it isn’t official yet, but pending. I’ve added a comment pointing to the CSV file so it is clear were the values originate from :slight_smile:

No problem, I was just curios :slight_smile:

If other software doesn’t do it, there is no benefit yet, so I put the idea in storage :slight_smile: (But if there is, I’ll add it :slight_smile:)

Traintastic can do basic CANCMD simulation (I use that for testing without hardware), if you run Traintastic in simulation mode and enable the hub and connect MMC (or FCU) it will discover a CANCMD and a CANCAB node :slight_smile:

Greetings,
Reinder

Interesting. Will try out the simulation mode some time.

Traintastic has such a simulator for all supported protocols, the simulation is always on protocol message level as this makes it easier to test the full stack without hardware.

I even took it one step further, I build a simple railway simulator (not yet part of master), see: YouTube: DevPreview 003 - Traintastic Simulator

At the bottom of the screen you can see the simulated LocoNet communication, the train in the sim drives using throttle commands, and the sim generates the feedback commands, turnouts are supported as well.

@gfgit modified the Traintastic Simulator and connected it to a real mechnical Signalbox, see Simulation of Padua Central station (really awesome project, hope to visit it one day)

1 Like

I have got an official response now. Yes 0x7A (122) will be reserved for Traintastic in CBUSDEFS. For now I have added it to VLCB-defs.

You can get the latest vlcbdefs.hpp here: GitHub - Versatile-LCB/VLCB-defs: Master file from which to create language specific versions of VLCB-defs. Includes generation tool. · GitHub

1 Like

Great :tada: thanks for your support.