Hi,
I am trying to change N88Basic (on DOS) program to VC# 2012. I can not find SendIFC, Remote Enable and Delimitter in NI 4882 dotNet 4.5 library. Where are these command ?
Hi,
I am trying to change N88Basic (on DOS) program to VC# 2012. I can not find SendIFC, Remote Enable and Delimitter in NI 4882 dotNet 4.5 library. Where are these command ?
Hi,
Is there a way to bind plots (plot collection) to a graph.
I'm using a graph with multiple plots. I bind the datasource with an observablecollection for the data values => the default plots are shown, perfect.
but now I want to manage these plots (color, axis etc..). For that I have to use plots. I can define manually plots in XAML.
but I want to add or remove plots at runtime. The datasource is perfect for data values but I have not found the same for plots. In the MVVM concept, is there a way to bind plots with a collection.
Thanks for any help.
O .Daniere
I have a wpf graph control that shows a series of plots that are associated to some Y Axis. Sometimes (not for every collection of plots) when I click on the top value of an y-axis scale (it allows me to change the value) and insert a new value, it throws an Invalid Operation Exception. In other cases, the scale and the plots associated to the it are correctly rescaled.
I didn't notice particular differences between the cases in which the error occurs and the cases in which everything works.
The part of StackTrace that regards NationalInstruments libraries is the following:
Exception: System.InvalidOperationException
Message: Cannot draw outside of a draw cycle.
Source: NationalInstruments.Common
Data: System.Object:
StackTrace: in NationalInstruments.Restricted.Guard`1.Satisfies(Boolean condition, Func`4 exceptionCreator, String format, Object[] args)
in NationalInstruments.Restricted.Guard`1.Satisfies(Boolean condition, String format, Object[] args)
in NationalInstruments.Restricted.NIValidation.IsEqualTo[T](Guard`1 guard, T expected, String format, Object[] args)
in NationalInstruments.Controls.Internal.VectorRenderTargetBase.a(RenderTargetOptions A_0)
in NationalInstruments.Controls.Internal.VectorRenderTargetBase.a(RenderTargetOptions A_0, Buffer`1 A_1, Buffer`1 A_2)
in NationalInstruments.Controls.Internal.VectorRenderTargetBase.DrawLines(RenderTargetOptions options, Buffer`1 xRelativeValues, Buffer`1 yRelativeValues)
in NationalInstruments.Controls.Rendering.LineStep.NoneImpl.RenderCore(IRenderTarget target, RenderTargetOptions options, RelativeDataCollection data)
in NationalInstruments.Controls.Rendering.LineStep.Render(IRenderTarget target, RenderTargetOptions options, RelativeDataCollection data)
in NationalInstruments.Controls.Rendering.LinePlotRenderer.a(IRenderTarget A_0, RelativeDataCollection A_1)
in NationalInstruments.Controls.Rendering.LinePlotRenderer.RenderGraphCore(PlotRenderArgs renderArgs)
in NationalInstruments.Controls.Rendering.PlotRenderer.Render(RenderArgs renderArgs)
in NationalInstruments.Controls.Primitives.DataPlotArea.RenderDataInternal(IDictionary`2 plotRenderArgsCache, IDictionary`2 plotsToRender, IRasterRenderTarget rasterTarget)
in NationalInstruments.Controls.Primitives.DataPlotArea.RenderPlotData()
in NationalInstruments.Controls.Primitives.PlotArea.RenderPlotData(IQueryableGraph graph, IDictionary`2 plotData)
in NationalInstruments.Controls.Primitives.PlotArea.RenderCopiedPlotData(IQueryableGraph graph, IEnumerable`1 data)
in NationalInstruments.Controls.Graph.NationalInstruments.Controls.Internal.IDefaultDataProcessorTarget.ReceiveData(IDictionary`2 data)
in NationalInstruments.Controls.Internal.DefaultPipelineDataProcessor.a(ICollection`1 A_0)
in NationalInstruments.Controls.Internal.DefaultPipelineDataProcessor.RemapDataCore(ICollection`1 dataIndices)
in NationalInstruments.Controls.Primitives.DataProcessorBase.RemapData(ICollection`1 dataIndices)
in NationalInstruments.Controls.Primitives.GraphBase.RemapData(ICollection`1 plotIndices)
in NationalInstruments.Controls.Graph.d()
in NationalInstruments.Controls.Internal.GraphUpdateAction.a()
in System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
Any suggestion?
Thank you
I'm trying to install NI-VISA 5.3. It gave me the error below:
Unsupported version of NI-VISA detected
A version of NI-VISA that is not supported on this operating system has been detected. You must cancel this installation and uninstall the older version before continuing. Visit ni.com/info and enter the Info Code CleanVista for more information.
I then tried to uninstall NI-VISA 2.6.0 Runtime. The uninstallation appears to proceed normally, but when it finishes the NI-VISA 2.6.0 Runtime is still installed.
I'm running Windows 7 64-bit on my workstation.
Hi everyone,
I have a question on learn a Geometric matching template in vs2008, my case is I want to learn a "Geometric Matching" template, but I want to ignore some of the region in ROI.
In NI Vision Template Editor, there have a Page "Define Curves". In this page, it can customize the ignore region from the ROI, However I can't find this function on vs2008? Anyone that is know this function of vs2008? Thanks
I need to make ScatterGraph with perfectly square axes, which also should fill its container. It will display the unit circle (radius 1, positioned at 0), so non-square axes are very annoying.
What I do now, is something li this, but it doesn't make perfectly square axes.
private void graphWrapper_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (squareArea)
{
int size = (int)Math.Max(0, Math.Min(graphWrapper.ActualWidth, graphWrapper.ActualHeight) - 10);
graph.Width = size + 35;
graph.Height = size;
graph.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
}
}
I would like to use the pure C# way to communicate with CompactDAQ devices that are on our local lan.
So no NI MAX - only native C# using NationalInstruments.DAQmx napespace (+Common :-).
I can't find any examples etc. only the usual configuration setups - how do I go from IPnumber only (or perhaps event through discovery)
It is needed for some automatic configuration setups where the hardware is being swapped from time to time by an operator.
Hi,
can anyone explain how to use "ai/sampleclock"?
I have an USB 6210 card and I want to read data from analog and digital in.
A very basic setup looks like this:
string dev = "dev1";
Task t1 = new Task();
t1.AIChannels.CreateVoltageChannel(dev + "/ai0", "", AITerminalConfiguration.Differential, -0.1, 0.1, AIVoltageUnits.Volts);
t1.Timing.ConfigureSampleClock("", 100.0, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
t1.Control(TaskAction.Verify);
Task t2 = new Task();
t2.DIChannels.CreateChannel(dev + "/port0/line0", "", ChannelLineGrouping.OneChannelForEachLine);
t2.Timing.ConfigureSampleClock(dev + "/ai/SampleClock", 100.0, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
t2.Control(TaskAction.Verify);
I get an exception at the t2.Timing.ConfigureSampleClock call (also tried with "/ai/sampleclock", /dev1/ai/sampleclock")
Is it not possible to get analog and digital data at the same time with this card?
If I understand the forum posts correctly, I can't use the internal clock to get digital data (how can I check this with the Deviceinfo class?)
What clock source would I use if I only want to get digital data?
Kind regards
Stephan
Dear All
I have AIM OPC Server in my Production Workgroup.
I have written a C# Code using NI Measurement Studio which is running on a machine , which is available at Active Directory Windows Domain.
We have connected Workgroup and Domain using a Firewall Box.
I have the required DCOM settings available both on OPC Client and OPC Server.
I am able to browse the OPC Server and view its Tags using DataSocket.SelectURL. However when i try to read and write the Tags , it gives me an error.
Last Error : -2147483595
Last Message : Can’t connect to OPC Server. The Network path was not found.
Later on , i studied that for this communication to work "Remote Registry" service has to be enabled and access permissions has to be defined on these three registry nodes using regedt32.
HKEY_LOCAL_MACHINE - > SYSTEM - > CurrentControlSet - > Control - >SecurePipeServers
HKEY_LOCAL_MACHINE - > SYSTEM - > CurrentControlSet - > Control - >SecurePipeServers - > Winreg
HKEY_LOCAL_MACHINE - > SYSTEM - > CurrentControlSet - > Control - >SecurePipeServers - > Winreg - > AllowedPaths
After doing these changes, i was able to read and write the Tag values using my C# code.
But , this setting is not acceptable to my business. Since , Production workgroup is a highly secure environment , they have not given the permission to enable the "Remote Registry" service.
Is any one aware of the method , how to read and write tags using NI Measurement studio from Remote OPC Server without enabling the Remote Registry Service ?
Thanks and Regards
Prashant Jha
Hi Fellow .NETTER's
Is there a limit to the number of DAQ's and/or DIO's that you can use in the same .NET system?
We are using 4 USB-6008's and 4 USB-6501's in our system.
We have been struggling with this issue for over 3 weeks now - it is perplexing - for both the programmer who wrote the .NET program and myself (hw guy).
Basically what we have constructed is a 32 Channel Battery Tester using 64 relays (Qty. 4 ER-16 boxes), 32 load resistors, 4 USB-6008's (DAQ), and 4 USB-6501's (DIO). We eventually expect to be able to simultaneously test 32 of our battery-powered devices in this tester.
Here are the things that are good!
16 channels work exactly as they are intended to -
The problem is that we can only get 16 channels to work at one time. It is either the upper 16 or the lower 16 channels that work but never both at the same time.
The interesting part is that when the NI USB device ID's are swapped (effectively causing the Software to recognize channels 1-16 as channels 17-32) the 16 malfunctioning upper channels work fine and the lower channels are now the problem children.
I wish I could say that the issue centers around either the USB-6008's or the USB-6501's but it seems to affect both.
What I have observed in normal operation is that when a test channel is first initialized (test is started) the USB-6501 turns on the Charge Relay right away and indicates "Initializing" in the User Interface(UI). After about a minute it then reports a "Charging" status in the UI. The charging status remains until the battery fully charges at which point the system will transition to Discharge thus indicating the same in the UI. This is expected & normal operation.
On a malfunctioning channel, what I observe is that for whatever reason, the USB-6501 does not turn on right after the test is started/channel initialized. The UI reports "Initializing" status as it normally would. Then after a minute, the USB-6501 finally turns on the Charge Relay and about a minute after that goes straight into Discharge for no VALID reason as there is no HIGH CHARGE_DONE signal at the repective Digital Input to the USB-6008.
Here is my system configuration:
The PC is a an HP 8200 CMT Elite Desktop:
Intel Core i5-2500 Processor 3.30 GHz ,Intel Graphics Media Accelerator HD,4GB DDR3 1333 Mhz (2x2GB) memory. System is capable of 16GB, 250 GB 7200 RPM SATA hard drive, 16X DVDRW with Lightscribe, Intel 10/100/1000 Ethernet.
Installed NI Software is:
NI IO Trace 3.0.1
NI LabWindows/CVI Run-Time Engine 2010 SP1
NI Measurement & Automation Explorer 5.1.0
NI Measurement Studio Common .NET Assemblies for .NET 2.0
NI Measurement Studio Common .NET Assemblies for .NET 3.5
NI Measurement Studio Common .NET Assemblies for .NET 4.0
NI Measurement Studio Common .NET Language Assemblies for the .NET Framework 1.1
NI Network Browser 5.0.0
NI PXI Platform Services 2.6.2
NI PXI Platform Services 2.6.2 Configuration Support
NI System Configuration Runtime 5.1.0
NI TDM Excel Add-In 3.3
NI Update Service 2.0
NI-1588 Configuration 1.1.2
NI-488.2 3.0.2
NI-DAQmx 9.5.0
NI-DAQmx ADE Support 9.5.0
NI-DAQmx MAX Configuration Support 9.5.0
NI-VISA 5.1.2
NI-VISA Runtime 5.1.2
NI-VISA Server 5.1.0
I would appreciate any and all comments.
I will certainly forward any SW related questions to our awesome .NET programmer..
Thanks for taking time to read about our issue.
I am building a .NET application and reference two assemblies from the Measurement Studio installation: NationalInstruments.Common.dll and NationalInstruments.VisaNS.dll
My code builds and runs fine.
However, if I turn on Code Analysis in my VisualStudio project, I get an error
CA0001 Error Running Code Analysis
CA001: Could not resolve references to NationalInstruments.Common, Version=13.0.40.168
I believe I know the reason and how to fix it. Actually, National Instruments needs to fix it.
Q: What Causes This?
Hypothesis: The NI installer for the .NET language support ships version 13.0.45.167 of the VisaNS assembly and version 13.0.40.188 of the Common assembly. The VisaNS assembly was built against version 13.0.40.168 of the Common assembly, so Visual Studio code analyis is confused because it cannot find the correct assembly.
Best Fix: NI ships these two assemblies in the support tools and makes sure that the Common assembly is the version that VisaNS was built against.
I can turn off Code Analyis in my project. This is not a great solution because code analysis catches many very hard-to-find bugs.
Here is a blog that better explains the issue and gives other workarounds http://davesbox.com/archive/2008/06/14/reference-resolutions-changes-in-code-analysis-and-fxcop-part-2.aspx
But it would be nice to have the very good folks at NI issue an update (or at least test this for the next release).
Dear All,
Whar are the ways to query .dbc file.
Regards,
K.K.Karuppusamy
Hey,
I tried to access the MeasurementStudioHelp (2012) from the menu in visual studio 2010.
It leads me here but the page isnt available anymore. Has it moved?
Im a beginner with the NI software, so any help is appreciated
What controls when analogCallback is called after you run:
analogInReader.BeginReadWaveform(-1, analogCallback, myTask);?
I found a webpage on this site that discusses the buffer size that Nidaqmx allocates depending on you samples rate:
http://zone.ni.com/reference/en-XX/help/370466V-01/mxcncpts/buffersize/ .
But what about the last argument when you set up the timing of the channel? As in:
// Configure the timing parameters
myTask.Timing.ConfigureSampleClock("", ADParams.sample_rate,SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, 100000);
Here I set the buffer to 100,000 samples? Will this be used or does Nidaq pick its own value?
After how many samples will the callback be called?
Thanks,
Dave
Hi,
I recently received an e-mail about security vulnerabilities in ActiveX components of NI software.
We maintain an application written in C# using the Measurement Studio plugin (8.1.1) for Visual Studio. This application has been deployed on many (probably up to 100) machines of our customer along with the NI-DAQmx 9.2.2 driver. We do not use ActiveX components.
Is it absolutely necessary to update all these machines? That would obviously be an enormous task. It is not just the work itself, it also affects the image of our products. Of course, from the NI point of view, it is easy to say that all systems in the field must be updated, but what exactly are the risks of not updating these systems for my situation?
I hope you can explain these risks. Thanks in advance.
Hello,
I am currently using Measurement Studio 2012 to develop an application that communicates and takes readings from a USB-6009 piece of hardware. Right now I have coded a UI to show me differential readings that I am taking from the USB-6009 from channels AI0 and AI1. I have 2 each Kistler pressure transducers that are being powered with its own DC power supply. I am applying 50PSI to one transducer and 100PSI to the other tranducer.
If I have only one transducer hooked up, (AI0 for example), and only one task that is setup in my program for that channel, the pressure that I am seeing in my program is valid and correct at 100PSI. If I move this tranducer to a different channel, like AI1, AI2, or AI3, then I still get good results. Now the problem lies when I have more then 1 channel being used on the USB-6009.
This is the setup I have that causes the issue. I have tranducer 1 pressurized to 100PSI on channel AI0 and tranducer 2 pressurized to 50PSI on channel AI0. When I run my program, both channels will always read the same pressure as tranducer 1(100PSI). They should be reading different. The readings I should be getting is transducer 1 reading 100PSI and transducer 2 reading 50PSI.
I did some changes to see if I would get different results and nothing worked. One change I attempted is that I ran a jumper from AI0- to to AI terminal 4 GND and ran a jumper from AI1- to AI terminal 7 GND. This changed nothing and did not resolve the issue. No matter which terminal GND I ran the jumpers to the issue still remained. Another change I tried is to move transducer 1(originally on AI0 100PSI), to channel AI1 and move transducer 2(originally on AI1 50PSI) to channel AI0 and the result was still the same, but instead of all channels reading 100PSI, they read 50PSI. This showed me that as long as my program has more then 1 channel setup, then all channels will always read the same as the lowest AI channel that is hooked up. So if the lowest numbered AI channel that I had hooked up was AI3, then any channels after that AI channel that is hooked up will read the same as the channel AI3. I have reviewed my code and confirmed that my code is indeed setting up each channel to its own separate physical channel. I don't understand why this behavior is happening. Any help would be greatly appreciated. If you need to know more info about what I have going on or questions, just let me know and I will provide as much information as I can.
Thanks!!
Hi everybody,
For high speed acquisition, we created our own measurement file.
Each file is divided in blocks.
Each block contains the data of all recorded channels.
Each channel contains a number of data depending on the acquisition frequency.
It means that for example ai0 could have 10 samples per block, ai1 could have 100 samples per block....
What I want to do is to convert this file to a tdms one but unfortunately for huge files it can takes hours to be created.
For example : I record data during 30 secondes, the file contains 16 analog inputs acquired at 500kHz, 32 analog inputs acquired at 10kHz and 64 other channels acquired at 1kHz.
The recorded file size is 503MBytes.
To convert it to tdms, it takes 20 hours (too much time for the customer :smileyfrustrated:).
My C# code is the following to add the data :
AnalogWaveform<double> waveForm = group.GetAnalogWaveform<double>(group.GetChannel(VALUE)); waveForm = AnalogWaveform<double>.FromArray1D(aic.Block.ElectricalValues); group.AppendAnalogWaveform<double>(group.GetChannel(VALUE), waveForm);
This code is called after reading each block to add each data to the good channel in the Tdms file.
What I see is that after reading each block and writing the data to the tdms file, it takes longer to write each channel.
In my case, writing the first data block to the tdms file takes 1 sec.
The second block takes 2 sec.
The third block takes 3 sec.
...
After reading 48% of my measurement file, the block is written in 3 minutes and 48 secondes.
Conclusion, it takes long time to create the tdms file. I think some operation are done by the AppendAnalogWaveForm.
Does someone know how to optimize it or maybe there is a better solution to be compatible with DIAdem.
Thanks,
CFOE
Dear all,
It seems NI-VISA 5.3 does not support USB 3.0 devices. When I try to use Driver Wizard to create a driver for a USB 3.0 device, I got the error "ERROR- 1073807178: Device descriptor error - invalid bMaxPacketSize0 value ( must be set to either 8, 16, 32, or 64 bytes)". I noticed that the device was giving wMaxPacketSize0 of 512 (2^9). But the driver wizard is treating the value as 9. So I believe driver wizard does not support USB 3.0 device. Could somebody confirm this?
Thanks a lot in advance!
Jackie
I currently have an ObservableCollection<T> containing several signal objects each with properties defining xy data, axis labels etc. This observable collection has been defined as a dependency property of the window to allow me to perform all my bindings in the xaml code.
I am finding the graph datasource binding only works if i specify a single signal in the collection to display, but i would like to display the xy data for all the signals. Is there a way of doing this?
For example
DataContext="{Binding ElementName=Window1, Path=GraphCollection}" DataSource="{Binding Path=[0].DataXY}" This works
DataContext="{Binding ElementName=Window1, Path=GraphCollection}" DataSource="{Binding Path=DataXY}" Does not work
FYI the DataXY for each signal is defined as an array of points.
I am also having problems binding the graph axis to the same collection. I am finding this binding does not work at all.
Label="{Binding ElementName=Window1.GraphCollection, Path=[0].XLabel}"
If i apply the same binding but in the code behind it works perfectly!!
Binding bTemp = new Binding();
bTemp.Source = this.GraphCollection;
bTemp.Path = new PropertyPath("[0].XLabel");
AxisDouble temp = graph1.Axes[0] as AxisDouble;
BindingOperations.SetBinding(temp,AxisDouble.LabelProperty,bTemp);