Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all 2000 articles
Browse latest View live

Unable to build C# application with NI NetworkVariables in VS2015/Windows 10


Pulse train pause trigger with sample mode is finite

$
0
0

I am pulsing a stepper motor driver with a pulse train from a USB-6351.  I use C#.  My first process homes with sample mode ContinuousSamples until I reach the limit switchs and trigger a pause.  This works OK.

 

Now I need to move to specified positions (FiniteSamples) but I still need to monitor the limits very closely.  I have the issue that pulse generation with Finite samples can not use pause triggers.  Is there any way to get around this restriction so that the pulse train pauses immediately if a limit switch is activated.

 

Out of curiosity why place the "no pause trigger" on pulse genration with finite samples.

 

History capacity for multiple plots

$
0
0

Hello,

 

I have some code modeled after the NI demo: Plotting:2010. This is where you plot multiple traces using a graph control with only one native plot in the plots collection. I want to have a history capacity of 10,000 for each of the plots. I find if I change the history capacity of the (only) plot to 10000, only the first trace ends up with that histoy capacity. All the other traces only show 1000 points of history. What can I do to make all the traces have the longer history capacity?

Here is my sample code:

Dim NAData(3,0)

NAData(0,0) = Testvalue0

NAData(1,0) = Testvalue1

NAData(2,0) = Testvalue2

NAData(3,0) = Testvalue3

sampleWaveformGraph.PlotYAppendMultiple(NAData)

 

If I set the X axis to 10000 only the trace for Testvalue0 is shown past 1000 samples.

 

Thanks,

Bartj

 

 

 

 

 

 

 

where can I find NationalInstruments.Common.Native.dll

$
0
0

Hello!

 

I'm trying to deploy a project that uses NiDaqMx and in order to do that I need NationalInstruments.Common.Native.dll, but when I install NiDaqMx from (http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/sv/pg/1/sn/catnav:du,n8:3478.41.181.5495,ssnav:ndr/) I do not get this dll that I need.

I get:

NationalInstruments.NiLmClientDLL

NationalInstruments.MStudioCLM

NationalInstruments.DAQmx

NationalInstruments.DAQmx.ComponentModel

NationalInstruments.Common

 

So my question is, how do I aquiere the NationalInstruments.Common.Native dll?

 

It says in http://www.ni.com/tutorial/52522/en/#toc3 that it should be included in NationalInstruments.DAQmx..

Cheapest way to apply X-axis values in WPF

$
0
0

Hello,

In my latest project I'm working with double[] arrays where I apply all kinds of filters to an entire array at once using a 3rd party library.  When it's time to plot the data, I don't have the correct X-axis values because I'm not using Point[] arrays (so X-axis is just 0 to N incremented by 1).

What is the "cheapest" way out of this?  I mean, I don't want to loop through the entire array (could be 20-30K long each * 32) and create Point objects out of doubles.  In MATLAB there's a way to simply assign a separate array to X-axis so I was wondering if there's something like this in NI Lib.

Thanks!

3D Graph image shows "Evaluate Copy" in customer's copy of the application

$
0
0

I used the 3D Graph activeX component in my .Net application (C# , Measurement Studio 2012). It works fine and I can save the 3D plot to images. When my customer use this application after installation of the package I developed, it has no problem if the plot shows on screen. However, it shows "Evaluation Copy" on top of the plot when it be saved to disk file. Can any body tell me why and how to get around the problem?

 

Dufei

Execute c# DAQmx software on computer without national instrument setup

$
0
0

Hi,

 

I have started to develop a custom application to drive a NIcDAQ-9171 board. Basically I started from NI examples like the TdmsContAcqVoltageSamples_IntClk one. Everything is OK on my developement computer which has a lot of national instrument stuff.

 

I tried to execute the application on an other computer and it crash before launch.

After installing NIDAQ930f2Core_downloader from http://www.ni.com/download/ni-daqmx-run-time-engine-9.3/2339/en/ behavour is the same and application can not load.

The fail seems to be relative to NationalInstruments.DAQmx.dll. I have also tried to put this dll, found on my computer, in the folder of my application but nothing solved.

 

What additional national instrument software should be install to get it working on any computer ?

 

Thanks,

 

AISupportedMeasurementTypes reporting too many choices

$
0
0

I'm running into an issue where the AISupportedMeasurementTypes function (of NationalInstruments.DaqMX.Device) is returning way more options than seem reasonable.  For example, when I request this from a NI 9239 module, I get 10 options, including Thermocouple, VoltageCustomwithExcitation, and Current.  I do not believe that any of these options are valid.  I see this with some other modules as well, including NI 9218.  I am currently using the library with a version of 15.5.45.109, which I believe is the latest (or it was a month or two ago).

 

Has anyone else seen this behavior, and if so, is there a "workaround"?  I want to limit the user's choices to only valid selections, but this seems to be a major issue!  Any ideas would be very welcome!


AISupportedMeasurementTypes reporting too many choices

$
0
0

I'm running into an issue where the AISupportedMeasurementTypes function (of NationalInstruments.DaqMX.Device) is returning way more options than seem reasonable.  For example, when I request this from a NI 9239 module, I get 10 options, including Thermocouple, VoltageCustomwithExcitation, and Current.  I do not believe that any of these options are valid.  I see this with some other modules as well, including NI 9218.  I am currently using the library with a version of 15.5.45.109, which I believe is the latest (or it was a month or two ago).

 

Has anyone else seen this behavior, and if so, is there a "workaround"?  I want to limit the user's choices to only valid selections, but this seems to be a major issue!  Any ideas would be very welcome!

unable to find module dependency with signature

$
0
0

Dear community members,

I needed to do some upgrade work on an older project and wanna to rebuild the installer project. There I'm getting a warning for missing merge module dependencies. Generally those msm are installed on my Win7 OS under C:\Program Files (x86)\Common Files\Merge Modules but those have a wrong signature. I'm using VS2010Sp1 Prof.

The following merge modules are missing:

 

Microsoft_VC100_CRT_x86.msm (signature AFA96EB4_FA9F_335C_A7CB_36079407553D)

Microsoft_VC100_ATL_x86.msm (signature AFA96EB4_FA9F_335C_A7CB_36079407553D)

 

Pls. could someone point me to the right direction how the retrieve the right merge modules?

 

Thx.

 

Thomas

 

DAQmx examples not installing ...

$
0
0

When installing DAQmx on 64 bit Windows 10, I'm not getting the examples files for any of the versions of C# .NET.

 

All the requisite folders install, but only include icon image files and a .manifest without the actual .exe or code included.  (I've looked through NI's support articles on how to find the example files and tried every suggested path and their shortcut from NI's Launcher; still no actual examples to be found ...)

 

I've tried modifying my install (making sure that the examples are checked to install for each .NET version) and just completely reinstalling DAQmx from scratch, but still no luck.

 

Does anyone have any advice on this?

 

- Thanks

Installing daqmx 15, .net framework options disabled

$
0
0

I am installing daqmx 15.0 on a win7 box and am unable to install the daqmx .net assemblies as the options are visible but disabled.  Checked the same installer against another box, no problems.

 

I checked to see if the frameworks were installed.  The 4.6.1 roll-up was, so I thought the installer might be missing the individual frameworks packaged in it.  I uninstalled 4.6.1 and individually installed frameworks 4.0, 4.5, and 4.5.1.  Rebooted, but the options are still disabled.

 

VS 2013 and MS 15.0 are currently installed on the box.

 

Any insight appreciated,

 

Derek Hopkins

AnnotationChange bTracking parameter

$
0
0

We are making a migration from vb6.0 to C# and we have a event method in CWGraph (National Instruments CW UI 8.0) called AnnotationChange, we have not found the documentation of this method and we have a cuestion about the bTracking parameter. What is the functionality of this parameter and if there are in Measurement Studio VS2012 (C#) some equivalence ?

USB-4065 doesn't recognize by c# application

$
0
0

Hi,

I'am new user. I'm devoloping an application with  two instruments: usb-6509 and usb-4065. 

1) I have no problem with usb-6509. Perfect.

 

2) I have problems with usb-4065. Installation, driver and dll are ok. I work fine by Measurement & Automation Explorer. My application doesn't recognize the AI channel because when I debug this line of my code: 

 string[] channels = DaqSystem.Local.GetPhysicalChannels(PhysicalChannelTypes.AI, PhysicalChannelAccess.External);

returns array[0], and so when I debug:

 myAIChannel = analogInTask.AIChannels.CreateVoltageChannel("Dev2/ai0","",AITerminalConfiguration.Differential,
                                                             0,10,AIVoltageUnits.Volts);

I have an exception.

 

I don't understand. Can you help me?

Thanks in advance

Programatically change Graph Adjuster value on already displayed data C#

$
0
0

Hi,

I have a set of buttons to change Graphs Adjuster value.  It works fine but ONLY for the data that follows later... not the currently displayed data.  Is there a way to apply it to the existing data?

Basically, I have some data displayed and 

Thanks!


NIDCPower: Specified property cannot be set while the task is running. What's the task that's running?

$
0
0

I'm trying to get measurements on a PXIe4139, and I can't set the AperatureTime property.  Here's the exception I get:

Ivi.Driver.IviCDriverException was unhandled
  ErrorCode=0
  HResult=-2146233088
  Message=ModularInstruments.NIDCPower: Specified property cannot be set while the task is running.

Set the property prior to starting the task, or stop the task prior to setting the property.

Property: Aperture Time

 

And the code, in it's entierty...

 

      power = new NIDCPower("PXI5Slot3", false, true);
      power.Outputs["0"].Source.Output.Function = DCPowerSourceOutputFunction.DCVoltage;
      power.Outputs["0"].Source.Voltage.VoltageLevel = voltage;
      power.Outputs["0"].Source.Output.Enabled = true;
      power.Outputs["0"].Measurement.ApertureTime = 0.000001;
      power.Outputs["0"].Measurement.SamplesToAverage = 0;
      while (true)
      {
        var measurement = power.Measurement.Fetch("0", new NationalInstruments.PrecisionTimeSpan(1.0), 1);
        Console.Writeline(measurement.VoltageMeasurements[0]);
        Console.Writeline(measurement.CurrentMeasurements[0]);
      }

What am I missing?

can we add gridline in waveformgraph by setting it's property?

$
0
0

It's a problem  that I can't set waveformgraph gridline.I have searched NI measurement examples,but I am unable to make out how to setting .I wish to get the answer from here.Thank you for your kindness.

usb-6509 task problem

$
0
0

Hi,

I have problem with task. This is my code:

I initialize the task.

try
            {
                for (byte i = minRange; i < maxRange; i++)
                {
                    if (pinInit[i]) {
                        digitalOutputWriteTask[i].Dispose();
                    }
                    using (digitalOutputWriteTask[i] = new Task())
                    {
                        digitalOutputWriteTask[i].DOChannels.CreateChannel(strDevice(i), "", ChannelLineGrouping.OneChannelForEachLine);
                        digitalOutputWriteTask[i].Control(TaskAction.Verify);
                        digitalOutputWriteTask[i].Start();
                        writer[i] = new DigitalSingleChannelWriter(digitalOutputWriteTask[i].Stream); //create writer
                        pinInit[i] = true;
                    }
                }
            }catch (Exception ex){
                Console.Out.WriteLine(ex.Message);
                return false;
            }

I have writeDO method in my class:

public bool writeDO(byte pin, bool state) {
            if (pinInit[pin])
            {
                try
                {
writer[pin].WriteSingleSampleMultiLine(true, arrayToSend(1, state));
                        return true;
                    }
                }
                catch (Exception e)
                {
                    Console.Out.WriteLine(e.Message);
                    return false;
                }

I have Exception "NationalInstruments.DAQmx.DaqException: Task specified is invalid or does not exist.".

What's the problem??

Thanks in advance

 

InstallerBuilder can't find runtime installers

$
0
0

When trying to build an installer for my program, the builder allows including dependent runtime installers. It does display a list of three runtime installers (analysis, common, UI), but it can't find them. Where are these runtime installers located? Are they an optional package or feature that I need to install independent of the base Measurement Studio 2015 installation?

There is something wrong with the waveform display.

$
0
0

QQ截图20170221170002.png

when I run the program, the waveFormGraph appear this kind of circumstance suddenly!I want to ask what problem cause this error!THX

Viewing all 2000 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>