Skip to main content

Vehicle Function

Group: 0x02 Command: 0x04 0x02.0x04

Receiving

When receiving command 0x04 the 'Data' section will look like this:

NIDFunction numberFunction state
16 Bit16 Bit16 Bit

If Mode = 0b00, then the function of the locomotive with 'NID' and the function 'No.' is queried.
If Mode = 0b01, then the locomotive function 'Function number' of the locomotive 'NID' is set to the specified value.
If Mode = 0b11, then the loco responds to a function value query.
Where function state = 0x00 always means "Off" and function state not equal to 0x00 depends on the respective locomotive decoder. For "normal" DCC and MM locomotive decoders this is interpreted as the function being "On".

The 'Function number' is divided into several areas for this command:

From function numberTo function numberDescriptionValid values
031The known 'normal' functions. The maximum function number depends on the respective format.On/Off
256512256 analog functions0 ... 255
3276865536Binary States (see NMRA 9.2.1)On/Off

Sending

When sending command 0x04 the 'Data' section will look like this:

Vehicle addressFunction IDFunction status
16 Bit16 Bit16 Bit