LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-CAN

Solved!
Go to solution

Hello all,

 

 I'm using the frame API on the NI-CAN 8473 hardware, I dont have a problem to analyze the data.  However i have a small problem, i need to add a control that will help specifying the number of samples to retrieve.  for example i need to read 100 CAN frames and stop. thank you.

 

 

Best Regards,

Hassan Badawi

0 Kudos
Message 1 of 7
(3,698 Views)
Solution
Accepted by hassan.bdw

Hi Hassan,

 

some pseudocode:

repeat
  get CAN frame data
until number of CAN frames >= 100

Looks quite easy!

 

If you need more/specific help you should attach your VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(3,683 Views)

Hello GerdW,

 

do you mean to do something like the VI i've attached?.

Thank you.

 

Best Regards,

Hassan Badawi

0 Kudos
Message 3 of 7
(3,673 Views)

Hi Hassan,

 

something like your VI.

 

I would actually collect the data in a (2D) array - right now you only get the last frame data when your VI finishes!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(3,665 Views)
Posting from mobile so I haven't opened your VI. You should use ncReadNetMult to read multiple frames, instead of putting a single frame read in a loop.
0 Kudos
Message 5 of 7
(3,628 Views)

Hello all,

 

Is it possible to send multiple messages having different arbitration ID periodically (messages may have different periods) through single CAN

interface

 

 

0 Kudos
Message 6 of 7
(3,348 Views)
0 Kudos
Message 7 of 7
(3,336 Views)