05-31-2009 11:02 PM
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
06-01-2009 03:26 PM
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.
06-01-2009 04:33 PM
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
06-01-2009 04:47 PM
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
06-01-2009 05:21 PM
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
06-01-2009 05:26 PM
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.
06-03-2009 10:35 AM
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.
06-03-2009 11:24 AM
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
06-04-2009 10:12 PM
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.
06-05-2009 11:30 AM
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