From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-11-2014 05:01 AM
Hello,
I want write multiframe data to the sensor and then read the sensor response. I am able to do the coding and the problem is code works sometimes and gives timeout error suddenly. I am not able troubleshoot this behavior of my code. The same code works fine sometimes and next time it gives timeout error in ncWaitForState.vi after the ncwriteobj.vi.
please see the attached snapshot of my code (it's not possible for me to attach the vi)
Any help would be appreciated.
regards,
swap
08-13-2014 03:42 AM
Hi Swap,
what kind of VI´s are these blue VI´s?
I found a Knowledge Base regarding this issue. Maybe it helps.
http://digital.ni.com/public.nsf/allkb/3C89E2ED19D3C8368625714E0059258A
Regards,
Nina
08-13-2014 10:18 AM
Hi Nina,
The blue VI's are NI-CAN VI's used to communicate with PCI CAN/2 Card.
regards,
swap
08-18-2014 09:16 AM
If your hardware was made in the last 5 year I highly recommend using the XNet drivers over the series 2 CAN drivers known as NI-CAN. There is tons more flexibility in controlling the ways data is read and wrote. Also posting a VI or snippet is better than a picture. I can't open a picture in LabVIEW.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-20-2014 05:52 AM
Hi,
The card is very old. Its PCI CAN series 2 card. I can't use XNET drivers with this card.
Not possible to upload vi because its part of a very big software and I am not allowed to that. 😞
regards
Swap
08-20-2014 06:29 AM
if your error appears at ncWaitForState.vi / Write Success after the ncwriteobj.vi there could be the only possibility that your timeout of 50ms is not sufficient. On a high busloaded network (which baudrate do you use?) you may not be able to get the frame onto the network in time. Have you tried out to increase the timeout value? (what average busload do you see on the network? run the BusMonitor from MAX; which shows the detected busload in %)
from your first subvi I see that you may do kind of diagnostic protocol like UDS? If so, you may consider to use the Automotive Diagnostic Command Set
http://sine.ni.com/nips/cds/view/p/lang/en/nid/203554
which implents UDS and KWP2000 for NI-CAN and NI-XNET. NI-CAN should be ok to run any protocol like UDS/ISO TP.
08-20-2014 06:37 AM
Hi,
I tried with higher Timeout values but I have the same problem. I am using 250 Kbaud. The average bus load is around 22%.
Yes, I am using UDS over CAN for the diagnostics purposes. I have the Automotive Diagnostics Command Set but the problem is it supports
only LV version 10 and above. And the LV software is developed in LV 7.1, so I can't use it.
08-20-2014 06:42 AM
CAN cable is terminated sufficiently?
08-20-2014 06:48 AM
Yes, it is terminated properly. 😞
08-20-2014 07:00 AM
so you increased the write timeout to something = 1000ms? and the frame would never be transmitted?
how big is your transmit queue of the transmit object? is the queue empty before you call the write frame?
The state "Write Success" is set when the last frame in the write queue is transmitted successfully,