Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert from PCIe-6535 to PCI-653x using DAQmx Sampling Clock Timing

Hi Ben,

Do you mean the trigger line? I see Port4 and Port5 in ComboBox.  These ports are PFI0 to PFI7.

0 Kudos
Message 21 of 39
(2,014 Views)

Yes, in other words you can just open the Test Panel and monitor the signal independent of any programming you have set.  The first step to addressing the trigger issue would be to make sure you are actually sending and receiving that signal.  Especially if the task is timing out due to missing trig signal.  

Regards,

Ben N.
Applications Engineering
ni.com/support
0 Kudos
Message 22 of 39
(2,012 Views)

To confirm, I start Port 4 in Test Panel, and run my application to see if it complaining about the line is in use, and YES it complaining, that's mean the Signal Line is active.

0 Kudos
Message 23 of 39
(2,011 Views)

Dom, don't run your program.  Bring up the panel for the device, and monitor the pfi line you are receiving the trigger on.   Then send that trigger from your external device...determine if the line actually ever sees the signal.  

 

What are the characteristics of the signal you are using to trigger?  TTL?  Duty cycle? Frequency? 

Regards,

Ben N.
Applications Engineering
ni.com/support
0 Kudos
Message 24 of 39
(2,009 Views)

I don't have the external trigger.  For PCIe-6535, the trigger pulse uses the exported clock to PFI as in the code below (for PCIe-6535):

 

sprintf(acPFISrc,"/%s/PFI4", g_tdsDaqDevInfo.acDevName);
sprintf(acPFIDest,"/%s/PFI5", g_tdsDaqDevInfo.acDevName);

//Config Sampling Clock Timing, and Exporting the Clock Timing.
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandlePortBCDO, "OnBoardClock", i32SamplingRate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, ui32NewNumSamples));
DAQmxErrChk (DAQmxExportSignal(taskHandlePortBCDO, DAQmx_Val_SampleClock, acPFISrc ));
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandlePortAI,  acPFIDest  , i32SamplingRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, ui32NewNumSamples));
DAQmxErrChk (DAQmxConnectTerms(acPFISrc, acPFIDest, DAQmx_Val_DoNotInvertPolarity ));

 

So, for PCI-6533/6534, we have to setup the same way of PCIe-6535. How?

 

0 Kudos
Message 25 of 39
(2,007 Views)

Dom, so the output of the sample clock has a direct route to PFI5 which is why your code works fine on the code you posted above.  

 

However on the 6533/34 there is no route from the SampleClock output to any PFI line, only the PauseTrigger.  This is the hardware architecture of the board design so it's really a limitation that you won't be able to get around programming it the way you are now.  

 

Is there a particular reason you are using the SampleClock for your trigger?  If you were to run the program it is basically going to start the task immediately if you use the SC trigger or no trigger because once the clock is armed there are pulses being generated on the SC output line.  

Regards,

Ben N.
Applications Engineering
ni.com/support
0 Kudos
Message 26 of 39
(2,002 Views)

Hi Ben,

If I don't use trigger, there are pulses being generated on the Sample Clock Output lines, and the input data also on the Sample Clock Input line.  Does the Tri-State make the data in input line to overwrite on the buffer when we switch the state? (because I got repeated bytes for the whole block of buffer).

 

There is no particular reason for me to use SC for the triggering.  I don't care about what method to use to acquire data, as long as it get data from DUT faster than Unstrobed IO method, and I don't have to modify the H/W.

0 Kudos
Message 27 of 39
(2,000 Views)

The reason I use the SC for trigger for Input because, it will sync with the output.  When the output pulse (3 bytes Port0:3) done, at this time, the DUT put data on the bus and ready to read at Port0, so trigger require to read data here.  The waveform timing diagram will explain the reason.

OWBReadTimingDiagram2.JPG

0 Kudos
Message 28 of 39
(1,997 Views)

I forgot to explain more detail in the timing diagram above.

Every output pulse Port1:3 or Port-B, C, and D (State1 & State 2 in the diagram), the DUT will put data on the bus at input PortA (Port0) (State 3 in the diagram).  So I need a trigger signal at every State 3 in the timing diagram to get data.  If I use Tri-State Mode, would the data get lost when switching or unreserved ports?

0 Kudos
Message 29 of 39
(1,994 Views)

Hi Dom, 

 

I apologize for not getting back with you as quickly as expected.  I have been looking into this issue with some of the support engineers for working on a solution.  Are you still looking for a solution for exporting the Sampleclock out to trigger your application?  

Regards,

Ben N.
Applications Engineering
ni.com/support
0 Kudos
Message 30 of 39
(1,963 Views)