Download
Support
Wiki Documentation
Support Forum
Mobile
DIY
User
Wiki writer
Build
Legal
Download
Support
Wiki Documentation
Support Forum
Mobile
DIY
User
Wiki writer
Build
Legal
[<MjPri><MinPri><ID>]<Opcode><Dat0>...<DatN>
bits 9 - 10 of the CAN header. Dynamic Priority, elevated by the node to gain access based on a transmit fail count. Values:
0 | Emergency priority |
1 | High priority |
2 | Normal priority |
bits 7 - 8 of the CAN header. Static priority based on message and node type. Values:
0 | High access |
1 | Above Normal access |
2 | Normal access |
3 | Low access |
bits 0 – 6 of the CAN header, is a CAN segment-unique ID, assigned via enumeration.
the first data byte is the opcode which includes the length of the message in the upper 3 bits.
In some associated documents, the Opcode is also referred to as the ‘command’ byte. The abbreviation OPC may also be used. In this document the Opcodes are in hexadecimal.
Messages for loco control include a session number (sometimes referred to a session, session handle or just handle). This is a unique identifier assigned by the command station when a cab (or throttle) first requests control of a loco. The session number is used in all further messages referring to that loco.
Cabs that are capable of service mode programming must have a valid session, but this needn’t refer to the loco on the service mode programming track. The session is required for error handling, in case two or more cabs attempt overlapping service mode operations.
When CBUS is used for DCC loco control, the DCC address is always sent as two bytes. For short addresses, the MSB will be zero. For long addresses the MSB will have bit 7 and 6 set.
DCC programming modes are selected by unique op-codes or mode bytes, depending upon the operation. For those operations that use a mode byte, the modes are defined as follows:
0 | Direct Byte |
1 | Direct Bit |
2 | Page Mode# |
3 | Register Mode |
4 | Address Only Mode |
Not all CBUS DCC command stations will support all modes.
Programming operations, other than a successful service mode read, will return SSTAT when complete. The associated status byte is defined as follows:
0 | Reserved |
1 | No Acknowledge |
2 | Overload on service mode programming track |
3 | Write Acknowledge |
4 | Busy |
5 | CV out of range |
Successful service mode read operations return the data with PCVS, rather than SSTAT.
Error codes for OPC ERR are defined as follows:
0 | Reserved |
1 | Loco stack full |
2 | Loco address taken by another cab |
3 | Session not present |
4 | No more engines |
5 | Engine not found |
[<MjPri><MinPri=2><CANID>]<00>
Positive response to query/ request performed or report of availability on-line.
[<MjPri><MinPri=2><CANID>]<01>
Negative response to query/ request denied.
[<MjPri><MinPri=0><CANID>]<02>
Commonly broadcasted to all devices to indicate CBUS is not available and no further packets should be sent until a BON or ARST is received. Currently only sent by the command station when its input queue is full. Can be ignored by all modules other than those that need to send to the command station (e.g. cabs)
[<MjPri><MinPri=1><CANID>]<03>
Commonly broadcasted to all devices to indicate CBUS is available. Currently only sent by the command station when it has space in its input queue again.
[<MjPri><MinPri=1><CANID>]<04>
Commonly broadcasted to all devices by a command station to indicate track power is off and no further command packets should be sent, except inquiries.
[<MjPri><MinPri=1><CANID>]<05>
Commonly broadcasted to all devices by a command station to indicate track power is on.
[<MjPri><MinPri=1><CANID>]<06>
Commonly broadcasted to all devices by a command station to indicate all engines have been emergency stopped.
[<MjPri><MinPri=0><CANID>]<07>
Commonly broadcasted to all devices to indicate a full system reset.
[<MjPri><MinPri=1><CANID>]<08>
Sent by a device to request change of track power state to “off”.
[<MjPri><MinPri=1><CANID>]<09>
Sent by a device to request change of track power state to “on”.
[<MjPri><MinPri=0><CANID>]<0A>
Sent by a device to request an emergency stop of the entire layout.
[<MjPri><MinPri=2><CANID>]<0C>
Sent by a node to query the status of the command station or another device. See description of (STAT) for the response from the command station/other devices.
[<MjPri><MinPri=3><CANID>]<0D>
Sent by a node to elicit a NNACK reply from each node on the bus that has a node number.
[<MjPri><MinPri=3><CANID>]<10>
Sent by device to a node while in ‘setup’mode to read its parameter set. Used when initially configuring a node.
[<MjPri><MinPri=2><CANID>]<11>
Sent by a node to request the name of the type of module that is in setup mode. The module in setup mode will reply with opcode NAME.
[<MjPri><MinPri=2><CANID>]<20><SSSSSSSS>
<Dat1> is status defined by the bits below.
bit | Description |
---|---|
0 | Hardware Error (self test) |
1 | Track Error |
2 | Track On/ Off |
3 | Bus On/ Halted |
4 | EM. Stop all performed |
5 | Reset done |
6 | Service mode (programming) On/ Off |
7 | reserved |
Sent by the command station in response to RSTAT.
[<MjPri><MinPri=2><CANID>]<21><Session>
<Dat1> is the engine session number as HEX byte.
Sent by a CAB to the Command Station. The engine with that Session number is removed from the active engine list.
[<MjPri><MinPri=2><CANID>]<22><Session>
<Dat1> is the engine session number as HEX byte.
The command station responds with PLOC if the session is assigned. Otherwise responds with ERR: engine not found.
[<MjPri><MinPri=2><CANID>]<23><Session>
<Dat1> is the engine session number as HEX byte.
The cab sends a keep alive at regular intervals for the active session. The interval between keep alive messages must be less than the session timeout implemented by the command station.
[<MjPri><MinPri=2><CANID>]<30><Status>
<Dat1> is a freeform status byte for debugging during CBUS module development. Not used during normal operation.
[<MjPri><MinPri=3><CANID>]<3F><Ext_OPC>
Used if the basic set of 32 OPCs is not enough. Allows an additional 256 OPCs
[<MjPri><MinPri=2><CANID>]<40><AAAAAAAA><AAAAAAAA>
<Dat1> and <Dat2> are [AddrH] and [AddrL] of the decoder, respectively.
The command station responds with (PLOC) if engine is free and is being assigned. Otherwise responds with (ERR): engine in use or (ERR:) stack full.
This command is typically sent by a cab to the command station following a change of the controlled decoder address.
[<MjPri><MinPri=2><CANID>]<41><ConID><Index>
Allows enumeration of a consist. Command station responds with PLOC if an engine exists at the specified index, otherwise responds with ERR: no more engines.
[<MjPri><MinPri=3><CANID>]<42><NNHigh><NNLow>
Sent by a device to assign a node number to a requesting node in response to a RQNN message. The target node must be in ‘setup’ mode.
[<MjPri><MinPri=2><CANID>]<44><Session><MMMMMMMM>
[<MjPri><MinPri=2><CANID>]<45><Session><Consist#>
Adds a decoder to a consist.
Dat2 has bit 7 set if consist direction is reversed. If engine is consisted already, an error is reported: engine in use.???
[<MjPri><MinPri=2><CANID>]<46><Session><Consist#>
Removes a decoder from a consist.
If engine is not consisted, an error is reported: Engine not found.
[<MjPri><MinPri=2><CANID>]<47><Session><Speed/Dir>
Not supported by the CANCMD/CAN-GC3 firmware; Use STMOD instead.
[<MjPri><MinPri=2><CANID>]<48><Session><DDDDDDDD>
Sent by a cab to notify the command station of a change in engine flags.
[<MjPri><MinPri=2><CANID>]<49><Session><Fnum>
Sent by a cab to turn on a specific loco function. This provides an alternative method to DFUN for controlling loco functions. A command station must implement both methods.
[<MjPri><MinPri=2><CANID>]<4A><Session><Fnum>
Sent by a cab to turn off a specific loco function. This provides an alternative method to DFUN for controlling loco functions. A command station must implement both methods.
[<MjPri><MinPri=3><CANID>]<4C><Session><Status>
Status returned by command station/programmer at end of programming operation that does not return data.
[<MjPri><MinPri=3><CANID>]<50><NN hi><NN lo>
Sent by a node that is in setup/configuration mode and requests assignment of a node number (NN). The node allocating node numbers responds with (SNN) which contains the newly assigned node number. <NN hi> and <NN lo> are the existing node number, if the node has one. If it does not yet have a node number, these bytes should be set to zero.
[<MjPri><MinPri=3><CANID>]<51><NN hi><NN lo>
Sent by node when taken out of service. e.g. when reverting to SLiM mode.
[<MjPri><MinPri=3><CANID>]<52><NN hi><NN lo>
Sent by a node to verify its presence and confirm its node id. This message is sent to acknowledge SNN and also in response to QNN.
[<MjPri><MinPri=3><CANID>]<53><NN hi><NN lo>
Sent by device to put a specific node into learn mode.
[<MjPri><MinPri=3><CANID>]<54><NN hi><NN lo>
Sent by device to take node out of learn mode and revert to normal operation.
[<MjPri><MinPri=3><CANID>]<55><NN hi><NN lo>
Sent by device to clear all events from a specific node. Must be in learn mode first to safeguard against accidental erasure of all events.
[<MjPri><MinPri=3><CANID>]<56><NN hi><NN lo>
Sent by device to read the number of available event slots in a node.
[<MjPri><MinPri=3><CANID>]<57><NN hi><NN lo>
Sent by device to read all the stored events in a node. Response is 0xF2.
[<MjPri><MinPri=3><CANID>]<58><NN hi><NN lo>
Sent by device to read the number of stored events in a node. Response is 0x74 (NNEVN).
[<MjPri><MinPri=3><CANID>]<59><NN hi><NN lo>
Sent by device to indicate the completion of a write to memory operation. Used when teaching nodes where the processing time may be slow.
[<MjPri><MinPri=3><CANID>]<5A><NN hi><NN lo>
Sent by device to read the node data event (eg: RFID data). Response is 0xE4 (ARDAT).
[<MjPri><MinPri=3><CANID>]<5B><DN hi><DN lo>
To request a ‘data set’ from a device using the short event method. Where DN is the device number. Response is 0xE6 (DDSR)
[<MjPri><MinPri=3><CANID>]<5C><NN hi><NN lo>
For SliM nodes with no NN then the NN of the command is must be zero. For SliM nodes with an NN, and all FliM nodes the command must contain the NN of the target node. Sent by a device to prepare for loading a new program.
[<MjPri><MinPri=3><CANID>]<5F><Ext_OPC><byte>
Used if the basic set of 32 OPCs is not enough. Allows an additional 256 OPCs
[<MjPri><MinPri=2><CANID>]<60><Session><Fn1><Fn2>
[<MjPri><MinPri=2><CANID>]<63><Adr-hi><Adr_lo><Error>
Sent in response to an error situation.
[<MjPri><MinPri=3><CANID>]<6F><NN hi><NN lo><Error number>
Sent by node if there is an error when a configuration command is sent. Error numbers to be defined.
[<MjPri><MinPri=3><CANID>]<70><NN hi><NN lo><EVSPC>
EVSPC is a one byte value giving the number of available events left in that node.
[<MjPri><MinPri=3><CANID>]<71><NN hi><NN lo><NV#>
NV# is the index for the node variable value requested. Response is NVANS.
[<MjPri><MinPri=3><CANID>]<72><NN hi><NN lo><EN#>
EN# is the index for the stored event requested.
Response is 0xF2 (ENRSP)
[<MjPri><MinPri=3><CANID>]<73><NN hi><NN lo><Para#>
Para# is the index for the parameter requested.
Response is 0x9B (PARAN)
[<MjPri><MinPri=3><CANID>]<74><NN hi><NN lo><No.of events>
Response to request 0x58 (RQEVN)
[<MjPri><MinPri=3><CANID>]<7F><Ext_OPC><byte1><byte2>
Used if the basic set of 32 OPCs is not enough. Allows an additional 256 OPCs
[<MjPri><MinPri=2><CANID>]<80><REP><Byte0>..<Byte2>
Allows a device to request a 3 byte DCC packet to be sent to the track. The packet is sent <REP> times and is not refreshed on a regular basis.
Note: a 3 byte DCC packet is the minimum allowed.
[<MjPri><MinPri=2><CANID>]<82><Session><High CV#><Low CV#><Val>
Sent to the command station to write a DCC CV byte in OPS mode to specific loco.(on the main)
[<MjPri><MinPri=2><CANID>]<83><Session><High CV#><Low CV#><Val>
The format for Dat4 is that specified in RP 9.2.1 for OTM bit manipulation in a DCC packet.
This is ‘111CDBBB’ where C is here is always 1 as only ‘writes’ are possible OTM. (unless some loco ACK scheme like RailCom is used). D is the bit value, either 0 or 1 and BBB is the bit position in the CV byte. 000 to 111 for bits 0 to 7.
Sent to the command station to write a DCC CV in OPS mode to specific loco.(on the main)
[<MjPri><MinPri=2><CANID>]<84><Session><High CV#><Low CV#><Mode>
This command is used exclusively with service mode.
Sent by the cab to the command station in order to read a CV value. The command station shall respond with a PCVS message containing the value read, or SSTAT if the CV cannot be read.
[<MjPri><MinPri=2><CANID>]<85><Session><High CV#><Low CV#><Val>
This command is used exclusively with service mode.
Sent by the command station to report a read CV.
[<MjPri><MinPri=3><CANID>]<90><NN hi><NN lo><EN hi><EN lo>
Indicates an ‘ON’ event using the full event number of 4 bytes. (long event)
[<MjPri><MinPri=3><CANID>]<91><NN hi><NN lo><EN hi><EN lo>
Indicates an ‘OFF’ event using the full event number of 4 bytes. (long event)
[<MjPri><MinPri=3><CANID>]<92><NN hi><NN lo><EN hi><EN lo>
Indicates a ‘request’ event using the full event number of 4 bytes. (long event)
A request event is used to elicit a status response from a producer when it is required to know the ‘state’ of the producer without producing an ON or OFF event and to trigger an event from a ‘combi’ node.
[<MjPri><MinPri=3><CANID>]<93><NN hi><NN lo><EN hi><EN lo>
Indicates an ‘ON’ response event. A response event is a reply to a status request (AREQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<94><NN hi><NN lo><EN hi><EN lo>
Indicates an ‘OFF’ response event. A response event is a reply to a status request (AREQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<95><NN hi><NN lo><EN hi><EN lo>
Sent by device to remove an event from a node.
[<MjPri><MinPri=3><CANID>]<96><NN hi><NN lo><NV# ><NV val>
Sent by device to set a node variable. NV# is the NV index number.
[<MjPri><MinPri=3><CANID>]<97><NN hi><NN lo><NV# ><NV val>
Sent by node in response to request. (NVRD)
Device addressing.
Although the producer will send the complete 4 byte event number, the consumer will ignore the producer’s node number bytes. This allows a “many to many” situation where producers like DCC handsets can activate the same accessories even though they will have unique node numbers. Clearly this limits the number of ‘short’ events to 64K-1. For short events, the lower two bytes define the ‘Device Number’ or DN. The DN can also be considered as a ‘device address’.
For these short events, the full 4 byte event is still sent, both to keep the format the same and to allow identification of the producer when required.
[<MjPri><MinPri=3><CANID>]<98><NN hi><NN lo><DN hi><DN lo>
Indicates an ‘ON’ event using the short event number of 2 LS bytes.
[<MjPri><MinPri=3><CANID>]<99><NN hi><NN lo><DN hi><DN lo>
Indicates an ‘OFF’ event using the short event number of 2 LS bytes.
[<MjPri><MinPri=3><CANID>]<9A><NN hi><NN lo><DN hi><DN lo>
Indicates a ‘request’ event using the short event number of 2 LS bytes. A request event is used to elicit a response from a producer ‘device’ when it is required to know the ‘state’ of the device without producing an ON or OFF event and to trigger an event from a “combi” node.
[<MjPri><MinPri=3><CANID>]<9B><NN hi><NN lo><Para#><Para val>
NN is the node number of the sending node. Para# is the index of the parameter and Para val is the parameter value
[<MjPri><MinPri=3><CANID>]<9C><NN hi><NN lo><EN#><EV#>
This request differs from B2 (REQEV) as it doesn’t need to be in learn mode but does require the knowledge of the event index to which the EV request is directed.
EN# is the event index. EV# is the event variable index. Response is B5 (NEVAL)
[<MjPri><MinPri=3><CANID>]<9D><NN hi><NN lo><DN hi><DN lo>
Indicates an ‘ON’ response event. A response event is a reply to a status request (ASRQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<9E><NN hi><NN lo><DN hi><DN lo>
Indicates an ‘OFF’ response event. A response event is a reply to a status request (ASRQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<9F><Ext_OPC><byte1><byte2><byte3>
Used if the basic set of 32 OPCs is not enough. Allows an additional 256 OPCs
[<MjPri><MinPri=2><CANID>]<A0><REP><Byte0>..<Byte3>
Allows a device to request a 4 byte DCC packet to be sent to the track. The packet is sent <REP> times and is not refreshed on a regular basis.
[<MjPri><MinPri=2><CANID>]<A2><Session><High CV#><LowCV#><Mode> <CVval>
Sent to the command station to write a DCC CV in service mode.
[<MjPri><MinPri=3><CANID>]<B0><NN hi><NN lo><EN hi><EN lo><data>
Indicates an ‘ON’ event using the full event number of 4 bytes with one additional data byte.
[<MjPri><MinPri=3><CANID>]<B1><NN hi><NN lo><EN hi><EN lo><data>
Indicates an ‘OFF’ event using the full event number of 4 bytes with one additional data byte.
[<MjPri><MinPri=3><CANID>]<B2><NN hi><NN lo><EN hi><EN lo><EV# > <code> Allows a device to read stored event variables from a node. EV# is the EV index. Reply is (EVANS) ===B3 Accessory Response Event (ARSP1O)=== <code> [<MjPri><MinPri=3><CANID>]<B3><NN hi><NN lo><EN hi><EN lo><data>
Indicates an ‘ON’ response event with one additional data byte. A response event is a reply to a status request (AREQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<B4><NN hi><NN lo><EN hi><EN lo><data>
Indicates an ‘OFF’ response event with one additional data byte. A response event is a reply to a status request (AREQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<B5><NN hi><NN lo><EN#><EV#><EVval>
NN is the node replying. EN# is the index of the event in that node. EV# is the index of the event variable. EVval is the value of that EV. This is response to 9C (REVAL)
[<MjPri><MinPri=3><CANID>]<BD><NN hi><NN lo><DN hi><DN lo><data 1>
Indicates an ‘ON’ response event. A response event is a reply to a status request (ASRQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<BE><NN hi><NN lo><DN hi><DN lo><data 1>
Indicates an ‘OFF’ response event. A response event is a reply to a status request (ASRQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<BF><Ext-OPC><byte1><byte2><byte3 ><byte4>
Used if the basic set of 32 OPCs is not enough. Allows an additional 256 OPCs
[<MjPri><MinPri=2><CANID>]<C0><REP><Byte0>...<Byte4>
Allows a device to request a 5 byte DCC packet to be sent to the track. The packet is sent <REP> times and is not refreshed on a regular basis.
[<MjPri><MinPri=2><CANID>]<C1><AddrH><AddrL><High CV#><Low CV#><Mode><Val>
Sent to the command station to write a DCC CV byte in OPS mode to specific loco (on the main). Used by computer based ops mode programmer that does not have a valid throttle handle.
[<MjPri><MinPri=3><CANID>]<D0><NN hi><NN lo><EN hi><EN lo> <data1><data2>
Indicates an ‘ON’ event using the full event number of 4 bytes with two additional data bytes.
[<MjPri><MinPri=3><CANID>]<D1><NN hi><NN lo><EN hi><EN lo> <data1><data2>
Indicates an ‘OFF’ event using the full event number of 4 bytes with two additional data bytes.
[<MjPri><MinPri=3><CANID>]<D2><NN hi><NN lo><EN hi><EN lo><EV#><EV val>
Sent by a device to a node in learn mode to teach it an event. Also teaches it the associated event variables (EVs) by the EV index (EV#). This command is repeated for each EV required.
[<MjPri><MinPri=3><CANID>]<D3><NN hi><NN lo><EN hi><EN lo><EV#><EV val>
A node response to a request from a device for the EVs associated with an event (REQEV). For multiple EVs, there will be one response per request.
[<MjPri><MinPri=3><CANID>]<D4><NN hi><NN lo><EN hi><EN lo><data1><data2>
Indicates an ‘ON’ response event. A response event is a reply to a status request (AREQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<D5><NN hi><NN lo><EN hi><EN lo> <data1><data2>
Indicates an ‘OFF’ response event. A response event is a reply to a status request (AREQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<DD><NN hi><NN lo><DN hi><DN lo><data 1><data 2>
Indicates an ‘ON’ response event. A response event is a reply to a status request (ASRQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<DE><NN hi><NN lo><DN hi><DN lo><data 1><data 2>
Indicates an ‘OFF’ response event. A response event is a reply to a status request (ASRQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<DF><Ext-OPC><byte1><byte2><byte3><byte4><byte5>
Used if the basic set of 32 OPCs is not enough. Allows an additional 256 OPCs
[<MjPri><MinPri=2><CANID>]<E0><REP><Byte0>..<Byte5>
Allows a device to request a 6 byte DCC packet to be sent to the track. The packet is sent <REP> times and is not refreshed on a regular basis.
[<MjPri><MinPri=2><CANID>]<E1><Session><AddrH><AddrL><Speed/Dir><Fn1><Fn2><Fn3>
A report of an engine entry sent by the command station. Sent in response to QLOC or as an acknowledgement of acquiring an engine requested by a cab (RLOC).
[<MjPri><MinPri=3><CANID>]<E3><NN hi><NNlo><data1><data2><data3><data4><data5>
Indicates an event from this node with 5 bytes of data.
For example, this can be used to send the 40 bits of an RFID tag. There is no event number in order to allow space for 5 bytes of data in the packet, so there can only be one data event per node.
[<MjPri><MinPri=3><CANID>]<E4><NN hi><NN lo><data1><data2><data3><data4><data5>
Indicates a node data response. A response event is a reply to a status request (RQDAT) without producing a new data event.
[<MjPri><MinPri=3><CANID>]<E5><DN hi><DN lo><data1><data2><data3><data4><data5>
Function is the same as E3 but uses device addressing so can relate data to a device attached to a node. e.g. one of several RFID readers attached to a single node.
[<MjPri><MinPri=3><CANID>]<E6><DN hi><DN lo><data1><data2><data3><data4><data5>
The response to a request for data from a device. (0x5B)
[<MjPri><MinPri=3><CANID>]<E8><NN hi><NN lo><DN hi><DN lo><data 1><data 2><data 3>
Indicates an ‘ON’ response event. A response event is a reply to a status request (ASRQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<E9><NN hi><NN lo><DN hi><DN lo><data 1><data 2><data 3>
Indicates an ‘OFF’ response event. A response event is a reply to a status request (ASRQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<EE><char1><char2><char3><char4><char5><char6><char7>
A node response while in ‘setup’ mode for its name string. Reply to (RQMN). The string for the module type is returned in char1 to char7. All module types begin with “CAN”. This prefix is assumed and is not included in the returned string, so the maximum module type name is 10 characters including the implicit “CAN” prefix.
[<MjPri><MinPri=3><CANID>]<EF><PARA 1><PARA 2><PARA 3><PARA 4><PARA 5><PARA 6><PARA 7>
A node response while in ‘setup’ mode for its parameter string. Reply to (RQNP)
[<MjPri><MinPri=3><CANID>]<F0><NN hi><NN lo><EN hi><EN lo><data1><data2><data3>
Indicates an ‘ON’ event using the full event number of 4 bytes with three additional data bytes.
[<MjPri><MinPri=3><CANID>]<F1><NN hi><NN lo><EN hi><EN lo><data1><data2><data3>
Indicates an ‘OFF’ event using the full event number of 4 bytes with three additional data bytes.
[<MjPri><MinPri=3><CANID>]<F2><NN hi><NN lo><EN3><EN2><EN1><EN0><EN#>
Where the NN is that of the sending node. EN3 to EN0 are the four bytes of the stored event. EN# is the index of the event within the sending node. This is a response to either 57 (NERD) or 72 (NENRD)
[<MjPri><MinPri=3><CANID>]<F3><NN hi><NN lo><EN hi><EN lo><data1><data2><data3>
Indicates an ‘ON’ response event. A response event is a reply to a status request (AREQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<F4><NN hi><NN lo><EN hi><EN lo> <data1><data2><data3>
Indicates an ‘OFF’ response event. A response event is a reply to a status request (AREQ) without producing an ON or OFF event.
[<MjPri><MinPri=3><CANID>]<F5><NN hi><NN lo><EN hi><EN lo><EN#><EV#><EV val>
Sent by a device to a node in learn mode to teach it an event. The event index must be known. Also teaches it the associated event variables (EVs). This command is repeated for each EV required.
[<MjPri><MinPri=3><CANID>]<FF><Ext-OPC><byte1><byte2><byte3><byte4><byte5><byte6>
Used if the basic set of 32 OPCs is not enough. Allows an additional 256 OPCs
There are eight Node Parameters defined, the first seven are returned by OPC RQNP during node setup. All parameters can be read by index using OPC RQNPN. All parameters are assumed to be numeric unless indicated otherwise. Node Parameters are read-only.
Param | Description |
---|---|
1 | Manufacturer Id |
2 | Minor Version - char |
3 | Module Id |
4 | Number of Events supported by the module |
5 | Number of Event Variables per Event |
6 | Number of Node Variables supported by the module |
7 | Major Version |
8 | Flags |
Flags are defined as follows:
Bit | Description |
---|---|
0 | Consumer node |
1 | Producer node |
2 | FliM mode |
3-7 | Reserved, set to zero. |
Note: both bits 0 & 1 set indicate a Combi node.
Error codes for CBUS accessory modules, these error codes are returned by OPC CMDERR 0x6F
Code | Description |
---|---|
1 | Command Not Supported - see note 1. |
2 | Not In Learn Mode |
3 | Not in Setup Mode - see note 1 |
4 | Too Many Events |
5 | Reserved - see note 2 |
6 | Invalid Event variable index |
7 | Invalid Event |
8 | Reserved - see note 3 |
9 | Invalid Parameter Index |
10 | Invalid Node Variable Index |
11 | Invalid Event Variable Value |
12 | Invalid Node Variable Value |
DCC Error codes, these code are returned by OPC ERR 0x63\
Code | Description |
---|---|
1 | ERR_LOCO_STACK_FULL - first two bytes are loco address |
2 | ERR_LOCO_ADDR_TAKEN - first two byes are loco address |
3 | ERR_SESSION_NOT_PRESENT - first byte session id, second byte not used |
4 | ERR_NO_MORE_ENGINES - first byte consist id, second byte not used - (response to query consist when specified index empty) |
5 | ERR_ENGINE_NOT_FOUND - first byte session id, second byte not used - (response to remove from consist, which specifies session id) |
6 | ERR_CMD_RX_BUF_OFLOW - data bytes set to zero (not used) - This would be sent out in the unlikely event that the command station can rx buffers overflow. |
Note 1: Accessory modules do not return this error.
Note 2: This value is defined as Invalid Event Value Index in the FCU but I cannot find any current use for it.
Note 3: Currently used by code that processes OPC REVAL 0x9C but this code should be updated to use codes 6 & 7.