Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying application which specifies DAQMx resource

I am trying to create a small application to replace the need to zero an instrument using a multimeter.  I am developing on one machine and trying to deploy to another.  Using MS7.1.  I created a DAQ task using my development system (has 6023E DAQ card).  The resource I am measuring voltage with is:  Me.AIChannels.CreateVoltageChannel("Dev1/ai0:1", "Voltage", AITerminalConfiguration.Differential, -5, 5, AIVoltageUnits.Volts).  When I open DAQMx the device is Dev1 and the channel is ai0 (differential).  I put the :1 based on a message I searched out here and it seems to have no effect one way or the other...

The deployment machine has a different DAQ card (NI though) and under M&A explorer, I can read the voltage in the test panels using "Dev1/ai0."  No problem.  When I run the application on the deployment machine (appear to have used all the right msm files too), the voltage reading is 0 (not even a Double-precision 0, just 0).  I can't find anywhere on this forum where someone is having a similar problem.  I'm guessing I'm doing something wrong which is simple, but I've run out of energy trying to figure it out (and searching this forum)!  Any help would be appreciated.

Thanks,
Tom

0 Kudos
Message 1 of 4
(3,636 Views)
I kinda spaced out and forgot to include the error message when this occurs...  I had the Catch portion commented out while working on another portion of the program...  Here's the error:

System.IO.FileLoadException: A procedure imported by ‘NationalInstruemnts.DAQmx’ could not be loaded.
File name: “NationalInstruments.DAQmx”
    at Zero.voltage_ch1.CreateTask()
    at Zero.voltage_ch1..ctor()
    at Zero.MyWorkerThread.OnStart(Object argument)

===Pre-bind state information ===
LOG: DisplayName = NationalInstruments.DAQmx, Version=7.1.0.388, Culture=neutral,
PublicKeyToken=4544464cdeaab541
(Fully-specified)
LOG: Appbase = C:\Program Files\US NRL\Zero Meter\
LOG: Initial PrivatePath = NULL
Calling assembly : Zero, Version=11.0.2138.27896, Culture=neutral, PublicKeyToken=null.
===

LOG: Publisher policy file not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config
LOG: Post-policy reference: NationalInstruments.DAQmx, Version=7.1.0.388, Culture=neutral,
PublicKeyToken=4544464cdeaab541
LOG: Attempting download of new URL file:///C:/Program Files/US NRL/Zero Meter/NationalInstruments.DAQmx.DLL.


Does this mean that the versions of DAQMx are different on the two computers?  Someone developed a LabView 6 program to collect data for this system.  If I upgraded the DAQMx, would it break an existing LabView program.  My "guests" who let me use this system would be royally pi**ed if I broke the portion of their program that works!
0 Kudos
Message 2 of 4
(3,632 Views)

You are correct, it sounds like you developed your DAQmx app using a version that is different from what is present on the deployment machine. You can use MAX on both the machines to verify this before trying anything else.

You could not use DAQmx with LV 6.0, it requires LV 7.0 or higher, so I doubt your guests would run into problems if you installed the newer version of DAQmx. Traditional DAQ (I'm assuming that is what they are using) can exist side by side with DAQmx. But you cannot access the same HW using the two different drivers at the same time.

I hope this helps

Bilal Durrani
NI
0 Kudos
Message 3 of 4
(3,619 Views)
Bingo!  That did it and it didn't even break the traditional NIDAQ...  I was terrified of making any changes to the machine, but now all is well.  Thanks!!
0 Kudos
Message 4 of 4
(3,606 Views)