LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to develop labview script for CAN using CRIO 9045 and NI CAN 9853.

Solved!
Go to solution

i am using can 9853 with CRIO 9045.My can device is connected with external device(testing device).i have to send 17bytes of data from can 9853 to external device.but can standard support only 8bytes of data.so i have divided 17 bytes into 8+8+1.so now i have to send these data bytes with standard can format within 200ms(specified) to external device.how to write the code in labview.which type of programming mode or API i can use.i attached the screenshot of can format i am using.please share the best way to develop labview programming.

0 Kudos
Message 1 of 17
(3,463 Views)

Hi rishijha,

 

AFAIK the NI9853 CAN module has to be programmed in the FPGA of your cRIO: this is the API you get!

 

so now i have to send these data bytes with standard can format within 200ms(specified) to external device.how to write the code

The manual of your "external device" should tell you, which CAN messages you have to send…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 17
(3,447 Views)
Solution
Accepted by topic author Risuraj

Hi rishijha,

 

this is how it may look like in the FPGA VI:

check.png

Sending and receiving messages on CAN0 port of one of the two NI9853 modules I use in my cRIO 9066…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 17
(3,435 Views)

can u share your complete code here??

0 Kudos
Message 4 of 17
(3,429 Views)

Hi rishijha,

 

no, I cannot.

 

But you find example VIs/projects for each cRIO module in the example finder!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 17
(3,427 Views)

i gone through example code.they used fpga I/O Node to transmit data.where we can send 6*U32 byte data.but the frame i am sending that is different from example frame.

what i am sending

SOF(1bit)+Arbitration field(29bits)+Control field(4bits)+Data field(8 Byte)+CRC(15bit)+ACK(2bits)+EOF(7bits)

 

 

0 Kudos
Message 6 of 17
(3,421 Views)
Solution
Accepted by topic author Risuraj

Hi rishijha,

 

the CAN module (and its hardware driver) will handle the low-leven part of creating the full CAN message consisting of SOF…EOF. You only need to supply the ArbID and the data bytes!

 

where we can send 6*U32 byte data

That will be 3 CAN messages, each one containing 2 U32 values…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 17
(3,410 Views)

CAN module (and its hardware driver) will handle

where i will get these details.so remote frame is same what i mentioned previously.

0 Kudos
Message 8 of 17
(3,374 Views)
Solution
Accepted by topic author Risuraj

Hi rishijha,

 

where i will get these details.so remote frame is same what i mentioned previously.

You get all the details in the manual of your external device…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 17
(3,355 Views)

How to set the SRR ,IDE and RTR bit of Arbitraion field.i have only 29 bit(identifer) information of external device.will these three bit is controlled by the h/w(NI 9853) or we have to do by programming.

0 Kudos
Message 10 of 17
(3,342 Views)