Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a PXI-1033, and a PXI4461 & PXI4498 together under NIDAQmx, I get the error -200862

OK.  I have the PXI-1033 recognizing devices correctly.

 

The setup I am using works properly with the following:

(1) 4461

(1) 4472

 

I can make an output task, and an input.  Start them together, and collect data while I am generating outputs.  Great.

 

However, if I use two 4461s together in slots 2 & 3 of the PXI chassis, and a 4471 in slot 4, the setup fails when I try and set the same clock of the output task.  I get the same error I wrote about in my original post.

 

"One or more devices do not support multidevice tasks"

Device: PXI1Slot2
Device: PXI1Slot3

Status Code: -201426
Error Type: DaqException
Stack Trace: at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.CheckWithName(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* , tCaseInsensitiveBasicString<unsigned short\,_STL::char_traits<unsigned short>\,_STL::allocator<unsigned short>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* pName)
at NationalInstruments.DAQmx.Timing.set_SampleTimingType(SampleTimingType value)
at Vibrant.Mechanics.Acquisitions.Devices.NationalInstruments44xx._OnConfigureOutput() in C:\Developer\Vibrant.Mechanics.Acquisitions\Devices\NationalInstruments44xx.vb:line 429
at Vibrant.Mechanics.Acquisitions.Devices.NationalInstruments44xx.OnConfigure() in C:\Developer\Vibrant.Mechanics.Acquisitions\Devices\NationalInstruments44xx.vb:line 282
at Vibrant.Mechanics.Acquisitions.AcquisitionBase._StartAcquire() in C:\Developer\Vibrant.Mechanics.Acquisitions\AcquisitionBase.vb:line 1581

 

Is it just not possible to use 2 4461s togetherr?  I thought that channel expansion was supposed to work out the details of the synchronization over the PXI bus lines.

0 Kudos
Message 11 of 15
(3,446 Views)

The code, again, is:

---------------------------------------------------

Dim tagIndex As Integer

Dim vendorOutputChannel As DAQmx.AOChannel

 

 

_outputTask = New DAQmx.Task("OutputTask")
_outputTask.SynchronizeCallbacks = True
_outputTask.Stream.Timeout = -1
_writer = New DAQmx.AnalogMultiChannelWriter(_outputTask.Stream)
_writer.SynchronizeCallbacks = False

 

For Each outputChannel As OutputChannel In Me.OutputChannels
vendorOutputChannel = _outputTask.AOChannels.CreateVoltageChannel(outputChannel.Tag.ToString, String.Empty, -outputChannel.Voltages.SelectedValue, _
outputChannel.Voltages.SelectedValue, DAQmx.AOVoltageUnits.Volts)
outputChannel.TagIndex = tagIndex
tagIndex += 1
Next outputChannel


_outputTask.AOChannels.All.IdleOutputBehavior = DAQmx.AOIdleOutputBehavior.ZeroVolts 

 

_outputTask.Timing.SampleTimingType = DAQmx.SampleTimingType.SampleClock   '-----------------------This is the line it ffails on-----------------------
_outputTask.Timing.SynchronizationPulseSource = String.Empty

 

_outputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("/" & _inputDevice & "/ai/StartTrigger", DAQmx.DigitalEdgeStartTriggerEdge.Rising)

_outputTask.Timing.ConfigureSampleClock(String.Empty, Me.MeasurementSettings.Frequency.SamplingFreq, DAQmx.SampleClockActiveEdge.Rising, _
DAQmx.SampleQuantityMode.FiniteSamples, Me.MeasurementSettings.SampleCount)

 

_outputTask.Control(DAQmx.TaskAction.Verify)

Debug.Print(Me.MeasurementSettings.Frequencies.SelectedItem.SamplingFreq.ToString & " - " & _outputTask.Timing.SampleClockRate.ToString) ' & " (" & tmpDouble.ToString & ")")

---------------------------------------------------

 

All of the two 4461 outputs (the 'Me.OutputChannels' collection) are assembled into a single output task.

 

0 Kudos
Message 12 of 15
(3,446 Views)

Hi Pat,

 

All documentation that I can find suggests that two PXI-4461 devices can be synchronized. You correctly have one of the two PXI-4461s as the "master" DSA device, by placing it in slot 2.

 

Can you tell me whether or not your PXI-4461s both have the full PXI-1 backplane? Or, are either one PXI Hybrid Compatible? For an explanation of how to tell by looking at the devices, please reference the KnowledgeBase article Is My PXI Card Hybrid Slot Compatible? After reading through a few of the DSA synchronization documents, it seems that the PXI-4461 devices must have the full PXI-1 backplane in order to synchronize with a PXI-4472 in the same task. More on that can be found in this KnowledgeBase article: Using PXI-4461 and PXI-447X devices in PXI or PXIe chassis.

 

Unfortunately, this type of synchronization is typically done in LabVIEW and I do not have the most experience with .NET applications, specifically DSA Synchronization. The process is much more documented and simple using LabVIEW, as shown in this KnowledgeBase article: Synchronizing DSA ... Devices With a Single DAQmx Task.

 

In order to understand your application more, can you please describe your input/output goals? Are you trying to input and output signals on each PXI-4461 and input signals on the PXI-4472? Finally, what steps did you take when adding the second PXI-4461 to the working system? Did you simply add the PXI-4461 outputs to the Me.OutputChannels?

 

 

Regards,

Mike Watts
Product Manager - Modular Instruments
0 Kudos
Message 13 of 15
(3,430 Views)

Mr. Watts;

 

In the 3 sequential PXI slots on the PXI-1033, I am using:

  PXI Slot 2) 4461 (4461_board PXI Slot 2.jpg)

  PXI Slot 3) 4461 (4461_board PXI Slot 3.jpg)

  PXI Slot 4) 4472 (4473_board PXI Slot 4.jpg)

 

I am using channel expansion for all input channels from the two 4461 boards, and the one 4472 in the code-base you have.

 

I am using channel expansion for all output channels on the two 4461 boards in the code-base you have.

 

What I am looking to do is to synchronize the start of the output signals from the outputs (an output task) to the start of the input (an input task) acquisition.

 

From what you're saying, it seems that I have a full-up 4461 in slot 2, and hybrid in slot 3, and a full-up in slot 4.  (not sure what this means)

 

I have been running experiemnts to see if I can get this to work.  The last one was to assign an output task to each of the 4461 boards that grouped their two output channels together.  So, for 2 4461 boards, I would have two output tasks, and each output task would have two output channels in it.  All the inputs were still carried as a single input task.

 

In this case, everything verifies but a different error is output from NiDAQmx when I start reading the input task. 

 

I think this experiment is a bust, and I'd like to go back to a single output task aggregating all output channels together from all output boards. (the code base you have)

 

And yes, both 4461s have their output channels added to the 'me.outputchannels' collection. (and the inputs are added to the 'me.inputchannels' collection)

 

0 Kudos
Message 14 of 15
(3,427 Views)

So it looks like the PXI-4461 in slot 3 is a hybrid card, which means that it is missing certain bus connections that are required for synchronization between NI 446X and 447X devices.

 

You can test my hypothesis by running your previously working test with only the one PXI-4461 (hybrid one) in slot 2 and the PXI-4472. Based on my research, this should not work. 

 

Assuming that this test fails, I believe that you will not be able to synchronize the three devices as you hope.

Regards,

Mike Watts
Product Manager - Modular Instruments
0 Kudos
Message 15 of 15
(3,420 Views)