canFMSFilterCreate (Function) |
Top Previous Next |
This creates a receive filter similar to canFilterCreateX, except that the filter will be for a single FMS/J1939 message. When a filter has been successfully created, the function returns an ID for the filter. This ID can be used to check the status of the filter with canFilterStatus.
Please see the canFilterCreate function for more information on working with receive filters and canFilterCreateX for more information on the advanced filter options.
The J1939 standard is a vehicle bus standard used for communication and diagnostics among vehicle components. The FMS (Fleet Management System interface) is a subset of the J1939 standard and is defined as a standard interface to vehicle data of commercial vehicles. All FMS/J1939 messages contain 8 bytes of data and a standard header containing an index called PGN (Parameter Group Number) which is embedded in the CAN message's 29-bit identifier (extended identifier). (The full definition of the header is: <priority:3 bit><reserve:1 bit><PGN:17 bit><source address:8 bit>)
Input: port : SINT (1/2) (default 1) The port of the CAN bus.
PGN : DINT (16#0...16#1_FFFF) The PGN number of the FMS/J1939 message.
downsample : SINT (1..127, Default 1) Only accepts each x incoming message - thus allowing logging for a longer period.
changed : BOOL
change_hi_mask : PTR Address of a bit mask that is used to determine which parts of the message data are used when checking for low state to high state differences. If change_hi_mask is not used, all parts of the message data are used. This parameter is ignored if changed is FALSE. Note: the bit mask must be 8 bytes long.
change_lo_mask : PTR Address of a bit mask that is used to determine which parts of the message data are used when checking for high state to low state differences. If change_lo_mask is not used, all parts of the message data are used. This parameter is ignored if changed is FALSE. Note: the bit mask must be 8 bytes long.
destination : SINT (1...3, default 3)
limit : SINT (0...127) The number of received messages before the filter is disabled. There is no limit if set to 0 (zero).
timeout : SINT (0...127) The number of seconds without receiving a message before the next incoming message is automatically accepted. The timeout is disabled if set to 0 (zero).
group : SINT (0,2...127, default 0) (only supported from on NX32/NX32L firmware V5.04 / 1.31.00) The number of messages in sequence that are part of the group. The group is disabled if set to 0 (zero).
time_interval : INT (0,100...32767, default 0) (only supported from on NX32/NX32L firmware V5.04 / 1.31.00) The number of milliseconds after receiving a message, where incoming messages are ignored. The time_interval is disabled if set to 0 (zero).
Returns: SINT
Declaration: FUNCTION canFMSFilterCreate : SINT;
Example: INCLUDE rtcu.inc |