From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

ncCreateNotification problem

Hi my application has stopped getting notifications when i upgraded the NiCan from 2.1.2 to 2.3.2. Surprisingly when I give a breakpoint at the line where i call ncCreateNotification my application starts getting notifications. But this also happens sometimes. Can someone please help me out ....I want to solve this issue urgently.
0 Kudos
Message 1 of 5
(3,759 Views)

Hi Ashwini,

Perhaps you can explain a little more in detail what are you doing with ncgetnotification. Which parameter you are waiting for and are you doing this for the Network Interface or for an Object? Did you run the NI Spy ? A Spy Log would be helpful too.

DirkW

0 Kudos
Message 2 of 5
(3,747 Views)
Hi DirkW,
 
I want a notification on the state NC_ST_READ_AVAIL  and i am doing it for an object.
I tried running the Ni-Spy. When I am using version 2.1.2f the Ni-Spy log contains the message Invoking user callback funtion.But this does not happen when I am using version 2.3.2. According to the NiCan 2.3.2 hardware and software manual there is no change in ncCreateNotification function call as compared to 2.1.2f. I really can't figure out where the problem is.
I want my callback function to be invoked when the state NC_ST_READ_AVAIL is set. Can you please help me out.
I have attached the Ni-Spy capture files for version NiCAN 2.3.2 and NiCAN 2.1.2f  for your reference.
 
regards,
Ashwini.

 

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

Hi Ashwini,

Yes it seems we did some changes to the notification error handling with 2.2, which is also included with 2.3 and makes sense by the way.

In your 2.1.2 spy log file you can see the invoke callback is reporting the error flag. (h11)  This means an error occured (hex10 and a frame received (h1) 

Invoking NI-CAN user callback (30875856, 17, 11, 0, 1)
Process ID: 0x00000CBC         Thread ID: 0x00000FA8
Start Time: 13:59:02.113       Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

The new driver stops the callback execution immediately if an error occurs. What makes sense because you can not trust on this error related information.
Perhaps you can change your program in a way to create the notification after Starting the network with ncaction?
 
DirkW
0 Kudos
Message 4 of 5
(3,733 Views)

Hi,

Thanks a lot for your help.IMy problem is solved.

regards,

Ashwini.

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