10-01-2010 04:09 AM - edited 10-01-2010 04:11 AM
Hello,
I have an a2l file with characteristics.
At a certain adress I have defined a signal called X of uint8 datatype.
At the same address I have defined others signals of type uint(1) named A, uint (1,1) named B, uint (1,2) named C... and so on till uint(1,6). Basically could be flags of an array of bits.
How can I read based on the signal name (A, B, C) only the coresponding value and not the full size which I got now, e.g. read only signal B which is one bit from all uint.
Thanks in advance,
Vincent
10-05-2010 10:19 AM
Hello Vincent,
To get a clearer picture of how you are reading this file in LabVIEW so that we can help, could you post your code? Or even a screen shot and also one of the result string as well as an example of what you want the read string to be.
Thanks,
10-07-2010 01:27 AM - edited 10-07-2010 01:36 AM
I am using the ECU MC's toolkit "MC Characteristic Read.vi" the DBL output, to which I provide the name of the Characteristic defined in the A2L database.
The characteriscs which are defined in the a2l file at the same addres are identified by some bitmasks:
/begin CHARACTERISTIC X "X comment"
VALUE 0x8001912 __UBYTE 0 CNV_FN2 0 255
ECU_ADDRESS_EXTENSION 0x0
EXTENDED_LIMITS 0 255
BIT_MASK 0xFF
FORMAT "%.3"
/begin IF_DATA CANAPE_EXT
100
DISPLAY 0 0 255
/end IF_DATA
/end CHARACTERISTIC
/begin CHARACTERISTIC A "A comment"
VALUE 0x8001912 __UBYTE 0 CNV_FN2 0 255
ECU_ADDRESS_EXTENSION 0x0
EXTENDED_LIMITS 0 255
BIT_MASK 0x1
FORMAT "%.3"
/begin IF_DATA CANAPE_EXT
100
DISPLAY 0 0 255
/end IF_DATA
/end CHARACTERISTIC
/begin CHARACTERISTIC B "B comment"
VALUE 0x8001912 __UBYTE 0 CNV_FN2 0 255
ECU_ADDRESS_EXTENSION 0x0
EXTENDED_LIMITS 0 255
BIT_MASK 0x8
FORMAT "%.3"
/begin IF_DATA CANAPE_EXT
100
DISPLAY 0 0 255
/end IF_DATA
/end CHARACTERISTIC
/begin CHARACTERISTIC C "C comment"
VALUE 0x8001912 __UBYTE 0 CNV_FN2 0 255
ECU_ADDRESS_EXTENSION 0x0
EXTENDED_LIMITS 0 255
BIT_MASK 0x4
FORMAT "%.3"
/begin IF_DATA CANAPE_EXT
100
DISPLAY 0 0 255
/end IF_DATA
/end CHARACTERISTIC
/begin CHARACTERISTIC D "D comment"
VALUE 0x8001912 __UBYTE 0 CNV_FN2 0 255
ECU_ADDRESS_EXTENSION 0x0
EXTENDED_LIMITS 0 255
BIT_MASK 0x2
FORMAT "%.3"
/begin IF_DATA CANAPE_EXT
100
DISPLAY 0 0 255
/end IF_DATA
/end CHARACTERISTIC
/begin CHARACTERISTIC E "E comment"
VALUE 0x8001912 __UBYTE 0 CNV_FN2 0 255
ECU_ADDRESS_EXTENSION 0x0
EXTENDED_LIMITS 0 255
BIT_MASK 0x40
FORMAT "%.3"
/begin IF_DATA CANAPE_EXT
100
DISPLAY 0 0 255
/end IF_DATA
/end CHARACTERISTIC
/begin CHARACTERISTIC F "F comment"
VALUE 0x8001912 __UBYTE 0 CNV_FN2 0 255
ECU_ADDRESS_EXTENSION 0x0
EXTENDED_LIMITS 0 255
BIT_MASK 0x20
FORMAT "%.3"
/begin IF_DATA CANAPE_EXT
100
DISPLAY 0 0 255
/end IF_DATA
/end CHARACTERISTIC
/begin CHARACTERISTIC G "G comment"
VALUE 0x8001912 __UBYTE 0 CNV_FN2 0 255
ECU_ADDRESS_EXTENSION 0x0
EXTENDED_LIMITS 0 255
BIT_MASK 0x10
FORMAT "%.3"
/begin IF_DATA CANAPE_EXT
100
DISPLAY 0 0 255
/end IF_DATA
/end CHARACTERISTIC
/begin CHARACTERISTIC H "H comment"
VALUE 0x8001912 __UBYTE 0 CNV_FN2 0 255
ECU_ADDRESS_EXTENSION 0x0
EXTENDED_LIMITS 0 255
BIT_MASK 0x80
FORMAT "%.3"
/begin IF_DATA CANAPE_EXT
100
DISPLAY 0 0 255
/end IF_DATA
/end CHARACTERISTIC
Is there a Vi which read the characteristics considering this bitmasks?
Thanks and regards,
Vincent
10-07-2010 01:43 AM
What I forgot to say previous...
If I provide to signal name the B for example I have as result the value of X provided ok, but not what I am expecting, a value dependent of the predefined bitmasks...
10-20-2010 05:14 AM
Problem still not solved on my system
Any help is highly apreciated....
Vincent
10-20-2010 10:01 AM
Hi Vincent,
You are correct. When you read the characteristic B, you should get data from the applied bit mask, not the same value as X.
Example:
Value to be masked BIT_MASK Result
10110110 0x1 = 1 (bin) 0 (bin)
10110110 0x2 = 10 (bin) 1 (bin)
10110110 0x6 = 110 (bin) 11 (bin)
The toolkit's behavior is wrong. A Corrective Action Request (#254903) has been filed so the issue may be fixed in the next release of the toolkit. I apologize for the inconvenience.
10-22-2010 10:51 AM
Thansk for reply and for the info,
Do you know when it is scheduled the next release of the toolkit with this CR included?
Regards,
Vincent
02-21-2011 04:51 AM
Hello ,
Is there any new update?
Thanks for the answer and regards,
Vincent
02-21-2011 04:57 AM
The next release of the ECU MC Toolkit is scheduled for Q3 2011.
If you would need a beta version sooner please let us know and contact us by email under
canpse@ni.com
Thanks
Roland