Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Is is possible to access channels from a CAN database in labview with NI USB 8473s

Solved!
Go to solution

Hello,

 

I would like to know whether is possible to access a CAN database, which is uploaded through MAX, in labview.

 

More specifically, I have uploaded my CAN database in MAX and I want to have access to each specific channel in labview.

i.e according to picture, I would like to have access  to n_Motor_InsRpm channel of E1_L0_1 (motor speed) in Labview, so I can set and transmit a speed value through CAN. Could that be possible with NI USB 8473 s? If yes, is there any simple example in Labview ?

 

Thanks for your Help

Charis

 

 

0 Kudos
Message 1 of 12
(7,346 Views)
Did you search the Example Finder? There are several examples showing how to read a DBC with NI-CAN or XNET. I'm not at a PC right now so I don't know the examples name.
0 Kudos
Message 2 of 12
(7,341 Views)

Thnks for your prompt reply.

 

Yes I searched the example finder but it seems that my hardware support only Frame API.

I tried to run "Channel Monitor" example but when I execute the program I get an error. I suppose the only way is to go with FrameAPI and do my job according to the bits positionof each channel in the frame. Am I correct?

 

 

Regards

Charis

0 Kudos
Message 3 of 12
(7,338 Views)
Solution
Accepted by topic author charis21
There are several ways to get database information without needing hardware. Here is one I did a while ago.

https://decibel.ni.com/content/docs/DOC-39793
0 Kudos
Message 4 of 12
(7,334 Views)

Thnks for that. However, I need the specific hardware (NI USB 8473s) to send the CAN message to the rotor. My question is whether I can do that in a more easy way rather than working with frames.

i.e I want to access the channel speed from my database, set a value to speed and transmit it through CAN hardware device to the rotor. 

0 Kudos
Message 5 of 12
(7,332 Views)
Read my link. It doesn't require any specific hardware. It just creates the frames that you write. Or you can just do it manually for simple databases.
0 Kudos
Message 6 of 12
(7,330 Views)

Thnk you very much regarding your example. It is really helpful.

I have also another one question regarding this example. Is there any way to convert the frame data  and more specifically the payload part of the frame intto 1D array of CAN data (unsigned byte) so to be compatible with my program? 

 

 

Kind regards

Charis

0 Kudos
Message 7 of 12
(7,311 Views)
The payload part of the frame is already a 1D array of U8. Unbundled it from the cluster using the unbundled by name.
0 Kudos
Message 8 of 12
(7,304 Views)

I tried that before but it didn't work. I had to convert it from an array to cluster and then unbundled it. Now it's working! 

Thanks for your help

0 Kudos
Message 9 of 12
(7,302 Views)
Glad you got it working but you are jumping through a few extra hoops. What you want is to use the index array function to pull out indices of the array.
0 Kudos
Message 10 of 12
(7,297 Views)