NI Home > Community > NI Discussion Forums

Measurement Studio for .NET Languages

Reply
Member
marqus
Posts: 10
0 Kudos

GenVoltageUpdate .NET Example - error when deployed

Hello,

I am using VS2010 with MAX installed by NIDAQ970f0.exe (no Measurement Studio). I’ve built and executed successfully GenVoltageUpdate.2008 .NET example using an USB6008 on my computer.

If I try to install/execute the application on another computer (with MAX installed by NIDAQ970f0Config.exe) I got an error:

“GenVoltageUpdate.exe has encountered a problem and needs to close. We are sorry for the inconvenience.”

In the error report I have a message: ” … P9: system.io.fileloadexception. …”

I tried on a few other PC (OS w7, WXP) but with no luck.  

Please help me!   

Member
marqus
Posts: 10
0 Kudos

Re: GenVoltageUpdate .NET Example - error when deployed

I’ve got no response so far to my problem but I found a partial solution. To develop my application in C# (similar to GenVoltageUpdate example) I used the drivers from NIDAQ970f0.exe (the full version that contains developer drivers – 1.6GB).  To deploy my application I’ve used the drivers from NIDAQ970f0Config.exe (875MB) or NIDAQf0Core.exe (187MB) - user drivers. These didn’t work with the program compiled using drivers from NIDAQ970f0.exe. I had a hard time looking for/finding a solution. Finally, I got a working deployed application only after I installed on the user computer the drivers from NIDAQ970f0.exe (1.6GB!).

Hopefully somebody from NI will explain why this happen.

Member
Kurt-P
Posts: 136
0 Kudos

Re: GenVoltageUpdate .NET Example - error when deployed

Hi Marqus, 

 

I am glad that the program is up and running now. The program should be working with the NIDAQ970f0Config.exe (875MB) file. When you ran the executable initially did you restart the computer? Some of the required services do not start once the drivers are installed and best way to do that is to restart the computer. Also did you get any warnings when opened up the file in VS2010? That example was made in VS 2008 so it might be worth trying with GenVoltageUpdate.2010.

 

Best Regards,

 

-KP

Kurt P
Applications Engineer
National Instruments
Member
marqus
Posts: 10
0 Kudos

Re: GenVoltageUpdate .NET Example - error when deployed

Hi Kurt,

Thank you for your response.

The program works on my computer where I compile the project; the problem was when I deployed the application on a different computer.

From NI website: “NI-DAQmx 9.7 Core Runtime provides a smaller footprint run-time driver for deploying applications developed using NI-DAQmx 9.7 (Full Version).” . According to this, I installed NIDAQ970f0Core.exe (186.94 MB) on a target computer and tried to use a DAQ-6008 with a C# application. The required drivers weren’t installed and the application hasn’t worked. The solution was to use NIDAQ970f0.exe (1.6GB) and choose at the install time a “Custom” installation (not “Typical”). In the “Custom” installation I had to choose: NI-DAQmx 9.70\Application Development Support\Real-Time Support.   

After installing “Real-Time Support” from NIDAQ970f0.exe I was able to run my application on a deployed computer.

Please, can you can give me a better solution and explain why the “Real-Time Support” is missing from NIDAQ970f0Core.exe and NIDAQ970f0Config.exe?

Thanks,

Marius Raducanu, PhD, PE

Member
Kurt-P
Posts: 136
0 Kudos

Re: GenVoltageUpdate .NET Example - error when deployed

Dr. Raducanu,

 

You should not need Real-Time Support in order to run the a script that calls the DAQ-6008 unless your deployment machine is running a real time operating system. What OS is the deployment machine running? Was there anything else that happened in between the first time you ran the NIDAQ970f0.exe installation as a "Typical" and when you ran it as a "Custom" install? I know the executable asks you to restart the computer which is necessary to have the deployment machine recognize the hardware. Again, the script should work with NIDAQ970f0Config.exe.

 

Thank you,

 

-KP

Kurt P
Applications Engineer
National Instruments
Member
marqus
Posts: 10
0 Kudos

Re: GenVoltageUpdate .NET Example - error when deployed

Hi Kurt,

Thanks for your answer.

I don’t use a RTOS but only after I did a custom install and checking “Real-Time Support”, the deployed application started working. This happened for three laptops where I wanted to deploy my application. I thought “Real-Time Support” is for the drivers required for C#.

I will try to replicate the error on another PC and let you know the results.

Thanks,

Marius Raducanu

Member
marqus
Posts: 10
0 Kudos

Re: GenVoltageUpdate .NET Example - error when deployed

Hi Kurt,

 

In the attachment is the install file for my application.

 

Regards,

Marius Raducanu 

Member
marqus
Posts: 10
0 Kudos

Re: GenVoltageUpdate .NET Example - error when deployed

Hi Kurt,

I have installed NIDAQ970f0Core.exe and my C# application on the forth laptop with the same results: see attachment. The laptop was reseated after installation.

These are the steps I followed to install my application:

  1. Download NIDAQ970f0Core.exe from: http://joule.ni.com/nidu/cds/view/p/id/3812/lang/en . This contains NI drivers for the DAQ.
  2. Install NI DAQ running the file downloaded at step 1 (NIDAQ970f0Core.exe).
  3. Extract the folder “Install RFID Pressure Simulator” from the zip file attached.
  4. Install the program “RFID Pressure Simulator” running the setup.exe file.
  5. Start the program

 

Please let me know if you need more info.

Thanks,

Marius Raducanu

 

Member
Kurt-P
Posts: 136
0 Kudos

Re: GenVoltageUpdate .NET Example - error when deployed

Hey Marius,

 

What about using the configuration with MAX?

 

 http://joule.ni.com/nidu/cds/view/p/id/3813/lang/en

 

I wonder if you are able to recognize the device with MAX when you use that. What about the example? Does that throw the same error when you run it?

 

Regards,

 

-KP

Kurt P
Applications Engineer
National Instruments
Member
marqus
Posts: 10
0 Kudos

Re: GenVoltageUpdate .NET Example - error when deployed

Hi Kurt,

Thanks for your response.

NIDAQ970f0Core.exe doesn’t install MAX so I cannot use it to test the NI device (DAQ-6008).

NIDAQ970f0.exe and NIDAQ970f0Config.exe do install MAX and I was able to read and write to the NI DAQ-6008 using MAX but not with my application. I installed VS on a deployed computer and I was able to find – using the VS debugger - that the error was generated by a (missing/incompatible) NI driver.

I tried to insulate the problem and ran just the example (GenVoltageUpdate - not my application). I got the same error. I am 100% the error is generated by a missing/incompatible NI driver.

The partial solution that worked for me was to re-install NIDAQ970f0.exe using a “Custom” install and check “Real-Time Support”. How you mentioned, “Real-Time Support” is for RTOS but I have no explanation why this worked for me.

Can you install the GenVoltageUpdate (or my application) and NIDAQ970f0Core.exe on a clean PC (with no NI drivers) or a virtual machine (VMware)?

For now, I don’t want to spend more time to find a solution for this problem but for a long term I’d like to have a solution. This will be a factor for me in using or not NI hardware and software in the future.

 

Thanks,

Marius Raducanu