12-03-2020 03:22 AM
Hello Everyone,
I am facing an issue in my current project, that I can't handle myself.
I need to implement a CAN (J1939 protocol) interface in my project to communicate with the connected hardware.
Creating the CAN Interface is mostly done, but I have troubles to create correct CAN massages.
My issue there is, that I have no idea, how I can create the strings for the CAN Identifier with the specified length.
For example, in the identifier the source address shall be put in with a length of 8 bit, but when I use an Numeric input, convert it to string and check the length of it, the bit length changes depending on the number I enter.
How can I make sure, that the parts of the CAN identifier have always the needed bit length?
I use Labview for not that long, so don't kill me if this is a totally stupid question 🙂
Thanks for you help!
12-03-2020 03:35 AM
Hi Fury,
the CAN-ID (aka ArbID) is a 32bit value for all implementations I have seen so far.
CAN itself either uses just 11bits or 29bits for the ArbID, depending on the choosen ArbID size. With NI CAN modules the upper 3 bits of the 32bit ArbID are used for special purposes, like indicating the ArbID size…
@FuryINsane wrote:
For example, in the identifier the source address shall be put in with a length of 8 bit, but when I use an Numeric input, convert it to string and check the length of it, the bit length changes depending on the number I enter.
Why do you convert numerics to string and back to numerics?
Why don't you use just an U8 control when you need an 8bit value?
Why don't yo set the display mode (aka radix) of that control to "hex" to allow input of hexadecimal numbers?
And why don't you attach your code when you have problems with your code?