01-11-2015 08:01 PM - edited 01-11-2015 08:02 PM
TroyK 已寫:
It is better that you look at the vxlapi.dll documentation and understand what is going on, but I added a CAN receive example to the community document anyway.
CAN Receive Example.vi added due to popular demand.
Hello , TroyK , I can use this vi work normally but I found some word I don't understan like.. "DLC"
01-11-2015 08:05 PM
http://en.wikipedia.org/wiki/CAN_bus
DLC = Data Length Code. Number of bytes of data (0–8 bytes)
01-12-2015 03:17 AM
TroyK 已寫:
http://en.wikipedia.org/wiki/CAN_bus
DLC = Data Length Code. Number of bytes of data (0–8 bytes)
Thank you,, Your answer is really helpful
01-14-2015 08:22 PM
TroyK 已寫:
http://en.wikipedia.org/wiki/CAN_bus
DLC = Data Length Code. Number of bytes of data (0–8 bytes)
So , I guess the relationship is like as below right?
------
DLC DATA
0000 0byte
0001 1byte
0010 2bytes
0011 3bytes
0100 4bytes
0101 5bytes
0110 6bytes
0111 7bytes
1000 8bytes
------
I have another question, Can "DLC=000" possibly?
01-14-2015 09:00 PM - edited 01-14-2015 09:18 PM
Yes, DLC is 4 bits.
Standard CAN DLC 0-8, value = number of bytes.
b0000 d0 0bytes (Yes, you can have zero bytes for wake-up for example)
b0001 d1 1byte
b0010 d2 2bytes
b0011 d3 3bytes
b0100 d4 4bytes
b0101 d5 5bytes
b0110 d6 6bytes
b0111 d7 7bytes
b1000 d8 8bytes
In CAN-FD number of bytes above 8 is encoded:
b1001 d9 12bytes
b1010 d10 16bytes
b1011 d11 20bytes
b1100 d12 24bytes
b1101 d13 32bytes
b1110 d14 48bytes
b1111 d15 64bytes
01-14-2015 09:30 PM
TroyK 已寫:
Yes, DLC is 4 bits.
Standard CAN DLC 0-8, value = number of bytes.
b0000 d0 0bytes (Yes, you can have zero bytes for wake-up for example)
b0001 d1 1byte
b0010 d2 2bytes
b0011 d3 3bytes
b0100 d4 4bytes
b0101 d5 5bytes
b0110 d6 6bytes
b0111 d7 7bytes
b1000 d8 8bytes
In CAN-FD number of bytes above 8 is encoded:
b1001 d9 12bytes
b1010 d10 16bytes
b1011 d11 20bytes
b1100 d12 24bytes
b1101 d13 32bytes
b1110 d14 48bytes
b1111 d15 64bytes
I have this question is from "Data field"
I can not understand why 0..64 ,, Is not 0..63(8byte)?
01-14-2015 09:42 PM - edited 01-14-2015 09:43 PM
DLC is a 4bit field used to specify how many bytes of data are contained in the CAN frame.
4 bits can have a value of 0-15.
For DLC values 0 to 8 the number of bytes is equal to the DLC value.
For DLC values 9 to 15 the number of bytes is determined by the table I listed before.
A standard CAN frame can have 0-8 bytes.
A CAN-FD frame can have 0-64 bytes. (BYTES! not BITS)
CAN-FD is new, prehaps I shouldn't have mentioned it. A network will be either CAN-FD or CAN but not both. You can't mix them on the same bus.
01-15-2015 12:41 AM
TroyK 已寫:
DLC is a 4bit field used to specify how many bytes of data are contained in the CAN frame.
4 bits can have a value of 0-15.
For DLC values 0 to 8 the number of bytes is equal to the DLC value.
For DLC values 9 to 15 the number of bytes is determined by the table I listed before.
A standard CAN frame can have 0-8 bytes.
A CAN-FD frame can have 0-64 bytes. (BYTES! not BITS)
CAN-FD is new, prehaps I shouldn't have mentioned it. A network will be either CAN-FD or CAN but not both. You can't mix them on the same bus.
Thanks your explain,,,I think I just confused the index and length!
02-12-2015 04:07 PM
Update to my statement for accuracy accounting for emerging technology:
@TroyK wrote:
A network will be either CAN-FD or CAN but not both. You can't mix them on the same bus.
Actually you can mix CAN and CAN-FD if all the older CAN nodes are put to sleep in a partial networking scheme or the tranceivers they use are specially designed to filter out CAN-FD frames.