Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

X-NET

HELLO

 

first : sorry for my poor english.

 

I'm using X-NET VI for dialog Can and Can-open between PXI-8513 and our equipement (we want to check it). 

(X-NET read.vi or X-NET write.vi)

 

for multiple reasons (wiring problem, bad impedance, power switch on/off, buffer oversize.....etc...), it's happend the communication is stopped and didn't restart properly .

 

 

 

So i'm using  vi    :   "XNET CLEAR.vi" witch allows "reboot" the session

x-net concerned

 

If in some case this solution allows to recovered the communication ,in other case the following error appears : 

 

NET Read (Frame CAN).vi:2
-1074384749


L'erreur -1074384749 s'est produite à : XNET Write (Frame CAN).vi:6

Raisons possibles :

NI-XNET:  (Hex 0xBFF63093) Vous avez utilisé le même nom de session XNET dans différents VI de niveau principal, mais ce n'est pas supporté. Solution : utilisez chaque session dans un seul VI de niveau principal (application) à la fois.

 

 

traduction : i'm using the same session name in different VI and it's not supported.

 

 

 

after many research, i haven't solutions

 

i join a light vi for example of the strucure i'm using

 

thanks

0 Kudos
Message 1 of 5
(8,159 Views)

Hello,

 

You said that it doesn't behave the same each time you use the XNET Clear. What are the differences between the cases it works and those it doesn't?

 

In you example, you don't use XNET Clear, in wich conditions di you use it? Is your VI still running and you launch another VI with XNET Clear? Is everything closed properly before you run this VI?

 

The error message seems to say that a session is still existing whereas you try to create another one. Wich session do you use in the XNET Clear VI?

 

Regards,

Olivier L. | Certified LabVIEW Developer


0 Kudos
Message 2 of 5
(8,145 Views)

Hello

 

I make some new tests, i change a few the structure of my VI, the error I spook doesn't come again for the moment.

But when i lost the "dialog" beetween the 8513 card and my system , i try 2 solutions (see attached files)

- x-net clear.vi and x-net start.vi

-x-net flush.vi

 

but nothing restore the dialog.

 

nothing exit from x-net read.vi (however there is frame Can on the bus), the only one solution is to close the project or the .exe.

 

but when the problems appers after 2 hours testing, we lost 2 hours of work.

 

i think the solution is to "reboot"  the cards or the x-net session but i don't know how ??

 

 

Thanks

 

 

0 Kudos
Message 3 of 5
(8,067 Views)

Salut bibi42,

 

First off, your first VI (Sand Titre 2) seems like the better approach.  You should not need to use XNET Clear of XNET Flush for your application.  You typically use the XNET Clear VI when you need to clear the existing session to create a new session that uses the same objects.  Since you are creating the session in your project, you do not need to use clear.  The session will be cleared automcatically when the VI goes idle.  You typically use XNET Flush VI to discard all values in the session's queues.

 

In your case, it looks like you want to stop and start the session.  You can use XNET stop, and then use XNET start to restart communication.  You could always use XNET flush after the stop to really clear the queue, but that might not be necessary.

 

Lets try the stop-start that and let me know the results. 

 

(Another suggestion...since you have a case structure that choses which IDs you want to look at, you could always use the NI-XNET database editor to create a database with those IDs.  You can then use a single point signal session to read a signal value.  That is just a suggestion to make your code easier.  Feel free to ignore for now.)

O. Proulx
National Instruments
www.ni.com/support
Message 4 of 5
(8,062 Views)

Hello,

 

 Thanks for your answer.

 

I try it, i have not many free time in thez process to testing new solutions.

 

It seems it works better (the solution with the stop & start session), i'm not sure it resolve all problems but it's a good way.

 

when i could investigate more i'll say you results.

 

thx

 

 

0 Kudos
Message 5 of 5
(7,964 Views)