Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CANopen nodes

Hi
 
What data Types CANopen protocol support. How to convert Array of U8 into I8, I16, I24, I32, I64.
 
Regards
J
0 Kudos
Message 1 of 6
(7,057 Views)
 Hello J,

The CANOpen library only supports the U8-array data type.  I have attached a VI which demonstrates how to extract data from that array using the "Index Array" VI from the Array functions palette.   I have also demonstrated how to convert this data type into other data types using the conversion vis located in the Numeric -> Conversion functions palette.

Let me know if this answers your question.  Have a great day.
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 6
(7,047 Views)

Hi Proulx

Thanks for your kind response.

I am not able to open the .vi since i am using labview 8.2.

I also wants to converts Array of U8 data type into Integer 24, Unsigned 24, Octet String & Unicode String Because in the end After reading data from various Index & sub index , i have to display all the data in the Multicolumn Listbox. So i have to convert all the data types (Array of U8 data ) supported by CANopen into string.

 

Regards

J

0 Kudos
Message 3 of 6
(7,044 Views)
Hello J,

I've re-attached the VI saved in version 8.2.   I added a conversion that uses the "Number to decimal string.vi" which should help.  This vi can be found in the "String -> conversion" palette.  As for the other data types you need, you can look into the "numeric -> conversion" palette.  You may need to use a boolean array to create your own 24 bit number, since LabVIEW does not natively support this datatype.
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 4 of 6
(7,039 Views)
Hi,
 
The CANopen Library itself brings two polymorphic VIs to convert in both directions. (CANopen Convert to Data, CANopen Fetch from Data).
 
DirkW
0 Kudos
Message 5 of 6
(7,030 Views)
Hi
 
Thanks for the reply. I am not using the CANopen Library functions. I am only using Frame API available with labview 8.2.1.
 
Regards
J
0 Kudos
Message 6 of 6
(7,028 Views)