In general, a message is used to transmit several Signals packed into a single multi-byte buffer of data. This is the case for CAN and LIN messages, but is usually true whenever we transmit a multi-byte buffer of data. MxVDev enables you to deal with the component Signals of a message individually, just as if they were discrete or analog values. When the message is transmitted, the component signals are packed into the message buffer according to how the Message Fields are defined. This section describes how to define the location of the fields inside the message.
After a message field has been defined, you can use it in TestCases as a message-based Signal. For example, a Continuous Floating-Point field becomes a Continuous Floating-Point Signal. See Picking Signals. In the TestCase viewer, message-based Signals are marked with a bracket }. The message name and field name are separated by a middle dot.
A Message-Based Signal
Once a Signal of type Message is in the Signal Dictionary, you can add definitions for Message Fields.
1.Select Project-> Signal Dictionary from the main menu.
2.Select the Message Signal and click the Edit button to display the Edit Signal Definition box:
Note: When fields are masked, the undefined areas are marked with asterisks in the Transition List:
3.Click the Apply button at the bottom of the dialog box. Then select the Message Fields tab. All the fields currently defined for the message are listed. You can add, edit, and delete fields as needed.
For each field that you add or edit, provide the following details about the field. The parameters vary depending on the type of field.
•Name - This is the name of the field. For CAN data, the fields are known as signals.
•Description - Optional
•Type - The available choices are: Continuous Fixed Point, Continuous Floating Point, Discrete, and Message. See Signal Classification.
•Byte Order - This attribute governs the order of the data as it is packed into a multi-byte message. It has two choices: Little-endian and Big-endian. This information is only applicable when the type of field is either numeric or Enum and the length of the field is larger than 1 byte.
•Byte Offset - This is the starting byte for the field within the message.
•Length - This is the length of the field within the message in bits.
•Start Bit - This is the starting bit within a byte for the Field, which is only applicable when the length of the field is less than 1 byte.
•Units - This is the engineering unit string for this message field. It is optional.
•Init - The initial value of this field.
•Min and Max - The minimum and maximum values of a Number type field, which are optional. If click the Calculate Range button, MxVDev will fill them with the largest possible range.
•Scale - The scale factor between the value represented in Engineering Units and the raw integer value as it is stored in the message. Its default value is 1. You change it to be any value except 0.
•Offset - The offset between the value represented in Engineering Units and the raw integer value as it is stored in the message. Its default is 0. We can get the real value of this field from the integer value in the message by applying following equation: EngVal = IntVal * Scaling + Offset
•Enum Set - The set of Enum values associated with this field if the type is Enum.
You can use the Calculate Range button to assign the greatest possible range to the Min and Max. The range is calculated based on the Type, the Length (bits), and whether it is signed or unsigned.
Enter the message field definitions as desired, then click OK.