Why does the LIN Pack/Unpack block fail to parse the LDF file with the error "Unable to parse the signal representation section in the LDF file"?

7 views (last 30 days)
Why do I get the following error with the LIN Pack or LIN Unpack block from the Simulink Real-Time library?
Unable to parse the signal representation section in the LDF file.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 1 Jul 2024
Edited: MathWorks Support Team on 3 Jul 2024
This error may indicate one of two things:
  • The signal initial value format is incorrect.
  • The signal representation section in the LDF file is malformed.
As a result, it cannot be parsed by the LDF file parser and the block throws the error dialog.
1. Initial value
The following signals have initial values that are defined as an array of 3 values.
Signals {
    SND_PDU_Curr: 24,{255, 255, 255},SND,MAIN ;
}
Currently, array initial values are not supported. As a workaround, use a scalar value for the initial value instead.
2. Malformed signal representations
Example 1: Whitespace before colon
Signal_representation {
c02_LIN_Sig_1 : LIN_Sig_1;
}
For each signal_representation token in the file, there is a space after the signal representation name and before the ":". This space should be removed.
Example 2: Line break
Signal_representation {
c02_LIN_Sig_64_Encd : LIN_Sig_19, LIN_Sig_20, LIN_Sig_25, LIN_Sig_25,
LIN_Sig_31, LIN_Sig_34;
}
There is a new line character in a single signal_representation token. Every token should be in one line.
The fixed signal representation section would looks like this:
Signal_representation {
c02_LIN_Sig_1: LIN_Sig_1;
c02_LIN_Sig_64_Encd: LIN_Sig_19, LIN_Sig_20, LIN_Sig_25, LIN_Sig_25, LIN_Sig_31, LIN_Sig_34;
}
If the above tips don't apply, please contact MathWorks Technical Support and send us the LDF file for further investigation.

More Answers (0)

Categories

Find more on Troubleshooting in Simulink Real-Time in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!