LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO CAN Module and Bundle to/from U32Array conversion LV FPGA VI

Ciao,
I'm looking for a Bundle to/from U32Array conversion VI, running on LV FPGA with cRIO CAN module.
This conversion has to take place within the FPGA, without leveraging the RT embedded processor
 
I'd also like to suggest implementing such utility directly into the LV FPGA function palette, because it's quite common dealing with message contents (bundle is better!) and communicating frames to an external RT application (array is more effective)
 
Thanks so much
ciao
0 Kudos
Message 1 of 5
(3,152 Views)

LV FPGA does include the Cluster to Array and Array to Cluster functions which allow you to convert between these two data types assuming that all elements of the cluster are of the same data type.

The CAN message cluster does contain elements of different data types (one array and a number of scalars) so it can not be converted directly using the Cluster to Array function.

Using basic data handling functions you can build a subVI to convert from the CAN cluster to an array. I have attached an example of such a VI.

 

 

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 2 of 5
(3,145 Views)

LV FPGA does include the Cluster to Array and Array to Cluster functions which allow you to convert between these two data types assuming that all elements of the cluster are of the same data type.

The CAN message cluster does contain elements of different data types (one array and a number of scalars) so it can not be converted directly using the Cluster to Array function.

Using basic data handling functions you can build a subVI to convert from the CAN cluster to an array. I have attached an example of such a VI.

 

 

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 3 of 5
(3,155 Views)
Thanks so much, Christian
0 Kudos
Message 4 of 5
(3,138 Views)

The CAN Module can return the data from the channel as an array directly. See the following tutorial for description of using arrays or clusters in FPGA with CAN as the example.
http://zone.ni.com/devzone/conceptd.nsf/webmain/2bf2813a4beb80c38625700b007da74a#4
Regards,
Joseph D.

0 Kudos
Message 5 of 5
(3,126 Views)