PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

using PXI_CLK10 as source for digital input sample clock

I'm using the PXI-6551 to generate waveforms using the scripting feature.  Each waveform generates a trigger on PFI2 via marker0(0).  In addition PXI-6551 is configured to use PXI_CLK10 (from the backplane) as the reference clock.

 

There appears to be a resource conflict between the script generator and an acquisition task created for the 6551.  One option I'm contemplating is shifting the acquisition to a PXI-6259 which is configured to run off of PXI_CLK10 on the backplane.  Then I can trigger off of a PFI pin to which the PFI2 output from the 6551 is connected.  

 

There are two questions

 

1.  According to the M series manual for the 6259, a digital input task must be triggered by AI start trigger and clocked by AI sample clock.  However, example code in visual C does not include this indirect configuration.  Instead the trigger and sample clocks are directly set for the digital task.  What am I missing?

 

2.  Output logic levels Voh and Vol in the 6551 are 0 to 2.5V (e.g).  Do I need to level-shift to TTL levels for the 6259?  The data sheet for the 6259 specifies Vih to be in a range of 2.2V(min) to 5.5V (max) so I'm guessing I should be ok.

 

Please elaborate.  Thanks in anticipation.

 

Anand

0 Kudos
Message 1 of 10
(4,793 Views)

Hey Ajog,

 

To address your two concerns seperately:

1. Our examples assume software timing; therefore, if you want to acheive hardware timed Digital Generation or Acquisition, you need to use the DAQmx timing function calls to define the timing source for the DIO.  Our examples, such as Read Dig Port, doesn't have any type of configuration for the timing because it's set for software timing. Our example Read Dig Port Ext Clk uses hardware timeing and does configure timing and so you'll find the function calls present there.

 

2. As long as the 6551 is outputting a value higher than 2.2V the 6259 will register that value as a logic level high.  Level-shifting this output of the 6551 will definitely increase the probability that its output value will register as a logic level high on the 6259's input.  I would monitor the output of the 6551 with an oscilliscope and verify that it is outputting a level above 2.2V consistently when generating a signal.  If it fails to on occasion, I would suggest level-shifting.  If you see no problems generating that value everytime, there is no need for level-shifting.

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 2 of 10
(4,780 Views)

If the 6551 is outputting less than 2.2V when configured as VOH=2.5V, it is either damaged, defective, or in need of calibration.  The voltage accuracy of the 6551 is +/-20mV.

 

Keith Shapiro

National Instruments R&D

0 Kudos
Message 3 of 10
(4,778 Views)

Hi Keith,

 

No, the 6551 is correctly outputting 2.5V when configured for 2.5V.  Its just that this output would have required further amplification had the Vih level of the 6259 been above 2.5V as also pointed out by David Pratt.

 

Anand

0 Kudos
Message 4 of 10
(4,775 Views)

Thanks David,

 

I'm guessing the trigger for the multirecord digital acquisition can also be configured to be

from one of the PFI channels of the 6259 via the DAQmxCfgDigEdgReftrig function call?

 

I think, I should be able to set the sample clock to refer to PXI_CLK10 in the function DAQmxCfgSampClkTiming.

 

Please clarify.

 

Thanks.

 

Anand

0 Kudos
Message 5 of 10
(4,771 Views)

Hey Ajog,

 

You are correct.  You can use the PFI or RTSI lines to perform the triggering you want and you can also use any internal timing source mentioned in the M Series User Manual to drive the sample clock using that DAQmx timing function.

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 6 of 10
(4,765 Views)

Anand,

 

 do you have any detail on the "resource" conflict you were getting between the acquisition and generation tasks of the 6551?  Have you tried running one of the simultaneous generation and acquisition examples shipped with NI HSDIO?  My guess would be that you have the clock incorrectly configured for acquisition if you are using OnBoard for your acquistion clock source.

0 Kudos
Message 7 of 10
(4,739 Views)

Hi Ryan,

 

I've been using simultaneous acquisition and generation using hardware triggering via PFI2/3 though Jordan mentions that I need not externally wire these and may simply use only one PFI pins.

 

I have the same hardware setup but now am attempting to use scripts.  Basically it now will let me use EITHER the generation task (with script) or the acquisition task but not both.  I will check once again but there are no other details other than what the error message provides.  Let me see if I can determine the exact statement(s) that are causing this error.  

 

If in principle the 6551 permits this (i.e there are no internal hardware conflicts) I can probably locate the error in software.

 

Anand

0 Kudos
Message 8 of 10
(4,734 Views)

Anand,

 

There's nothing intrinsic with scripting that would prohibit simultaneous Acquisition and Generation.  Actually, when you're not in scripted mode, the driver runs a simple script behind the scenes.  Can you post your script?  It may be the your are trying to use a marker or script trigger on the same line that you have configured for your acquisition trigger.  This would cause an error since you would be trying to assign a single resource, two different tasks.

0 Kudos
Message 9 of 10
(4,719 Views)

Thanks Ryan,

 

I have checked this.  Marker0 to PFI2, script trigger from PFI1 and acquisition trigger on PFI3 with PFI2 & PFI3 shorted externally.  Also, I have emailed Jason my entire source code.  Due to company laws I'm unable to post the entire code on the newsgroup although, I could modify portions of it over the weekend and post it next week.  Lets see...

 

Anand

0 Kudos
Message 10 of 10
(4,709 Views)