Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Flexray Frame Open issues

Hello, I am having an issue with opening Database Frames in my Flexray application.  If I open labview fresh and execute the Database open and select frame for the polymorphic It will execute fine.  But when I stop the application and then try and restart it, if give an error saying I am passing a bad reference to a property node I am using.  I have tried to find a error explanation on the forum but can not.

0 Kudos
Message 1 of 14
(7,521 Views)

which LaVIEW version are you using?

 

if it is LabVIEW 8.5 or 8.6 please check how you access database objects.

 

In LabvIEW 8.5 and 8.6, you first must open the file and all particular objects you want to access using XNET Database Open.vi

IN addition you need to close all previously opened Database objects at the end of your program.

Call XNET Database Close before the top-level VI terminates. Either call it for each database object opened, or for only one open object with the close all? parameter set to true (default).

 

Refer to the XNET manual for further programming references

0 Kudos
Message 2 of 14
(7,520 Views)

I am using 8.5.  I do think I have that particular problem worked out, but now I have another issue.  I have to modify some frame properties to set it up for XCP.  So I open the Frame from the database and modify the property of timing type to event instead of cyclic as well as some others.  This seems to work for me.  However after I have closed the Frames with the close database object VI and then try to reopen the Frame to change the properties again I get an error -1074384561 which states that the Database object is locked because it is used in a session.  Solution: Configure the database before using it in a session.  I have closed the sessions previously before I have closed the database objects etc.  Any Ideas? 

 

 

0 Kudos
Message 3 of 14
(7,505 Views)

is there a chance that you post your vi?

or send it to canpse@ni.com that we can analyze your issue

0 Kudos
Message 4 of 14
(7,502 Views)

Here it is.  The Flexray XCP Daq engine, is the upper most VI.

0 Kudos
Message 5 of 14
(7,488 Views)

I had a brief look on your VI. It looks like you only called StopSession and didn't called ClearSession.

The database properties cannot be changed between CreateSession and ClearSession. Start and Stop doesn't affect this.

The reason is that the database properties are evaluated in CreateSession. Setting them later would not affect the session. Therefore we locked them so you don't assume that changing them will affect the session.

0 Kudos
Message 6 of 14
(7,484 Views)

I changed the code to clear the sessions after they are stopped.  That may have fixed the database locked error, however when I try to re-execute the start test sequence I get an error stating a bad reference has been passed to a database function, a session reference, or frame reference to retrieve properties from a signal.  This is happening when I try to get clusters from the database. I will attach the revised code. 

0 Kudos
Message 7 of 14
(7,459 Views)

Do all database objects need to be closed before starting sessions?  Right now I am leaving all signals,frames,clusters, and databases open that I am using in my application.  I leave these open because I was afraid if I closed them before I started my sessions the frame properties I have to change from the original database file will not be executed.  Am I wrong in this assumption?

0 Kudos
Message 8 of 14
(7,453 Views)

Unfortunatly I cannot reproduce the problem. Maybe it requires the original database to reproduce it. Could you use probes and check the error in, error out and the reference input of the property node causing the problem and post it?

0 Kudos
Message 9 of 14
(7,446 Views)

It is OK to leave the database objects open or closed during the session, you should just close them once before the VI terminates. A database object must only be open to read or write the properties. Beginning with LabVIEW 2009, you don't even need to open and close database objects, this is done by LabVIEW internally, but it is still allowed, so your VI remains after upgrade compatible.

0 Kudos
Message 10 of 14
(7,444 Views)