Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in accessing CAN daabase (.dbc) file using GetChannelNamesByID.vi

Solved!
Go to solution

Hello,

 

I am using PCI  CAN/2 series2 card to read data from sensor. In my labview code i m using FrameToChannel conversion API to convert the frame data into actual values using a .dbc file. My software includes data logger and visualization of sensor data. I have to run this software contineously for 30 days and monitor and log the sensor data.

My problem is the GetChannelNamesByID.vi is not working properly. My data logger works fine(i.e. rading and logging sensor data) but the visualization of actual sensor data using FrameToChannel conversion library stops sometimes. My software can not read the channels from the database file. it happens randomly e.g. after 12 hours.  I have to stop the software and run it again so that it works fine.

 

Can anyone give me the reason and solution for this?

Thanks in advance.

0 Kudos
Message 1 of 10
(7,331 Views)

I suggest to use the Frame2Channel Conversion VIs which are shipped with the NI-XNET driver software, as there are much easier to use and have much better performance.

0 Kudos
Message 2 of 10
(7,330 Views)

 

can i use this NI-XNET frame2Channel VI's with PCI CAN Series 2 cards. as far as I know, PCI CAN Series 2 cards works only with NI CAN drivers.

0 Kudos
Message 3 of 10
(7,328 Views)

the conversion VIs do not access the hardware at all but do just the conversion so they will run with NI-CAN as well. of course you would need to install NI-XNET as well as NI-CAN on your machine.

 

refer to the Convert CAN Frames to-from Signals.vi (located under CAN\NI-XNET\Intro to Sessions\Conversion Sessions) in the NI Example Finder installed with NI-XNET which shows the ease of use of the conversion VIs.

 

 

 

0 Kudos
Message 4 of 10
(7,325 Views)

 

 

Ok....I will try the way you explained.......

0 Kudos
Message 5 of 10
(7,319 Views)

Hi Gibson,

 

At the moment I am trying with my old approach i.e. using Frame2Channel library1.0.3. I am getting the following error:

 

Error -8702 occurred at Convert Frame to Channel.vi

Possible reason(s):

A call to the library encountered a null pointer.
Ensure that all inputs to the VI have a valid value.
In the case of arrays, ensure that the array isn't empty.
I have to close the labview and start it again so that my software works fine. what can be the reason?
0 Kudos
Message 6 of 10
(7,315 Views)

My 2 cents.  Don't use the Frame to Channel Conversion Library.  It hasn't been updated in 5 years and likely won't be updated again.  I had problems with it where it wasn't converting correctly, and where it had issues with having the same signal names in different frames.  I is supposed to support it with a dot notation but it some times just doesn't work.  

 

I contacted NI about it and they agreed there was a problem, especially with the frame to channel conversion.  I provided a frame, the DBC, and showed the signal it converted it to was wrong.  Their suggestion was to use the XNet conversion.  After switching to using the XNet conversion (which doesn't need XNet hardware) I would never want to go back.  There is so much more flexibility in the API and it is activly being supported.

0 Kudos
Message 7 of 10
(7,304 Views)

HI Hoovahh,

 

I tried to use the XNET conversion library with NI CAN API's but I have a problem. The data that comes out from the ncReadNetMulti.vi (NI CAN API) is different from the data required by the XNET Convert.vi (Ni XNET APi). When I connect data output of ncReadNetMulti.vi to the data input of XNET Convert.vi  I get error i.e. Type mismatch i.e. two different Cluster elements are connected with each other.

 

Is there any way to convert the data type suitable for XNET Convert.vi ?

 

Thanks in advance

0 Kudos
Message 8 of 10
(7,275 Views)
Solution
Accepted by swap15

should be something like the att. (untested) VI, lert me know if that works

Message 9 of 10
(7,269 Views)

 

hey........I also did in the same you suggested..............anyways...thanks for the reply

0 Kudos
Message 10 of 10
(7,263 Views)