Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET memory database Frame parameters update after nxCreateSession

Hi all,

 

My LabWindows/CVI application is designed to connect a different kind of ECU's (only one at the same time) selecting it from the user interface.

It's working perfectly with NI_CAN, but when updating to XNET in order to support CAN_FD I'm facing an issue.

 

When the application starts, I open the :memory: database and I create an empty Cluster.

When user select the desired ECU two frames are created with corresponding ID's (Diagnostics TX and RX communication), and one session for each one is open.

 

The problem happens when user wants to change the ECU and I need to update the Frames information. I overwrite previously created Frames with current selected ECU without errors, but when I try to open again the session for each one I face this error:

(Hex 0xBFF6309A) The interface has already been opened with different cluster settings than the ones specified for this session.

 

Prior to overwrite the frame I'm closing of course the session using nxClear (even I tried nxStop, nxFlush, nxSystemClose alone or all together. But always same result.

I cannot find a way to completely delete created session.

 

As a work around I tried to delete the cluster using nxdbDeleteObject, but even closing sessions with all previous mentioned methods I always receive the error:

(Hex 0xBFF6314F) Database object is locked because it is used in a session.

 

I search in the documentation about even how to erase memory database ir order to restart again from the beginning but I could not find a way.

 

How can I stop/delete these sessions completely or any other way that allow me to update the frame and restart the Session with new parameters?

 

Thanks in advanced.

Pedro.-

 

0 Kudos
Message 1 of 3
(2,238 Views)

I replay myself...

I close one of the sessions with an incorrect handle... so this one was keep open the interface, etc... 😞

0 Kudos
Message 2 of 3
(2,162 Views)

Hi PedroRS, did you get this working?

0 Kudos
Message 3 of 3
(2,103 Views)