02-25-2014 03:21 AM
Hay,
I try to implement the "CAN Frame Stream Output" example in my project.
The Id type of the frames is appear to be "STD".
I hope It's not to simple question, But how can I change it to EXT (29-bit id)?
Regard,
Aviad
Solved! Go to Solution.
02-25-2014 03:28 AM
you just need to set the Extended? Flag to TRUE
let me know if that doesnt help
02-25-2014 03:54 AM
Wow! It was Fast!
If u mean to change:
nxFrameVar_t * l_MyFramePtr; l_MyFramePtr=(nxFrameVar_t*)l_MyBuffer; l_MyFramePtr->Timestamp=0; l_MyFramePtr->Flags=0;
To:
l_MyFramePtr->Flags= TRUE;
It's do not work.
Anyway - I find a "manually" solution (And maybe this the straightforward way to do it?):
I manually add the 29Bit to the Identifier. For example:
u32 l_ext_id_bit = 0x1; l_ext_id_bit = l_ext_id_bit << 29; u32 l_id = 0xA; l_id =| ext_id_bit; . . . l_MyFramePtr->Identifier= l_id;
Thank u very much for the replay.
(If there is another way to do it, I be glad to know about)
Aviad
02-25-2014 04:10 AM
ok for the C API you are correct. I was under the wrong assumption you are using LabVIEW
As the NI-XNET manual states in Table 5-3: you need to modify the frame identifier.
....When Type specifies a CAN frame, bit 29 (hex 20000000)
indicates the CAN identifier format: set for extended, clear for
standard. If bit 29 is clear, the lower 11 bits (0–10) contain the
CAN frame identifier. If bit 29 is set, the lower 29 bits (0–28)
contain the CAN frame identifier.