Model Train-related Notes Blog -- these are personal notes and musings on the subject of model train control, automation, electronics, or whatever I find interesting. I also have more posts in a blog dedicated to the maintenance of the Randall Museum Model Railroad.

2016-09-26 - Direct Access to NCE Q-Snap Mk2

Category NCE

From both the NCE USB v7 doc (see NCE website) or from

http://jmri.sourceforge.net/help/en/package/jmri/jmrix/nce/packetgen/NcePacketGenFrame.shtml

Example: 0xAD is for switching an Accy/Signal. There is no provision to read the state.

  • E.g. 0xAD 0x00 0x03 0x03 0x00 ⇒ throw 0x0003 in normal direction
  • E.g. 0xAD 0x00 0x03 0x04 0x00 ⇒ throw 0x0003 in reverse direction
  • 0 is an invalid address.
  • Max address is 2044 (0x7FC) which is a broadcast address for Accy.

Note: when trying in JMRI > NCE Command, "Binary" means hex without x, seriously \o/ ?

Lockout CV 556:

  • Use on Address of input #1, which is 4 for my home one.
  • 556 = 0x022C
  • 0xAF is Ops ACCY programming.
    • AF 00 04 02 2C [0=unlocked | 1=locked]
  • This works. It locks buttons out.
  • ACCY on controller can still be used to throw turnouts.

That means I can trivially command that from an Arduino and bypass JMRI if needed.


 Generated on 2024-11-22 by Rig4j 0.1-Exp-f2c0035