Change Frame Data on Every Transmission (Pattern Files)
Overview
Use the pattern file feature in simulation mode when you want to change the response data automatically at transmission time.
It is helpful when you need to swap response data under the same ID or switch commands under specific conditions during a master simulation, such as:
- Repeated transmissions
- Elapsed time
- Custom conditions
This makes it possible to emulate pseudo sensor inputs to an ECU or reproduce specific sequence operations during simulation.
Use Cases
- Emulate a temperature sensor signal toward the ECU.
- Gradually change frame data to verify fail-safe behavior.
- Recreate periodic variations observed on real vehicles to evaluate communication stability.
Setup Steps
Applying to Master Schedules
- You can assign a pattern file to each frame in the master schedule.
- The frame ID is overwritten by the ID inside the pattern file.
1. Select the simulation mode
From the main menu open Simulation Window, then set LIN Simulation Mode to Master Sim.
In the Frame List, choose the frame that should use the pattern file and click the edit button to open the LIN Frame Setting dialog.
2. Load a pattern file
Click
in Pattern Setting → Source File to open the file dialog and select the pattern file to load.
Click Load to import the pattern data and show it in the pattern data list.
3. Configure Pattern Change Trigger
Use Pattern Change Trigger to define when the pattern data should switch.
In this example the trigger is set to Log Trigger.
4. Configure pattern repetition
Click OK in the LIN Frame Setting dialog to save the settings and close the dialog.
Frames with an assigned pattern file show a check mark in Ptn. Turn on Rep. to loop the pattern file continuously.
Applying to Slave Simulation Response Frames
- A pattern file can be assigned for each ID.
- The ID set in the response definition takes priority over the ID inside the pattern file.
1. Select the simulation mode
From the main menu open Simulation Window, then set LIN Simulation Mode to Slave Sim.
In the Response ID List, select the frame that should use the pattern file and click the edit button to open the LIN Response Setting dialog.
2. Load a pattern file
Click
in Pattern Setting → Source File to open the file dialog and choose the pattern file to load.
Click Load to import the pattern data and show it in the pattern data list.
3. Configure Pattern Change Trigger
Use Pattern Change Trigger to define when the pattern data should switch.
In this example the trigger is set to Log Trigger.
4. Configure pattern repetition
Click OK in the LIN Response Setting dialog to save the settings and close the dialog.
Frames with an assigned pattern file show a check mark in Ptn. Turn on Rep. to loop the pattern file continuously.
Pattern File Format
File extensions
Pattern file formatting differs between the .ptn and .csv extensions.
| Extension | Details |
|---|---|
| ptn | A simple comma-separated format. Avoid spaces before or after commas, otherwise loading fails. |
| csv | Must be in MicroPeckerX log file format. Useful when you want to reuse transmit/receive patterns captured from logs. |
Pattern files with the .ptn extension
Each line describes one frame containing the command, ID, and data.
Lines are transmitted in order. A pattern file can contain up to 10,000 lines.
Frame layout
| Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Column 8 | Column 9 | Column 10 |
|---|---|---|---|---|---|---|---|---|---|
| Command | ID | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 |
Command types
- Tx
- Rx
- Wakeup
- Sleep
Pattern file examples (.ptn)
Change payload for the same ID (master/slave)
Changes D0 and D1 in 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 both ID and payload (master)
Updates the response data and command for one frame in the master schedule.
Tx,10,00,11
Rx,10
Tx,10,44,55
Sleep
Tx,10,88,89
Wakeup
Tx,10,CC,DD
Pattern Setting Dialog Reference
| Item | Description | Notes |
|---|---|---|
| Source File | Shows the full path of the pattern file selected with . | You can also enter the full path manually. |
button | Opens the file dialog to choose the pattern file. | The file is not loaded until you click . |
| ID Filter | Enables filtering for the pattern data in the loaded file. When enabled, data that does not meet the following conditions is ignored: ・ID matches the value entered in ID Filter ・Type is Wakeup or Sleep | |
| Default Data | Specify hexadecimal default data used when the pattern data length differs from the length defined under Device Setting → ID Definition. | |
| Missmatch DL | Configure how to handle length mismatches between the pattern data and the ID length defined under Device Setting → ID Definition. ・Use Default: Fill missing bytes with the default data ・Ignore: Exclude the entry from the list | Use Default example: ID definition length: 4 bytes Pattern: 08,4C (2 bytes) Default: 11,22,33,44,55,66,77,88 → Result: 08,4C,33,44 |
button | Loads the pattern file shown in Source File and displays it in the pattern data list. | |
button | Clears the pattern data list. | |
button | Saves the pattern data list to a file. | |
| Pattern Data List (outline ①) | Displays the pattern data included in the loaded pattern file. | |
| Pattern Change Trigger | Defines the conditions under which pattern changes occur. | |
button | Saves the settings and closes the dialog. | |
button | Discards the settings and closes the dialog. |
FAQ
Q: How can I switch the pattern on every transmission?
Master simulation
Set the Pattern Change Trigger for the preceding frame in the schedule to a Log Trigger that reacts to the frame reception.
Alternatively, match the Timer setting of the Pattern Change Trigger to the transmission interval of the target frame to switch the pattern on every transmission.
Slave simulation
For the target ID, set the Pattern Change Trigger (Log Trigger) to Header reception so the pattern switches on every transmission.
.
button
button
button
button