05-02-2018 11:57 PM
The A2L-Viewer detect some errors via menu "Diagnostic - Error list". Here is one example:
Type Name Property Status Error Code
Characteristic SW_ID Unit Warning 301002
If I want to read this Characteristic with "MC Characteristic Read.vi" there is a error code 301023
In the A2L-File the Characteristic is defined as follow:
/begin CHARACTERISTIC SW_ID "SW Version"
ASCII 0x80034240 __UBYTE_Z 0 NO_COMPU_METHOD 0 255
CALIBRATION_ACCESS NO_CALIBRATION
NUMBER 32
SYMBOL_LINK "SW_ID" 0
/end CHARACTERISTIC
What is the fault in the A2L-File (I have no idea). Why I cannot read the value (Error 301023)?
Solved! Go to Solution.
05-03-2018 10:15 AM - edited 05-03-2018 10:17 AM
Not sure of the error, it could be a number of things like:
I have always preferred to use VAL_BLK rather than ASCII for strings.
https://forums.ni.com/t5/Automotive-and-Embedded-Networks/A2L-Viewer-error-list/td-p/3788707
05-04-2018 01:35 AM
I think all definitions are OK, because Vector ASAP2-Viewer detects no error.
I tried to change "ASCII" into "VAL_BLK" and then to "VALUE" with the following results:
Definition as "ASCII" - read with "MC Characteristic Read.vi" - error code 301023 (also error in A2L-Viewer)
Definition as "VAL_BLK" - read with "MC Characteristic Read.vi" - error code 301024 (no error in A2L-Viewer)
Definition as "VALUE" - read with "MC Characteristic Read.vi" - no error (no error in A2L-Viewer)
Only with definition "VALUE" the output is OK. Other definitions with "ASCII" (Error 301023) and "VAL_BLK" (Error 301024) are not readable. But I can read only ONE value (UBYTE) when I change to "VALUE", but String definition is more than one letter. In my example 32 values (Letters) defined as "NUMBER 32".
Is there another vi to read ASCII? The "MC Characteristic Read.vi" has only a "Double" output and has no possibility to change to "String" (ASCII) output.
05-04-2018 02:24 AM
Now I have the following workaround:
Old A2L-Definition:
/begin CHARACTERISTIC SW_ID "SW Version"
ASCII 0x80034240 __UBYTE_Z 0 NO_COMPU_METHOD 0 255
CALIBRATION_ACCESS NO_CALIBRATION
NUMBER 32
SYMBOL_LINK "SW_ID" 0
/end CHARACTERISTIC
New A2L-Definition:
/begin CHARACTERISTIC SW_ID "SW Version"
VAL_BLK 0x80034240 __UBYTE_Z 0 NO_COMPU_METHOD 0 255
CALIBRATION_ACCESS NO_CALIBRATION
MATRIX_DIM 32 1 1
SYMBOL_LINK "SW_ID" 0
/end CHARACTERISTIC
Read the values with "MC Characteristic Read.vi" output changed to "Curve (1D-Array)".
Change Double-array output to U8, Change U8-Array to String.
With this workaround I can read the string correct. Thank you Minions. VAL_BLK was the crucial hint.
05-04-2018 09:20 AM
Sorry, Link was supposed to point to here.