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

Interpolate every pixel on IntensityGraph (WPF)

$
0
0

The IntensityGraph appears to be interpolating pixel color for every point along the X axis, but not along the Y axis. How can I achieve this? I was previously using the CWGraph3D which did this automatically, but we can no longer support the ActiveX control in this application.

 

 

scan.png


CW Button in Visual Studio 2010?

$
0
0

I used to use the CW button control in VB6 applications, which gave me momentary/maintained buttons. These were used to emulate a control panel and worked great.

Measurement Studio 2010 no longer has the button control, which I think is a great loss for any application development.

 

Is there a way of using the CW.button control in 2010?

Does any version of measurement studio, compatible with VS2010 C#, have similar button components?

WPF Legend Item Mouse Event

$
0
0

Hi,

 

Is there a way to attach a mouse click handler to individual items in a WPF Legend control?

 

I added the event handler to the Legend itself, but the handler only gets called when I click outside of an actual item in the Legend. The toggle buttons themselves don't seem to trigger the callback. What I'm trying to do is hide non-primary axes when their corresponding plot is hidden by clicking on the toggle button in the legend.

 

For reference, this is what I tried:

 

<ni:Legend Name="_legend" BorderThickness="0" MouseUp="_legend_MouseUp">

 

Any help is appreciated.

C# binaryformatter.serialize without header?

$
0
0

Hi there,

 

I have a USB 5232 digitizer and am streaming data to disk based on the N.I. shipping example "StreamToDisk.cs".  The streaming is going great.  The problem is that I need to read the resulting data file on a Linux platform in c++.  So I am trying to decipher the format of the file.  It seems to have a header at the top of the file that we may be able to live with, but would prefer not to.  The data are streamed like this:

 

                    binaryFormatter.Serialize(fileStream, records[0].GetScaledData());

which produces a file full of double precision floating points preceded by a header.  If we try

 

                    binaryFormatter.Serialize(fileStream, records[0].GetScaledData(), null);

 

we seem to get the same file with the same header.   

 

Would anyone happen to know if we can stream just the data by itself, without the header?  Or, if we have to have the header, can someone tell me what is in it?  I am attaching an example of one of our data files to this post with a ".txt" extension even though it is binary.  Thanks for any thoughts.

 

Regards,

Penny

 

[WPF]Problem using graph in a tabcontrol

$
0
0

Hi,all.

I'm using a TabControl to display two viewmodels in one graph. Both viewmodels contain a  ObservableCollection<ChartCollection<double, double>> type datasource. Datasource I contains two ChartCollection, and datasource II contains one. The problem is when I switch the tabitem from I to II, the second plot generated by datasource I can still be seen in the graph. What can I do to solve that?

 

Thank you very much for your help!~

Implement watch dog for USB 6251

$
0
0

Hi,

I am pretty new to NI DAQmx and USB 6251 so I might be asking a question that has a obvious answer here....(also if I should post this question somewhere else please let me know)

 

I am trying to implement a watch dog timer that will trigger a digital output (static or waveform) to a signal light when it expired

From the spec for USB 6251, I can see that it does not have a built in watch dog timer that I can use..

 

Therefore, is it possible to implement my own watch dog timer (hardware not software) with this device??

 

I am programming using C# .NET 4.0 (without measurement Studio so I am only using the library provided) which I can see the methods for watch dog but cannot use due to hardware spec..

 

Maybe my best thing to do is buy another model that has a built in watchdog timer??

 

Thanks in advance,

Edward

DAQ assistent is not showing when starting a new project in Visual Studio 8 with Measurement Studio

$
0
0

Hi,

 

I have installed a system with the following configuration:

Windows 7 Prof

NI MAX

Visual Studio 2008 Standard

Measurement Studio 2013(evaluation)

NI Device Drivers Feb 2013

 

When I start a new project in Visual Studio, I can choose a template with NI Windows forms application. After this I get an overview of the classes, but after this I get no DAQ assistent. What I also miss is the actual references in the toolbox, except the knobs and graphs from NI.

 

Has someone a solution for this issue?

 

Thanks in advance,

 

Erik

 

 

WPF graph display point value on hover

$
0
0

Hello,

 

Is there an easy way to display the value of a point (with similar formatting to a Cursor) when hovering the mouse over the point? I'm using the WPF graph control (MStudio 2013) with multiple plots graphed on an AxisDouble.(y axis) and AxisPrecisionDateTime (x axis). Let me know if you need any more information and thanks in advance.


Show color scale axis with Graph and IntensityRenderer

$
0
0

When using the IntensityGraph, the z scale is represented by a color scale legend which is shown on screen. We are using the Graph control for more flexibility as recommended in the documentation. How do we show the color scale for the z axis legend on screen like the IntensityGraph does?

c# VISANS serialsession.query() help

$
0
0

Hi all,

 

I'm writing a class library to facilitate communication with instruments utilizing the Modbus Application Protocol that are connected to a NI cRIO-9073 via a serial-to-ethernet cable plugged into an NI 9870 DAQ card that is plugged into the cRIO. The specific instrument I am talking to is an MKS Optitemp Heat Exchanger, which uses the RTU serial transmission mode (http://modbus.org/docs/PI_MBUS_300.pdf).

 

I've been successful in communicating with it, using the Query(byte[] dataToWrite, int countToRead) method of the SerialSession class inherited from the MessageBasedSession class. However, I need to specify the exact number of bytes to read, or else I get the following VisaException:

 

"Timeout expired before operation completed. VISA error code -1073807339 (0xBFFF0015), ErrorTimeout"

 

Unfortunately, I don't always know how many bytes the Query is going to return. Namely, if the slave returns an error, the response is fewer bytes than expected, throwing the above exception. I want to be able to recover the details of the error message for debugging purposes, but right now am stuck with just reporting a generic error message if a VisaException is caught.

 

I've tried the Query( byte[] dataToWrite) overload, but that results in a timeout every time. The Modbus RTU protocol specifies that each message be terminated with "a silent interval of at least 3.5 character time", and I don't know how to set the SerialSession.TerminationCharacter property to reflect this. 

 

Is there a way I can read the bytes already in the buffer, even if the buffer isn't completely filled?

The only workaround I can think of is sending the same query multiple times, each time incrementing the countToRead by 1, but there must be a better way.

 

Thanks,

Joe

Save Measurement Studio Waveform graph as a file to playback later

$
0
0

Hi,

I'd like to see if there's an easier way to save the data that's been rendered on a waveform graph (configured as a strip chart) than capturing the incoming data in code and sending copies of it to a file. It would be nice if there was a method to do this, with all the relevant metadata saved in the file (color, etc). Even better, the file then could be opened in a labview application (such as a TDMS file.) for later review.

thanks.

ps. i'm using VS2010 and MS 2010.

How to comment defines for ni instrument driver?

$
0
0

We use the NI Measurement Studio Instrument Driver Wizard 2010  SP1 in Visual Studio 2010.

The converter finds the defines in the header file which corresponds to the function panel and creates a class with all defines.

But the comment from the defines are missing. How do i have to comment the defines in the header file that the converter includes them into the instrument driver?

 

e.g.

in the header file:

#define AAA_MODE_CC (0) // this is the comment for the define

 

in the instrument driver after running the wizard:

public class AAAConstants
{
        public const short ModeCc = 0;

}

 

we like to have something like this in the instrument driver:

public class AAAConstants
{

        /// <summary>
        /// this is the comment for the define
        /// </summary>
        public const short ModeCc = 0;

}

 

axis

$
0
0

haai there,

 

need help.

 

I've a graph, which is not fix. i mean that the scatterstrips moves with the graph.

i want to have a second xaxis, with the same values and which moves exactly parallel to xaxis1.

So xaxis2 should be a copy of xAxis1, but should not have any influence to the graph or the plotting.

And i plot the graph with xAxis1 over yAxis.

 

Could you help me?

Where do I find MStudiovisa.2005.msm and MStudioUtils.msm

$
0
0

I use MStudioVisa.2005.msm and MStudioUtils.msm in my install program. Some how they were removed from my system. What NI software do I need to install to get them back?

Simulating Channel Signals

$
0
0

Hello All!!

 

I am developing some data aquasition software that is working with DAQmx.  The hardware I am using is the NI cDAQ-9178 chassis with various modules.  The module I am currently setting up and working with in my software is the NI 9205 Voltage Analog module.  Currently I am using MAX to simulate the chassis with all the modules.  What I want to do is simulate some signals from this virtual hardware for my software to use.  Problem is that I do not know how to accomplish this.  Is there a way to generate some signals as a simulation? Or do I have to actually have the real proper hardware installed to generate some signals? Or is it best to create a custom signal generator of some kind for my software to couple to?  If this is what I need to do I will do it but was hoping to use MAX to accomplish this cause its a more realistic simulation if you will.  Thanks for any help you guys dish out!!

 

Cheers!


Equivalent of labview array of clusters in vb .net

$
0
0

Is there an equivalent of LabVIEW's array of clusters in Vb .net (for use on forms)? or put another way, how can we implement an array of clusters (FP control) in VB .net (a code in LabVIEW now needs to be implemented in vb .net by LabVIEW programmer, this problem is part of that task)?

Thanks!

Visual Studio app crash after rebooting PXI chassis and relaunching the application

$
0
0

This may be an obvious question, but I can't seem to figure it out.

 

I have my first working Visual Studio program (VB.net) running fine using the following hardware:

 

PCIe Card in PC: NI PCIe-8431/16

PXI Chassis: PXI-1045

3 PXI Relay Cards: NI PXI-2659

 

No exceptions. No problems. So I quit the application. I turn off the chassis. I turn on the chassis and wait a minute. I relaunch the application.

 

No communcation with the chassis and exceptions occur. So I open Measurement & Automation Explorer, and all of the hardware is x'd out. Reference the attached image when trying to run the VISA test panel for the chassis.

 

It seems to be a memory location problem, so I must reboot the computer to get it operational again.

 

Is this just something that I can't avoid? Seems like I should be able to restart the chassis without having to reboot my computer every time.

 

 

 

 

Add Pointer to knob control

$
0
0

Hello!

 

Sorry for my poor english (french Man)

 

 

I've just installed Measurement Studio 8.5 on Microsoft Visual studio 2005 (c# language).

I used to use Measurement Studio 6 with Microsoft Visual Basic 6.

 

So I try to find out how to use/configure the new controls to have the same behavior than before in VB6.

 

In VB6 I use a CWKnob:

You can configure it to have 2 diferent pointer as shown in the picture.

NI.JPG

My problem is: "how do you configure the new control knob in VS2005 to do the same"

I try to find out by myself. I found that page: Creating Custom Styles for Measurement Studio Windows Forms Numeric Pointer .NET Controls

but it seems that is only for one value.

 

I hope that what i want to do is possible. If someone had this problem before and solved it, i will be happy to know how.

 

Thanks for reading.

 

Epsylon

 

 

 

 

Creating custom tick labels

connection to unlisted module

$
0
0

I have a little background w/ vstudio/vbasic,but none w/ data acquisition. I bought a module before being introduced to mstudio, it is not NI or even on the 3rd party list. it is a DATAQ DM-155, and i am trying to learn this on my own. Is it possible to connect with this device even though NI does not list a driver for it? I have the DATAQ driver installed on my computer, and I know the device works, I just dont like the supplied software and want to try it w/ VB.

Viewing all 1999 articles
Browse latest View live


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