Main Content

j1939.ParameterGroup Properties

Properties of the j1939.ParameterGroup object

Use the following properties to examine or configure J1939 parameter group settings. Use j1939ParameterGroup to create a parameter group object.

Protocol Data Unit Details

expand all

This property is read-only.

The Name property displays the name of the J1939 parameter group as a character vector. This value is acquired from the name you define when you create the parameter group.

Data Types: char

This property is read-only.

The PGN property displays the number of the parameter group as a uint32 value. This value is automatically assigned when you create the parameter group.

Data Types: uint32

The Priority property specifies the precedence of the parameter group on the J1939 network. Priority takes a numeric value of 0 (highest priority) to 7 (lowest priority), which specifies the order of importance of the parameter group.

Data Types: uint32

This property is read-only.

The PDUFormatType property displays the J1939 protocol data unit format of the parameter group, as a character vector. This value is automatically assigned when you create the parameter group.

Data Types: char

Address of the J1939 parameter group source. SourceAddress identifies the parameter group source on the J1939 network. This allows the destinations to identify the sender and respond appropriately.

Specify SourceAddress of the parameter group as a number between 0 and 253. 254 is a null value and is used by your application to detect available addresses on the J1939 network.

Data Types: uint32

Address of the J1939 parameter group destination. DestinationAddress identifies the parameter group destination on the J1939 network. The source uses the specified destination address to send parameter groups.

Specify DestinationAddress of the parameter group as a number from 0 through 253. 254 is a null value and is used by your application to detect available addresses on the J1939 network. To send a parameter group to all devices on the network, use 255, which is the global value.

Data Types: uint32

Data Details

expand all

This property is read-only.

The Timestamp property displays the time at which the parameter group was received on a J1939 channel. This time is based on the hardware log.

Data Types: double

Use the Data property to view or define the raw data in a J1939 parameter group. The data is an array of uint8 values.

For example, create a parameter group and specify data:

pg = j1939ParameterGroup(db,'PackedData')
pg.Data(1:2) = [50 0]

Data Types: uint8

The Signals property allows you to view and edit decoded signal values defined for a parameter group. The input values for this property depend on the signal type.

For example, create a parameter group.

pg = j1939ParameterGroup(db,'PackedData')

Display the parameter group signals

pg.Signals
       ToggleSwitch: -1
       SliderSwitch: -1
       RockerSwitch: -1
    RepeatingStairs: 255
         PushButton: 1

Change the value of the repeating stairs.

pg.Signals.RepeatingStairs = 200
       ToggleSwitch: -1
       SliderSwitch: -1
       RockerSwitch: -1
    RepeatingStairs: 200
         PushButton: 1

Data Types: struct

Other Information

expand all

Enter custom data to be stored in your CAN message or a J1939 parameter group, channel, or database object using the UserData property. When you save an object with UserData specified, you automatically save the custom data. When you load an object with UserData specified, you automatically load the custom data.

Tip

To avoid unexpected results when you save and load an object with UserData, specify your custom data in simple data types and constructs.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | string | struct | table | cell | function_handle | categorical | datetime | duration | calendarDuration | fi
Complex Number Support: Yes

Version History

Introduced in R2015b