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

How to multithread to start a method that controls an led

$
0
0

I'm working on a search program and would like to have a national instruments led control blinking during the search. The led needs to be started on its own thread while the search runs on a separate thread. This is my first attempt at multi-threading in c# and I'm not sure what to try.

Here is my c# code, I'm trying to start the LED blinking then run the search then stop the LED blinking. The LEDON() and LEDOFF() work if run separately.

Code:
private void btnSearch_Click(object sender, EventArgs e)
        {
            Thread LEDStart = new Thread(LEDON);  //Creates a Thread that will call LEDON()
            LEDStart.Start();
            int i;
            string temp = "*" + textBoxFileName.Text + "*";
            string[] AllFiles = Directory.GetFiles(this.textBoxFolderpath.Text, temp, SearchOption.AllDirectories);
            for (i = 0; i < AllFiles.Length - 1; i++)
            {
                progressBar1.Maximum = AllFiles.Length - 1;
                string[] row = new string[] { Path.GetFileName(AllFiles[i]), AllFiles[i] };
                dataGridView1.Rows.Add(row);
                progressBar1.Increment(1);
                if (progressBar1.Value == progressBar1.Maximum)
                {
                    Thread LEDEND = new Thread(LEDOFF);  //Creates a Thread that will call LEDOFF()
                    LEDEND.Start();               
                }
            }
        }
        //Turn On LED
        private void LEDON()
        {
            if (this.led1.InvokeRequired)
            {
                this.led1.Invoke(new MethodInvoker(() => LEDON()));
                return;
            }

How to plot smith chart in Measurement Studio

$
0
0

Is there a control or graph library that could allow plotting values on a Smith Chart plot? I need to be able to plot simple S11 points into a smitch chart plot.

Necessary DLLS for developing a .net NI DAQ control

$
0
0

I am new for this development when it is about .net DAQ mx control. I am very familiar with MAX and Labview and DAQmx under Labview.

I would like for my .net future application to have all necessary resources (DLLs) in the application folder. There should be a uniques installation of this application, no MAX installation.

I would like to know all the DLLs necessary for this purpose and the sources of them. The DAQ version will be 14.5 and DAQ mx I am going to use will be USB 6351 or 6353.

Please let me know if my plan is fisable and please provide me with all dlls sources for this purpose.

Thank you,

Virginia

 

DAQmx 9.6.1 development support

$
0
0

I am installing DAQmx 9.6.1 on Windows 10.  The development support option shows as not available.  I was able to install development support for VISA and 488 however.  What would I be missing?

 

Regards,

Garth

Wpf graph with visual host

$
0
0

 

We try to create NI WPF graph from another UI thread, as described in this link: Multithreaded UI: HostVisual.

 

But when we added a new data to graph (in the graph's dispatcher), the appliaction crashed with InvalidOperationException: "The calling thread cannot access this object because a different thread owns it".

 

It seems that you are using with application's dispatcher instead of graph's dispatcher in your code. It's right?

 

If yes, is there a way to separate from the main application UI thread to the graph UI thread? 

 

[Our main application is very heavy and the graph suppose to handle a real time data, and when both of them on the same UI thread the UI stack and threfore we want to separate them].

are there virtualbench dlls API for c#????

$
0
0

are there virtualBench Dlls API for c# OR  Visual C++ 6.0???

 

may you 

Pie chart in measurement studio

$
0
0

Is there a way to plot pie chart using measurement studio in .Net?

NI-6363,Multi-channel data acquisition with C#

$
0
0

I used the C#  example of SynchronizeTwoAIContinuous.2013 by NI support。but have an error.Below is the detailed information。

 

Message = "The specified resource is reserved. The operation could not be completed as specified.

Task Name: master

Status Code: -50103"

 

please tell me how to use NI-6363 for Multi-channel data acquisition with C#.

 

thanks for your help.


Error Retrieving Dependency MStudioDAQmx.2010.msm * URGENT

$
0
0

I have a Visual Studio 2012 solution, targeting .NET 4.0 with an InstallShield 2015 setup project. There are two projects in the solution that contain references to :

 

NationalInstruments.DAQmx 15.5.40.109 and

NationalInstruments.Common 15.1.40.49152

 

These are the DLL's contained in the "current" folder for the DAQMX 15.5 download.

 

 

When attempting to build the installer I get two errors from Installshield

 

-4072: Error retrieving dependency Module_Id_Common_2010_32:1033 of c:\program files (x86)\common files\merge modules\MStudioDAQmx.2010.msm

-4072: Error retrieving dependency Module_Id_Common_2010_32:1033 of c:\program files (x86)\common files\merge modules\MStudioDAQmx.2010.msm

 

 

I presume this is one error per project.

 

I urgently need to deploy an updated installation and I'm completely stuck at this point. I have tried adding these prerequisites by explicitly browsing to the MSM file (since there are two or three prerequisites showing all with the same general name and no way to tell them apart) and it hasn't helped. I've searched my entire PC for this MSM file and it only appears in the directory noted in the error message, so it's not any kind of mismatch between different versions in different folders. 

 

I actually didn't WANT to bundle the DAQ installer (we manually install the runtime anyway) but I can't seem to find a way to prevent the system from detecting it and wanting to bundle it.

cross-correlation analysis in measurement studio

$
0
0

Excuse me measurement studio cross-correlation analysis function is which one, is there a routine?

How to check LED average brightness with Measurement studio.

$
0
0

Hello Everybody,

 

I have one test project, I need to check  brightness of the led on the car shifter bezel , The LED has high and low light two mode. So I have the read the value of a square that a little bigger than the LED shape for two modes, then check if each of them is in the limit and the difference is in the limit too.

 

I couldn't find examples in the VDM examples.

 

could you please help me?

 

Thanks in advance!

 

 

Measurement Studio 2015 Missing Assembly Reference for "NumericControlCommands"

CPU Performance

$
0
0

Hi Sir :

 

I use Measurement Studio 2013 and VS 2013 for my project on Win 7 platform.

 

My cpu core of my laptop is intel i5.

 

In my project, I need to draw million points with waveformgraph.

 

It will use a lot of CPU resource(about 30% ~ 40% usage), I try to follow your suggestion likes link below, however it does not improve to much.

 

http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/optimizingnetscatterwaveformgraphswinforms/

 

My ex-colleague wrote the same function using LabView, and it used about 2%~3% CPU resource.

 

I wonder that if the performance of Measurement Studio is worst than Labview.

 

Could you give me some suggestions?

 

Best regards,

 

Marcus

 

 

 

Is Measurement Studio 2012 supporting .NET C++ ?

$
0
0

Is Measurement Studio 2012 still supporting .NET C++? All examples are in CS or VB. I'am using Visual Studio 2010.

Legacy Hardware Support

$
0
0

Hi, we currently use LabVIEW to interact with our NI hardware but we're looking to switch over to Visual Studio. What kind of legacy hardware support can I expect? We have some FP-1000 and FP-1001 modules that we would need to be able to communicate with.

 

NI FP-1000

http://sine.ni.com/nips/cds/view/p/lang/en/nid/2180

 

 

NI FP-1001

http://sine.ni.com/nips/cds/view/p/lang/en/nid/2181

 

This hardware was discontinued about 4 years ago. What are our options? Does measurement studio support older hardware? Thanks!


ScatterGraph Zoom Reset after Plot. Visible property change

$
0
0

Hi,
I'm using the Plot.PlotXY(double[], double[]) function to plot data.The Mode of both XAxis and YAxis is set to AutoScaleExact . Interactive panning/zooming and undo/reset work well.But when I change the Plot.Visible property,the plot data is back to original state.Why not enlarged state?

modulation toolkit modification

$
0
0

i need to build DSSS system with usrp and modulation toolkit but i need to replace the PN sequence in modulation toolkit and replace it by my own new tested spreading code in the dsss system

is it valid ?

Is it possible to change the DAQ device name?

$
0
0

Hi all,

Is it possible to change pragmatically the DAQ device name? 

I would like having at the beginning when I start the DAQ control a name that my .net program assigns it to the DAQ board. Is this possible?

Thank you,

Virginia 

Web server based data acquisition system from scratch..

$
0
0

Hi,

 

We would like to make a new web server based data acquisition system from scratch.

 

Is there any recommended way for selecting the tools and techniques? At the moment we are working with Visual Studio .NET/C# integrated with DAQmx and some Measurement Studio GUI components.

 

The web GUIs should have buttons, graphs, etc.. Is there any advantage to use Measurement Studio? In theory we can think LabVIEW too or forget the both. Just use DAQmx integration in the server side.

 

What do you think? All tips are welcome..

 

Thanks ;-)

 

BR,

Ilkka

Date/Time property for TDMS file?

$
0
0

I want to use the Date/Time property to set the date when the file was created.  How do I use this property??  The TDMS file properties list does not appear to include this property in its list of properties, which I'm still somewhat baffled by since .Author, .Title, .Name, etc. are there.  I have added a custom property to include the date in my TDMS file but this is still not what I ideally want, as doing it this way may be somewhat confusing to the end user when they view the TDMS and the bold fonted Date/Time field is empty.  See attached file.

 

Thank you,

D.

 

 

 

 

Viewing all 1999 articles
Browse latest View live


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