Skip to main content
Version: Ver.4.10

Automatically Change Response Data Using a Pattern File

When replacing existing responses from Catalog, see Importing Responses for the initial data used and the effects on Error and Pattern settings. This page describes Pattern settings themselves and the file specifications.

Overview​

Pattern file image

In simulation mode, use the pattern file function when you want to change response data automatically at transmission time.
This is useful when you want to change response data for the same ID or change commands under specific conditions in master simulation.

  • During repeat transmission
  • After time elapses
  • Under specific conditions

This makes it possible to simulate pseudo sensor inputs to the ECU and reproduce specific sequence behavior.

Application Examples​

  • Emulate a temperature sensor signal for the ECU.
  • Gradually change frame data to verify fail-safe behavior.
  • Reproduce periodic changes that occur in an actual vehicle and evaluate communication stability.

Setup Procedure​

When Applying to a Master Schedule​

  • A pattern file can be assigned to each individual frame in a master schedule.
  • The frame ID is set with the pattern file ID taking priority.

1. Select the simulation mode
Open Simulation Window from the main menu. For LIN Simulation Mode, select Master Sim..

master_edit

Select the frame to which you want to apply the pattern file from Frame List, then click the edit button to open the LIN Frame Setting dialog.

2. Load the pattern file
Click Pattern File to open LIN Pattern File. Click the ... button for Source File and select the pattern file to load.

The following figures for file selection, data lists, and trigger settings show screens from the previous version.

Pattern Load

Click the Load button to load the pattern data and display it in the pattern data list.

Pattern List

3. Configure Pattern Change Trigger
In LIN Pattern File, use Pattern Change Trigger to set the trigger for switching pattern data. In this example, Log Trigger is configured.

Pattern Change Trigger

4. Configure pattern repetition
Click OK in LIN Pattern File to apply the settings to the parent screen. Click OK in the parent LIN Frame Setting screen to finalize the pattern file settings.

Pattern Rep. Set

Frames with a configured pattern file have a check mark in Ptn. If Rep. is checked, the pattern file is executed repeatedly.

When Applying to a Slave Simulation Response Frame​

  • A pattern file can be set for each ID.
  • The configured ID takes priority over the pattern file ID.

1. Select the simulation mode
Open Simulation Window from the main menu. For LIN Simulation Mode, select Slave Sim..

slave_edit

Select the frame to which you want to apply the pattern file from Response ID List, then click the edit button to open the LIN Response Setting dialog.

2. Load the pattern file
Click Pattern File to open LIN Pattern File. Click the ... button for Source File and select the pattern file to load.

The following figures for file selection, data lists, and trigger settings show screens from the previous version.

Slave Pattern Load

Click the Load button to load the pattern data and display it in the pattern data list.

Slave Pattern List

3. Configure Pattern Change Trigger
In LIN Pattern File, use Pattern Change Trigger to set the trigger for switching pattern data. In this example, Log Trigger is configured.

Slave Pattern Change Trigger

4. Configure pattern repetition
Click OK in LIN Pattern File to apply the settings to the parent screen. Click OK in the parent LIN Response Setting screen to finalize the pattern file settings.

Slave Pattern Rep. Set

Frames with a configured pattern file have a check mark in Ptn. If Rep. is checked, the pattern file is executed repeatedly.

Pattern File Specifications​

File Extension​

The format of the pattern file depends on the extension, ptn or csv.

File extensionDescription
ptnYou can write it easily as comma-separated values. Note that loading fails if there are spaces before or after commas.
csvIt must be in MicroPeckerX log file format. This is convenient when you want to use transmission and reception patterns from a captured log.

Pattern File with a .ptn Extension​

Write the command, ID, and data for one frame on each line. Lines are transmitted in order from the first line. A pattern file can contain up to 10,000 lines.

Frame Structure​

Column 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8Column 9Column 10
CommandIDD1D2D3D4D5D6D7D8

Command Types​

  • Tx
  • Rx
  • Wakeup
  • Sleep

Pattern File Sample (ptn)​

Change Transmission Data for the Same ID (Target: Master/Slave)​

Transmit while changing D0 and D1 of the response data.

Tx,10,E8,03
Tx,10,D0,07
Tx,10,D0,08
Tx,10,D0,10
Tx,10,B8,0B
Tx,10,B8,0C
Tx,10,B8,11

Change Transmission Data Including the ID (Target: Master)​

Change the response data, including the command, for a single frame in a master schedule.

Tx,10,00,11
Rx,10
Tx,10,44,55
Sleep
Tx,10,88,89
Wakeup
Tx,10,CC,DD

Pattern Setting Screen Description​

In the current version, configure the following items in LIN Pattern File, opened with the Pattern File button. The figure below shows the previous version's screen.

Pattern Setting in the previous version
ItemDescriptionNotes
Source FileDisplays the full path of the pattern file selected with the Select button.You can also set it by entering the full path directly.
Select buttonOpens the file dialog and selects the pattern file to load.The selected file is not loaded until the Load button is clicked.
ID FilterWhen ON, extracts data matching the specified ID.
For PTN files, Master loads Wakeup and Sleep, and Slave loads Wakeup regardless of the ID condition. Slave does not load Sleep. For CSV files, the ID condition is applied to the corresponding records.
Default DataSets hexadecimal default data used when the data length set in Device Setting → ID Definition differs from the pattern data length.
Missmatch DLSets the handling when the data length configured in Device Setting - ID Definition differs from the pattern data length.
- Use Default: Use default data for missing bytes
- Ignore: Treat it as invalid and do not display it in the list
Example when Use Default is set:
ID definition length: 4 bytes
Pattern: 08,4C (2 bytes)
Default: 11,22,33,44,55,66,77,88
-> Result: 08,4C,33,44
Load buttonLoads the pattern file shown in Source File and displays it in Pattern Data List.
Clear buttonClears everything in Pattern Data List.
Save buttonSaves Pattern Data List with any file name.
Pattern data list (area ①)Displays the pattern data contained in the loaded pattern file.
Pattern Change TriggerSets the occurrence conditions for pattern change events.
OK buttonApplies the child screen settings to the parent screen and closes the child. Finalize the settings with OK in the parent screen.
Cancel buttonDiscards changes in the child screen and closes the dialog.

Troubleshooting​

Q: I want to switch patterns every time data is transmitted​

In Master Simulation​

If you set Pattern Change Trigger to Log Trigger for the reception of the schedule frame immediately before the target frame, you can switch the pattern when the target frame is transmitted. Alternatively, if you set the Timer in Pattern Change Trigger to the same cycle as the transmission cycle of the target frame, you can switch the pattern on each transmission.

In Slave Simulation​

If you set Pattern Change Trigger to Header reception of the target ID in Log Trigger settings, you can switch the pattern on each transmission.