Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-4461 connections and text based programming

Solved!
Go to solution

Hi Frank,

 

I did locate the example files you pointed me to after all.  However, I had already referred to a similar (DotNet2.0) version earlier.  My question is PXI-4461 hardware specific.

 

Thanks.

 

Anand

0 Kudos
Message 11 of 19
(1,946 Views)

Anand,

 

Attached is where I found information regarding the low pass anti alias filter which has the 3dB dropout that you were speaking of. This was found in the dotNET reference help in the NI-DAQmx installation, under AIChannel Properties,

and shows the C# functions provided. I have attached the image of the set frequency and the lowpass enable functions. The dotNET help files as well as the examples are provided free in the NI-DAQmx installer.

 

Notice, the functions and the examples will NOT work unless .NET support is installed for NI-DAQmx which can be done through the NI-DAQmx installer. 

 

Frank L

Frank,
National Instruments
Software Group Manager
Download All
0 Kudos
Message 12 of 19
(1,945 Views)

Correction, sorry about that I forgot that we were speaking of analog out here for your DSA PXI - 4461. Attached below is an image of the help files describing the function to disable the DAC filter. The function is below.

 

public bool EnhancedImageRejectionEnable { get; set; }

 

As far as specific PXI - 4461 commands, the PXI - 4461 is a DSA card, which uses NI-DAQmx drivers. Any C# examples for DAQmx would be usable by the PXI-4461 as long as the 4461 was capable of using these functions per the spec. sheet. 

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 13 of 19
(1,936 Views)

Hi Frank,

 

This is very kind of you!  I will implement it and see if the waveform improves - I'm guessing it should.

 

Thanks again!

 

Anand

0 Kudos
Message 14 of 19
(1,926 Views)

Hi Frank,

 

This does not appear to work on my PXI-4461.  I get an unhandled DaqException which I attach as a picture.  My code is as follows

 

myTask.AOChannels.CreateVoltageChannel(devAddress + "/" + channelNumber, "aoChannel",

Convert.ToDouble("0.0"), Convert.ToDouble("10"), AOVoltageUnits.Volts);

myTask.AOChannels.All.EnhancedImageRejectionEnable = false;  // Runtime error here see screenshot!!

AnalogSingleChannelWriter writer = new AnalogSingleChannelWriter(myTask.Stream);

// PXI-4461 requires a clocked output (no on-demand feature as in the PXI-6259)

myTask.Timing.ConfigureSampleClock("", SampleRate, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, vwrite.Length);

writer.WriteMultiSample(false, vwrite); // do not autostart, employ waveform array

myTask.Start();

 

What could I be doing wrong?  Also, we don't have Measurement Studio.  How does one access the help on .NET classes just like you have (with respect to your screenshot)?  Please advise. 

 

Thanks

 

Anand

 

0 Kudos
Message 15 of 19
(1,906 Views)
Solution
Accepted by ajog

There error that is coming out of the code is signifying that you cannot disable the DAC filter. I was unable to find any information on which devices that you can or cannot change this function. I then did a test here on my machine using LabVIEW, and I found the property node associated with that setting. With the PXI 4461 attached, I was unable to select this property. When I forced this property to be changed on the PXI-4461, I came up with an error saying that this property is not found on this specific device. I believe that for the PXI-4461 this property cannot be changed, and the DAC filter for analog output is permanently set to be enabled. There is other hardware that will be able to change the DAC filter to be on/off. This information should be documented better, and I will suggest that this is done correctly to ease some confusion that we have experienced.

 

You do not need Measurement Studio to access the help files. Listed in KnowledgeBase 381FFC5B is a method on how to install the .NET examples using the NI-DAQmx installer. After installing, you can located the help file at "Start»Programs»National Instruments»NI-DAQ»NI-DAQmx .NET Framework 3.5 Help." I hope this is able to help you out to find more functions for your C# DAQmx tasks.

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 16 of 19
(1,893 Views)

Thanks a ton Frank! 

 

With this let us close this thread for now.  At least you have helped me determine what can and cannot be done with the DAC interpolation filter.  The best we can do is to rewrite our code so that the maximum possible sample rate is employed for any desired frequency.  This will reduce the ripples we see at the edges.of square and step-like waveforms.

 

Best Regards

 

Anand

0 Kudos
Message 17 of 19
(1,890 Views)

Hi Frank,

 

Is the NiDAQmx installer able to recognize Microsoft Visual C# Express as an equivalent installation?  The last time I tried it would not allow me to install the .NET help files.  I will try again and see if that is the case.

 

Anand

0 Kudos
Message 18 of 19
(1,888 Views)

Hi Frank,

 

It seems I had indeed  installed the .NET 3.5 Framework help files.  One has to look into Start->All Programs->National Instruments->Ni-DAQ->Text Based Code Support.

 

I am now able to search and locate help on .NET classes just as you had pointed out.

 

Thanks again!

 

Anand

0 Kudos
Message 19 of 19
(1,884 Views)