annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

Can not programmaticly access network-shared variables

Hello,

 

I try to access a network-shared Varialble on the RT system, but I get Error -1950678943. If I execute the code from LabVIEW, everything is fine. The problem occurs when I use a RT startup application, but only in case, if no network cable is connected. The connection to a network is enough to eliminate the problem, but the system should stand alone.Has anyone experience with such a failure?

0 Compliments
Message 1 sur 4
1 992 Visites

Are you accessing the shared variables within the RT target or from the host PC?

Where are the shared variables hosted? RT target or the host PC? 

Can you show a screenshot on the LabVIEW project?

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Compliments
Message 2 sur 4
1 964 Visites

In addition to what ZYOng posted, you might also want to look out how you're addressing the shared variables (assuming you're trying to access shared variables from the machine that's hosting them).

 

I remember there being some differences opening a local cRIO FPGA connection depending on whether we went directly through the item or had localhost/IP/hostname so maybe shared variables are similar in this regard.

Matt J | National Instruments | CLA
0 Compliments
Message 3 sur 4
1 957 Visites

Thanks for your answers.

 

The variable are hosted at the RT target and I also want to access them from the RT target.

 

Today, I found the solution. It seems that the RT target do not use the same hostname with and without a network connection.

The solution was to add

   127.0.0.1 <desired_hostname>

to the file /etc/hosts at the RT target.

After a reboot everything seems to be fine.

 

Thanks again.

 

Message 4 sur 4
1 905 Visites