Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Read network variables on demand does not work in measurement studio 2013

I have a very big issue using Measurement Studio 2013 and Network Variables. Let me give you the setup first.

 

One of our products includes a cRIO/sbRIO that uses published network variables that can be read/written to to change settings or gather data. They're simple string/int32/doubles for the most part. We also use a frontend built in .NET 4 using Visual Studio 2010 with a few references to National Instruments DLL's, including the network variable assembly.

 

Just a few days ago, I uninstalled all my NI software and reinstalled from the 2013 DS2 disk in order to get LabView up to 2013. What a mistake that was. After updating all the references in the VS2010 project and setup project, rebuilding the setup and deploying it on to a product PC (which does not have NI software installed), I now suddenly cannot read or write to any network variables on the cRIO. The error I continuously get (after modifying some code to spit the error out) is:

 

"The network variable process was not found or is not responding"

 

I have not changed any of the backend code, which is pretty much made up of the following:

 

public cNetworkVariableString(string name, string location, double timeOut)
        {
            _timeOut = TimeSpan.FromSeconds(timeOut);
            _location = location;
            _name = name;
            try
            {
                
                _reader = new NetworkVariableReader<string>(_location);
                _writer = new NetworkVariableWriter<string>(_location);
                _writer.Connect(_timeOut);
                _reader.Disconnect();
                _writer.Disconnect();
                

                
                _error = false;
            }
            catch (Exception ex)
            {
                _error = true;
                _errorMessage = ex.Message;

            }



}

 

 

Anyone have any idea what could be the problem? FWIW, I kind of took over the role of programmer in the past year, so a lot of this is new to me and I'm hoping I'm simply overlooking something simple.

 

Thanks,

 

Mike

0 Kudos
Message 1 of 6
(6,046 Views)

As an addendum, when I compile and run it on my dev machine (which has MS2013 and all other NI 2013 sofware installed), it works perfectly and is able to read the network variables. I'm at a loss for an answer, but I think it has something to do with the networkvariable.dll assembly.

0 Kudos
Message 2 of 6
(6,033 Views)

Update.

 

Today I completely uninstalled all National Instruments software and rolled it back to the 2012 DS2 release. After updating all references and the licenses in the project, recompiling and installing back on my test machine, now the network variables are working again. Something must have happened in the NetworkVariable assembly between the version that works (12.0.40.318) and the 2013 version that does not (13.0.40?.190).

0 Kudos
Message 3 of 6
(6,010 Views)

Hi SRTie4k,

 

When you installed the newer software could you check the installed software and let me know if you have the latest version of the Network Variable Engine installed? Which model of cRIO/sbRIO are you working with?

 

It also could be an issue with firewall (which is less likely since it works in the previous version), but still worth verifying.

 

The link below has information on what port need to be open for the communication.

http://www.ni.com/white-paper/12402/en/#toc3

Evan See
National Instruments
0 Kudos
Message 4 of 6
(5,993 Views)

Evan,

 

We are working with the cRIO 9075 and the sbRIO 9636. Firewall was disabled to see if that was the culprit, and it was not.

 

As for the Network Variable Engine, are you talking about the software installed on the cRIO/sbRIO? I'm pretty sure we are running the NVE that comes from the 2013 DS2 disk, as that is the version on our development laptop that we use to flash the RIO's. I'll get an exact version and post back, however.

 

*EDIT* Keep in mind that I when I tried connecting to the cRIO/sbRIO with the software packaged installed on a client machine it did not work, however when I tried connecting with the software installed on my dev machine (which has all NI 2013 software installed) it did connect. So I don't believe the NVE version on the cRIO/sbRIO is the problem...

0 Kudos
Message 5 of 6
(5,991 Views)

Interestingly enough, I just updated all my NI software back to 2013 DS2 without updating Measurement Studio 2012, and it has again stopped working. The only assemblies updated within the project were NationalInstruments.Common, DAQmx, and NI4882. NationalInstruments.NetworkVariable is still at version 12.0.40.318. Maybe the issue actually lies with the new NationalInstruments.Common assembly?

0 Kudos
Message 6 of 6
(5,989 Views)