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

Cursor position change after reset the data

$
0
0

I have 2 graphs with a cursors on each of them.

In addition, there is a button that changes the location of the markers (the same location for both markers) - "Init Cursors", and a button that reproduces the data - "Generate Data".

 

I have a problem with the following scenario:

 

Press the "Init Cursors" button - and then press the "Generate Data" button several times at one time the X values in the cursors are not equal even though both have the saCapture.PNGme X values. 

 

I have come to the conclusion that changing the data causes a re-search of a point on the new plot for the cursor. And the search is not done by SearchDimensions.Horizontal.

Therefore, even when X values do not change but only Y values, the search can give a different point from the point that existed before.

 

Is it possible to determine that the search will always be done by SearchDimensions.Horizontal or to cancel the search that is being done in UI change?

 

[The project is attached].

 


Hardware failure with buffer generation

$
0
0

Hello,

 

I am using a client-server based tool to control the NI cards and having an external clock (Opal Kelly XEM3001) which is attached to a PXIe 6363 card, and I am getting the following error when trying to generate a simple sinusodial signal:

 

 Failed buffer generation due to exception: A hardware failure has occurred. The operation could not be completed as specified.

Task Name: Dev6 output task

Status Code: -50152
   at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.CheckWithName(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* , tCaseInsensitiveBasicString<wchar_t\,_STL::char_traits<wchar_t>\,_STL::allocator<wchar_t>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* pName)
   at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.Check(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* )
   at nNIMSSAIL100.StatusObserverWrapperT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.Check(StatusObserverWrapperT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* )
   at nNIMSSAIL100.Write<class nNIMSSAIL100::ApiTraits<class nNIMSSAIL100::DotNetApi>,class nNIMSSAIL100::AnalogWrite,double>(tTask* , Double* , UInt64 , UInt64 , UInt64 , Double , Boolean , Boolean , tScaledDataFormat , StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* )
   at nNINETAI2005100.Write2D<class nNIMSSAIL100::ApiTraits<class nNIMSSAIL100::DotNetApi>,class nNIMSSAIL100::AnalogWrite,double,double,cli::array< ?? ::N ,2>^>(Task task, Double[,] buffer, UInt32 numChannels, UInt32 numSamples, UInt32 lines, Double timeout, Boolean autoStart, Boolean interleaved)
   at NationalInstruments.DAQmx.Internal.AnalogMultiChannelWriterImpl.WriteMultiSample(Boolean autoStart, Double[,] data)
   at AtticusServer.DaqMxTaskGenerator.createDaqMxTask(String deviceName, DeviceSettings deviceSettings, SequenceData sequence, SettingsData settings, Dictionary`2 usedDigitalChannels, Dictionary`2 usedAnalogChannels, ServerSettings serverSettings, Int64& expectedSamplesGenerated) in D:\Cicero\Cicero-Word-Generator-master\AtticusServer\ServerRuntime\DaqMxTaskGenerator.cs:line 724

Does anybody have an idea of what might be the cause of this problem?

 

 

NIDCPower C#: How to flush the measurement buffer before fetching measurements?

$
0
0
I'm running into a problem where NIDCPower.Measurement.Fetch is returning stale data. How can I flush the measurement buffer?

Does Measurement studio support the PCIe-7841

$
0
0

Hello, everyone.

I am going to use the PCIe-7841 in a project, and I already had a Labview program to drive this card. Currently, we plan to develop a .Net C# application to build a same applciation like the one in Labview. However, PCIe-7841 should have R series multifunction ROI device driver, but I cannot find this class library in the measurement studio. Before, we once used the NI-DAQmx, which is quite easy to be referenced in any C# program. Anyone could help us, plz, we are really clueless.

Looking for ideas!

$
0
0

Hello,

 

On our manufacturing floor we have many consoles that contain Keithley Switch/DMM's. We use three different models of these instruments the 2700, 2750, and 3706A. The 2700 can contain up to three plugin switch modules, the 2750 can contain up to five plugin moduels, the 3706A can contain up to six plugin modules. 

 

Keithley provides a means to access the switch closure counts for each switch on each plugin module. This helps with preventive maintenance we can see if a card or relay is coming near its life expectancy. Currently we have two utilities one for the 2700/50 and one for the 3706A. Our technicians periodically go out and check each console that contain one of these instruments and notes the highest count returned for each plugin module in that switch mainframe.

 

I am looking to reduce the effort that is currently necessary to perform this activity on our floor. 

 

I would like to create an application that would reside on the PC in each of these consoles. This application would periodically query the switch mainfraim for the switch counts for each plugin module in that mainframe. This application would then report the max count from each module up to a server application that would package the information from all of the reporting consoles into a format that would allow the person looking at the data to easily discern which module in which console might be getting near it's end of life. The server application may also be able to send out an email to specified personel when a module max count crosses a defined threshold.

 

Any ideas are appreciated. If you have already created a system like this even more so.

 

Thank you in advance and have a great day! 

How to configure the Range property of IntensityGraph in WPF?

$
0
0

I am trying to configure the Range property of ColorScale in XAML for the IntensityGraph.

Is there any way I can do that? I am not seeing any Range property for ColorScale. Below is the sample XAML code which i have written. I am looking for a property where I can set the Range="0,65355" similar to what we have for the Intensity Graph  <ni:AxisInt32 Range="0,2047" Label="Horizontal Axis" Orientation="Vertical">

 

<ni:IntensityGraph.ColorScale>
<ni:ColorScale >
<ni:ColorScaleMarker Color="#FFFF8000" Value="255"/>
<ni:ColorScaleMarker Color="#FFFF8000" Value="128"/>
<ni:ColorScaleMarker Color="#FFFF8000" Value="0"/>
</ni:ColorScale>
</ni:IntensityGraph.ColorScale>

How do I add Items to a Legend in WPF

$
0
0

I have added a Grpah with three plots. Added a Legend and wanted to have 3 plots of the graph as the Items to my Legend. Is there any way I can add the Legend items at design time?

 

<ni:Graph>

<ni:Graph.Plots>

<ni.Plot x:name="x1"/>

<ni.Plot x:name="x2"/>

<ni.Plot x:name="x3"/>

</ni.Graph.Plots>

</ni:Graph>

<ni:Legend items{???} />

 

Seems Items is read only collection....

cwShapeMinMaxRegion .Net Equivalent

$
0
0

Is there an equivalence of the shape type in vb6 named cwShapeMinMaxRegion ?


DAQ 9205 does not reconnect after reboot

$
0
0

Using cDAQ-9184 with 9205 module

Set DAQ IP address to 192.168.1.20 and PC NIC to 192.168.1.11

 

REPRO STEPS

* Find 9205 via NI-MAX and set alias to DAQ1_Slot1

* Connect to it via C# code successfully and log data samples

* Reboot the PC leaving the 9184 and 9205 powered up

* Re run the same exact C# code

 

EXPECTED

* C# code connects to the device successfully as before

* Device shows up as connected in NI MAX

 

ACTUAL

* C# code fails to connect

* Device shows up as dis-connected in NI MAX

 

RECOVERY

* Manually remove and then re-add the device using NI-MAX

* Now the code works

 

PROBLEM

This is an unacceptable situation. The PC is a headless device that needs to be able to recover in the case of power failure or other reboot cause.

 

What is causing this problem and is there a way to reconnect programmatically? Either in my C# code or some other automated tool?

Movable legend in WPF

$
0
0

Hi all,

I would like to have the legend(s) of my graph(s) movable in a WPF project, in form of clicking and dragging it around on top of the graph control. From this topic, there is an example for WinForms, which does not work with WPF. What would be the 'best practice' to implement this? In my project, I have a several graph controls and their according legends placed together in one grid cell. I found some topics of dragging UIElements with the help of the Thumb class, but this works only with Canvas and I could not get any good solution with that. I would appreciate any help.

Thanks

Reprocessing Point in Graph after Range Change

$
0
0

Hi,

 

I am plotting Point A on a graph by passing it in to the data source. Then I change Point A to Point B by replacing that data item in the graph with the new point. The vertical axis adjuster is set to fit loosely, so the range adjusts, then I swap out Point B for Point A. In my renderer, the first time Point A is being plotted, it shows up in the RenderGraphCore function as a percentage of the display window .3. Then, the second time I try passing in Point A, after the axis has adjusted, the percentage in RenderGraphCore is still .3. Does anyone know why the second processing of the point isn't taking into account the range change? 

 

Thanks,

Kelly

NI Connection network variable connection issue

$
0
0

Hi All,

I have c# application that connect to NI CFP device. Everything is exposed through Network variables under c# application. We are getting same error that happens randomly. Attached is the screenshoot below. At the first glance I thought we are loosing the network connection. But The network strength is high and doesn't seem to drop low. I would like to know, if there is any other point we are not considering. and how it cause that issue. And in the case it is network issue, what it is really causing the error?  

NIerror.jpg

Please, we would appreciate your help.

Thank you

Migrating NI Controls from WinForms to WPF

$
0
0

HI,

 

I have a existing Winforms applications and many of the NI controls such as Scatter Graphs, WaveForm Graphs, Intensity Graphs etc have been utilized to build a engineering application. Currently I am working on the same project but I am tasked to rewrite the above project in WPF. 

I am not able to quite identify or match the properties of various NI graphs/controls that have been used in Winforms to that of WPF.

 

for eg: Caption property of Scatter Graph, I cannot find a similar property when I am using the equivalent Graph in WPF. Do we have any kind of documentation which helps me to understand or identify the equivalent properties of the graphs/controls from Winforms to that of WPF?

 

Error reporting and NiErServer.exe

$
0
0

Can anyone provide some insights into error reporting via NiErServer.exe?  I see this server is running in the background but I don’t know how to use it.

 

According to the documentation if an error does occur in my NI software a dialog pops up with an error report. Anyone tell me how I can access the error reports manually? Are they stored somewhere?

 

Second, my customer appears to have 2 NiErServer.exe running at the same time -

 

NiErServer.exe

NiErServer.exe *32

 

How is this possible and is this a problem?

 

Thanks

Damian

 

 

Task name conflicts with an existing task name.

$
0
0

When I am testing my code the temperature displays correctly and everything works as I expected. Then, after testing when I go back into code, specifically XAML, I get an error from my Thermocouple class saying that a task name conflicts with an existing task name. I can close the error and go about my business as usual. But it bothers me because I finalize that class when the program closes and call the Dispose method on the task.

 

        ~Thermocouple()
        {
            if(tempReader!=null)
                tempReader = null;
            if(tempChannel!=null)
                tempChannel=null;
            if(tempTask!=null)
                tempTask.Dispose();
        }

Is there something I should be doing to avoid this? It doesn't seem to affect anything, but if the task is still present after the program shuts down, then it could potentially be a problem. Suppose the user closes the program and immediately restarts it? Will there be a conflict?

 

Thanks


WPF Graph Label format for Double values

$
0
0

Hi @ll

 

I use wpf graph with autoscale functionality.

 

on my X-Axis I show double values which will be dispalayed as e. g. 869.52 ...889.53...869.64 etc.

 

when this values have more then 3 digits behind the point the scale shows sometimes:  8.69E2 etc (instead 869.564)...how can I avoid that ?

 

BR

KebMo

 

Getting the Temperature from TC001

$
0
0

I am trying to get the temperature from a thermocouple and display it on my main window. It works perfectly on my computer. The temperature updates every two seconds as it is supposed to. I had previously posted a question about required DLLs for this to work on the lab computers which do not have NI software installed. I was told I needed to install the NIDaq Runtime engine. I installed that but still got the error:

"System.IO.FileLoadException: A procedure imported by 'NationalInstruments.DAQmx.dll' could not be loaded."

The stack trace takes it back to the constructor where I call the "Watch Temperature" method which does the following.

 

                try
                {
                    TempScanner = new Thermocouple();
                    TempWorker = new BackgroundWorker();
                    TempWorker.WorkerReportsProgress = true;
                    TempWorker.WorkerSupportsCancellation = true;

                    TempWorker.DoWork += (s, e) =>
                    {
                        TempScanner.TempWorker = TempWorker;
                        TempScanner.MonitorTemp(ref watchTemp);
                    };

                    TempWorker.ProgressChanged += (s, e) =>
                    {
                        var t = e.UserState as Temperature;
                        this.Temperature = t.Temp;
                    };

                    TempWorker.RunWorkerCompleted += (s, e) =>
                    {
                        TempWorker = null;
                        TempScanner = null;
                    };

                    TempWorker.RunWorkerAsync();
                }

The critical parts of the thermocouple class are shown below.

 

        public Thermocouple()
        {
            //These are the default values.
            SecondsDelay = 2;
            MinimumTemp = -70;
            MaximumTemp = 200;
            List<string> chnls = GetPhysicalChannels();

            PhysicalChannelName = chnls[0];
            string[] ary = chnls[0].Split('/');
            AssignedChannelName = ary[0];
            ThermocoupleType = AIThermocoupleType.J;
            tempChannel = tempTask.AIChannels.CreateThermocoupleChannel(
                        PhysicalChannelName, AssignedChannelName, MinimumTemp, MaximumTemp, ThermocoupleType, AITemperatureUnits.DegreesC);
            tempReader = new AnalogSingleChannelReader(tempTask.Stream);
        }

        public void MonitorTemp(ref bool watchTemp)
        {
            while (watchTemp)
            {
                if (!TempWorker.CancellationPending)
                {

                    Temperature t = new Temperature();
                    t.Temp = GetTemp();
                    TempWorker.ReportProgress(100, t);
                    t = null;
                    Thread.Sleep(milliseconds);
                }
                else
                {
                    tempReader = null;
                    tempChannel = null;
                    tempTask = null;
                }
            };
        }


The runtime engine I installed was NIDAQ1410f1Runtime.

 

 

As you can see it is not all that complex. There must be a simple solution to this problem.

 

Thank you

Who want an Investor WhatsApp....+905386462720

$
0
0

Hello , I am an investor keen on investing in a lucrative, calculated viable business, either by partnership or as a financier. in Cash, Fixed interest, Shares , Property. I will welcome any profitable business plan/proposal (Long or short term). I will be willing to invest independently.So I would appreciate if you forward me in details all your business plans, ideas and strategy and also your means of contact Tel# via my email ( milleralexander366@gmail.com) so as to accomplish a specific objective

skype...Douglaswilliam411

WhatsApp....+905386462720

NI-DCPower Examples for DotNET 4.5 fail on IviDCPwr.Create()

$
0
0

In NI-DCPower Examples for DotNET 4.5 "DCPower Generate Voltage.sln"

 

The IviDCPwr.Create({logical name}) method CORRECTLY throws exception:

IviSessionFactory: The specific driver's main class (assembly qualified class name) is not specified in the configuration store.
Driver session: niDCPower
Specific driver (software module): NI-DCPower 

 

It is true--in Ni-Max where the logical name is configured to a driver session, the read-only field for Assembly Qualified Class Name is blank/missing. I know what the name is, but I can't supply it (read-only and all). SEEMS LIKE SOMETHING THAT SHOULD BE SIMPLE/AUTOMATIC but isn't. Any idea how to fix?

 

Ni-Max ScreenshotNi-Max Screenshot

Thx,

Tom

Measurement Studio 2015 and MVC

$
0
0

Hi,

 

I am developing an MVC application and i want to know if measurement studio 2015 supports MVC framework.

Viewing all 1999 articles
Browse latest View live


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