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

How to monitor by GPIB+?

$
0
0

I have 2 PCs and 1 instrument. PC A use GPIB control the instrument, and PC B use GPIB+ monitor the communication.

I want to write a program similar to GIPB Analyzer. Now, I can get the content from GPIB+,but  I don't know the content from which Address. Which object can get these information? How do know PC A send Board.Wait...?

 


VDM sample code something wrong

$
0
0

hi all

i am a vb.net 2010 user.

when i run Project  "NI\Vision\Example\dotNET\2. Functions\Analysis\Histogram" 

the dll "NationalInstruments.Vision.MeasurementStudioDemo.2005.dll" make mistake.

just like the upload picture.

 

Return the DigIO line used by counter

$
0
0

Hi 

Is there a way to return the Digital IO line than a counter uses? in daqmx api, using vb.net

 

using the usb 6002, the counter by default uses PFI 0 which is also Port2/line0, but I am looking for a way to programatically return Port2/line0. Or whatever the counter of a device is linked to?

 

Regards

 

Chris

Cannot Install .NET

$
0
0

This NI Web Page: 

http://digital.ni.com/public.nsf/allkb/0EA34D565632DFE186256E7B00762DCC

Says there is no need for Measurement Studio to be installed in order to access the .NET hooks to communicate to NI devices.

"Problem:
Do I need Measurement Studio to be able to use NI-DAQmx with the .NET languages, such as Microsoft Visual C# and Visual Basic .NET?

Solution:
No, it is not necessary to have Measurement Studio in order to use NI-DAQmx with the .NET Languages. The NI native .NET API for NI-DAQmx (documentation linked below) is available with the Device Driver CD and the NI-DAQmx driver installer. If the API does not install by default you will need to enable it from the feature tree during installation. You can get to the feature tree by selecting Custom at the Select Installation Option window shown below:"

 

However, I've downloaded installers all the way back to NiDaq-mx version 14 and when .NET support is selected as noted in the link above, (install this feature to local drive, NOT "this feature and all subfeatures") I receive this message:

 

"Measurement Studio 2015 for VS2012 Integration not present
NI-DAQmx Integration for Visual Studio 2012 requires Measurement Studio 2015 Support for Visual Studio 2012 Integration installed. Measurement Studio Professional Edition or higher must be installed and licensed on the system for this feature."

 

So.  Is it actually possible to use NI Hardware in .NET without buying Measurement Studio?

If so, how do I make that happen? I already have VS 2012 installed and .NET Framework 4.5.  Windows 7 Professional on a Dell laptop.

 

Thank you for your help.

 

 

EDIT: I figured out that I needed to exit the installer and start over.  If you ever select "install this feature and all subfeatures" that apparently never gets reset even if you deselect the item and then choose "install this feature".

I have installed the .NET support. Smiley Happy

Thank you,

Jonathan

 

 

 

 

line scan camer image display problem (NI 1433, NI 6211)

$
0
0

model eye image 1.JPG

model eye image 2.JPG

 

These are two images of a static dollar bill. I use NI MAX to grab the image. There is a horizontal line diving both images. Every single time, when clicking the 'grab' button from NI MAX interface, the position of the horizontal line moves. Does anybody know what is the problem? Is that due to the synchronization of the camera or the buffering to display the images?

To be more specific, I am using a NI DAQ 6211 to generate a 8kHz pulse train signal sending to the Pcie 1433 frame grabber via the SMB connector. I have a line scan camera (Basler sprint spl 2048-70km) connected to the frame grabber via the camera link.

 

Thank you very  much,

Ting

WiX Installer Measurement Studio Merge Modules

$
0
0

Hello,

I'm working under Windows7 pro. I have already installed in my pc MS2015 (with licence) and VS2010, that work correctly..

 

But now i working in VS2017 (Framework 4.6.2) when i use an controls i have unlicenced exception.

 

How doing for add MS2015 to VS 2017 ?

 

Thanks,

 

Johan

When analog output task is terminated?

$
0
0

Hello everybody,

 

I am using analog output of USB-6002 for excitation of my circuit. Also, I use the analog inputs to read some test points.

The analog output is an arbitrary waveform which is limited to the finite samples and it is not going to re-written.

 

aoTask.Timing.ConfigureSampleClock("",
5000,
SampleClockActiveEdge.Rising,
SampleQuantityMode.FiniteSamples, finalWaveForm.Length);

 

aoWriter.BeginWriteMultiSample(false, finalWaveForm, analogOutputCallback, null);

 

The problem is that I can not determine when the analog output task is done and all the data is written in the physical AO pin in order to stop analog input task. The analog output callback function is called before the waveform is written in AO pin.

 

I appreciate it if somebody gives me an idea.

WPF Graph : How to remove axes and lines ?

$
0
0

Hi, 

 

I'm trying to remove the axes and the lines from a Graph in WPF. Anyone know how to proceed?

 

Thanks!


How to generate the d wave? Follow the picture.

$
0
0

Please see the picture,and help me .

How to access Advanced Type Network Variables?

$
0
0

Hi,

 

I am trying to access some network variables. These network variables are of the type "Advanced" in the NI Distributed Manager and in LabView I can see user defined types. They appear as objects.

 

I tried creating a class that encapsulates such an object and tried to pass it to NetworkVariableReader but an error message said that such type of objects aren't supported. I've not been able to find examples of such complex objects, earlier I have worked with primitives like double, single, unit16 and bool.

 

I've attached screenshots of what I mean by "Advanced" data type in the distributed manager[screen2]. The other screen shot exposes the fields in the advanced object as seen in LabView[screen1].

 

Cheers,

gyani

How to read/write Network Variable Clusters?

$
0
0

Hi,

 

I had read a post earlier in which I was talking about programmatically reading and writing variables that are Advanced. I know how to read and write primitives. Now I realize the variables that I was calling "Advanced" are actually clusters.

 

After going through the forum and seeing posts from around 2008, most people said that clusters can't be written via the NetworkSharedVariable API. Has this changed since?

 

If not, what is the best way to read and write Clusters over the network? If writing it over the network isn't possible, can I possibly do it from the system running LabView? Do you guys have any examples of this?


I'm comfortable in switching programming languages if there are any alternatives. All help appreciated Smiley Happy

exception on second analog waveform read

$
0
0

I have this code:

private static void MonitorCallback(IAsyncResult result)
{

        var data = m_monitorReader.EndReadWaveform(result);
        //process data
        Thread.Sleep(TimeSpan.FromMilliseconds(500));
        m_monitorReader.BeginReadWaveform((int) m_monitor.Timing.SamplesPerChannel, MonitorCallback, null);
}

 

It works for the first callback, but the second the second callback always gives me this error:

    Error=-200278
        Message=
        Attempted to read a sample beyond the final sample acquired.
        The acquisition has stopped, therefore the sample specified by
        the combination of position and offset will never be available.
        
        Specify a position and offset which selects a sample up to, but
        not beyond, the final sample acquired. The final sample acquired
        can be determined by querying the total samples acquired after an
        acquisition has stopped.
        
        nAttempted to Read Sample: 4167
        Property: NationalInstruments.DAQmx.DaqStream.ReadRelativeTo
        Corresponding Value: NationalInstruments.DAQmx.ReadRelativeTo.CurrentReadPosition
        Property: NationalInstruments.DAQmx.DaqStream.ReadOffset
        Corresponding Value: 0

}

 

For this case, the waveform sample count was 4167, but the error happens no matter what the sample count is.  I have tried it with and without memory optimized waveforms, with and without SynchronizeCallbacks enabled, and with delays of several seconds between end and beginning of the readWaveform calls.  The only thing that helps is stopping and restarting the the main waveform monitoring task after the call to EndReadWaveform() and before the call to BeginReadWaveform().  The problem with that is that it takes far too much time.

 

What am I doing wrong?
   

 

analog input task takes extra long to start and stop at certain settings

$
0
0

I start a two channel analog input task with the code below.  The only input parameter is the period [seconds] that I would like to monitor.  I use settings between .2 seconds and .00001 seconds (20Hz - 10,000Hz).  For most of these settings, starting and stopping the monitor task takes between 23-154 ms, which is quite acceptable for my purposes.  However, for the one setting of .000133 seconds (7500Hz), the task takes more than 3 seconds to start and stop, which is unacceptable for my application.  I am using the USB6343 DAQ which has a 500kSample (2us) max sampling rate.  The math works out to 34 samples per channel at the problem setting and somewhere between 25-12,500 samples per channnel at the good settings. Any idea why it is so slow for this one case and not the others?

 

 

private static void StartOutputMonitor(double period /*seconds*/)
{
  m_monitor = new Task();
  m_monitor.AIChannels.CreateVoltageChannel(m_daq.AIPhysicalChannels[0], "monitorCurrent0",
        AITerminalConfiguration.Differential, -10, 10, AIVoltageUnits.Volts);
  m_monitor.AIChannels.CreateVoltageChannel(m_daq.AIPhysicalChannels[1], "monitorImpedance0",
        AITerminalConfiguration.Differential, -10, 10, AIVoltageUnits.Volts);
  var samplingRate = m_daq.AIMaximumMultiChannelRate / m_monitor.AIChannels.Count;
  m_monitor.Timing.ConfigureSampleClock("", samplingRate, SampleClockActiveEdge.Falling,

        SampleQuantityMode.FiniteSamples);
  m_monitor.Timing.SamplesPerChannel = (int) Math.Round(period * samplingRate);
  m_monitor.Control(TaskAction.Verify);
  m_monitor.Start();
  m_monitorReader = new AnalogMultiChannelReader(m_monitor.Stream)
        { SynchronizeCallbacks = false //allow waveform monitoring on a worker thread.};
  m_waveformMonitorData = new double[m_monitor.AIChannels.Count, m_monitor.Timing.SamplesPerChannel];
  m_monitorReader.BeginMemoryOptimizedReadMultiSample((int)m_monitor.Timing.SamplesPerChannel,

        MonitorCallback, m_monitor, m_waveformMonitorData);
}

Arrow From Point

$
0
0

I want to draw an arrow from a specific point in the graph (I have the position of the point relatively to the axes), in fixed length, with specific angle.

Currently, I found option to draw only arrow from label to point (in PointAnnotation):

 

PointAnnotation point = new PointAnnotation();
point.HorizontalPosition = arrow.Position.X;
point.VerticalPosition = arrow.Position.Y;
point.TargetSize = new Size(0, 0);
point.ArrowBrush = new SolidColorBrush(arrow.Color);
point.ArrowVisibility = System.Windows.Visibility.Visible;
point.ArrowHeadShape = PointShape.OutwardTriangle;
point.LabelAlignment = new AnnotationLabelAlignment(BoundsAlignment.None, 100, 100);

I got this as a result:current.PNG

 

Is there any way to draw an arrow between two points in the chart (relatively to the axes, not by pixels)?

 

 

C#: Get complete list of devices using NI VISA NET

$
0
0

I'm not able to get a complete list of devices attached to a Test Set using "ResourceManager.Find" in NI VISA NET library. The devices that were missing from the list are PXIe cards that are attached to PXI Chassis (1085 - 18 slots). The other types of devices such as serial and GPIB were detected.

 

This is not a driver or hardware issue because NI MAX was able to display complete list of the devices. I used NI I/O Trace to compare I/O events when using NI VISA NET and NI MAX to detect connected devices.

 

NI MAX (detected 23 devices):

NI MAX.PNG

 

NI VISA NET RSRC MGR (detected 9 devices)

NI VISA NET.PNG

 

The only difference between the two is setting getting and setting "FIND_RSRC_MODE" attribute. I have searched the VISA NET library to find how to set this attribute but was unsuccessful. Is there a way to do this or it is internal to NI?

 

 

 

 


WPF datagrid conf like CVI table

$
0
0

Hi,

I have started to convert a CVI application to Visual Studio using WPF and C#.

It seems not easy to make something similar to a CVI table.

I could not find a WPF table in Measurement Studio so I have started to use Datagrid but I'm wondering if it is possible to set the cells in a Datagrid to a button or a numeric with up and down arrows as it is possible in a CVI table.

Would be nice to get some inputs from experienced Measurement Studio.Net users.

Bertrand

 

 

SMT Zoom FFT Example

$
0
0

To try and understand how to use the ZoomFFT functions in the Spectral Measurements package, I built the SmtContinuousZoom C# example from NI-SMT 2.6.3. Using the default values for the example (see attached screenshot), it computes a spectrum size of 26214400, a FFT size of 52297728 and a maximum block size of 798. With these settings, it takes a very very long time to process the data and ends up with what appears to be all 0's for the spectrum output from the ContZoomFFTEx() function.

 

My questions are: 1) the spectrum size and FFT size seem inordinately large (in the Config() function, the example code requests 400 spectral lines, for instance, yet the function returns 26214400 as the optimal value); 2) if those inputs to the FFT function are correct, why is the spectral response all 0's (the input data is a simulated sine wave of 798 points at 1000 Hz)? 

GET RICH FAST (jaybobawesomenotes@gmail.com) V.PASTE,SSD SOLUTIONS

$
0
0

 

We are the best remarkable producer of HIGH QUALITY Undetectable counterfeit bills and fake documents inclusive. With over billions of our product circulating in Europe and the world at large. We make sure we offer only original high-quality counterfeit bills and fake documents which can be used in any community you so happen to find yourself.

A point to note..... our bills have the following....

> Ultra-violet feature- like high level contrast and flecking.

Alternating holographic images,multi-color Metallic thread- like silver

dashes,Holographic strip-Like foil patches , continuous dark line Water

mark-Micro lettering-like lettering beneath the portrait of each note.

See-through register- like colored irregular shapes printed on the front and back combining to form the symbol "money".

Feel of the paper - These Banknotes are printed on specially made papers which gives them their unique texture and feel . With these great features mentioned earlier, our bills are used over counters with no doubts.

We use latest technology to produce our notes so that it looks 100% carbon print of real notes.That said, all security features present in the real notes are on the notes we produce. Our team is made up of Quality I.T. technicians from RUSSIA, US, UK, Korea and China. We offer high quality counterfeit NOTES for all currencies and countries Namely...

USD - US Dollar
EUR - Euro
DNR - DINAR
GBP - British Pound
INR - Indian Rupee
AUD - Australian Dollar
CAD - Canadian Dollar
AED - Emirati Dirham
ZAR - Rand
CHF - Swiss Franc
NZD - New Zealand Dollar...etc

our team is renowned for chemical melting and recovery, testing and analyzing notes.

we happen to fall among the world's leading suppliers and manufacturers in:

**SSD Automatic Solution
**Vectrol Paste & Zuta S4
**Castrox Oxide HQ45
**SSD Solution, PK 58 & TTZ Universal Solutions.

contact for more details.
(jaybobawesomenotes@gmail.com)

Simple, buffered, samples acquisition with NI9234

$
0
0

Hi all.

 

I'm trying to read data from a NI9234 hosted inside a cDAQ9174, but this is not my usual working context so I'm having an hard time doing exactly what I want/need.I'm developing the applications with Visual Studio and C#, I've got the driver installed, and generally speaking I'm already able to interact with the hardware and acquire some data.

 

Now, basically what I want is to the command the hardware to start reading samples at a given frequency, and then from the software I'll just ask for the last N samples acquired. I don't want to wait for it to read them, I want to get already acquired data, and if they are not or they are less than N just give me what it has (like an empty array if there is no data since my last request)

 

Is this doable? If so, how? I've tried many of the samples, but those that looks like they could do something like this...simply do not run.

 

Thx all :-)

On demand quadrature encoder issues

$
0
0

Hello--

I'm trying to write (what I thought was) a simple program in VB.net to read 2 quadrature encoders using an NI USB-6221 (OEM)--this card has 2 counters.  I don't need hardware timing, so on demand works just fine.  Essentially, I just need to query the position from 2 encoders from time to time. 

 

I tried doing this based on some code I had that was hardware timed, but since my board only has 2 counters, I (think I) can't generate a pulse train as the source for the hardware timing.  I tried using the internal 100kHz clock, but apparently this can only be used for 1 encoder--it can't be used for 2.

 

So...I was hoping to just go with on demand.  I'm able to do this just fine in MAX (see configuration screenshot attached).  However, when I try to do this in my VB code, I get this odd behavior where the displayed position (via the debug.print function) reverts back to 99 (the initial position).  That is, the program will begin by streaming the position starting with 99.  Then if I move the encoder, the values will change correspondingly, and as soon as I stop moving the encoder, the stream of values returns to 99.  I don't know why the data reverts to the "initial value"?  Can someone please explain what I'm doing wrong?

 

FYI...I'm running VS 2010, DAQmx v16.0.1, Win10x64.  

 

LinEncTask = New NationalInstruments.DAQmx.Task()
LinEncTask.CIChannels.CreateLinearEncoderChannel(DAQName & LinChannel, "", CIEncoderDecodingType.X4, False, 88.0, CIEncoderZIndexPhase.AHighBLow, DistPerPulse, 99.0, CILinearEncoderUnits.Meters)
LinEncReader = New CounterSingleChannelReader(LinEncTask.Stream)
Do
     Debug.Print(LinEncReader.ReadSingleSampleDouble)
Loop

 Thank you so very much!

Sandheep

Viewing all 2011 articles
Browse latest View live


Latest Images

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