Discussion:
DAQmxCfgBurstHandshakingTimingImportClock and 653x
(too old to reply)
Larry X
2007-03-02 18:10:14 UTC
Permalink
I'm porting Traditional NIDAQ code that uses a PCI-6533 to read and write from / to an external device, using burst mode handshaking The external device supplies a clock that the 6533 uses when it is reading 16 bit words from the external device. I tried using DAQmxCfgBurstHandshakingTimingImportClock to specify Dev2/PFI5 as the clock source (it just happens to be Dev2 in my case), since I was told by NI that this is the DAQmx terminal name for PCLK2 on the 6533. However, when I start my read task, I get error -89136, "Specified route cannot be satisfied, because the hardware does not support it." It suggests using PFI4, or RTSI0 - RTSI6 instead. Well, I can't do that, since I need to use PCLK2 (unless the info I was given about PCLK2 == PFI5 is incorrect).
Furthermore, in 653x.chm, the page "Generating and Receiving Digital Patterns and Waveforms - Sample Clock" says, "the [sample] clock signal can be received from the PFI <2..3> or PFI <6..7> pins on the I/O connector." So using either PFI4 or PFI5 conflicts with that.
Can someone please tell me what I need to do to use PCLK2 (connected to an external device's clock) as my 6533 sample clock for reading from the external device? Where is the mapping from PCLKs, ACKs, and REQs, to 6533 port and line numbers documented? Thanks.
 
Larry X
2007-03-06 01:10:09 UTC
Permalink
Jeff,
Thanks for the reply.  After reviewing our old Traditional code again, I cleared up one misunderstanding that I had, but I still have some DAQmx questions. 
In our Traditional code, we define the following groups:
    input: group=2, ports=0,1
    output: group=1, ports=2,3
(in Traditional, group numbers start at 1; in DAQmx, they start at 0)
Then we use PCLK2 / PFI5 / pin6 as the input clock (clock sent to the external device while it is writing to the 6533 -- my previous post had this backwards).  We also do the following:
    Set_DAQ_Device_Info(deviceNumber, ND_CLOCK_REVERSE_MODE_GR2, ND_OFF);
I don't know why that code is there, since someone else wrote it.  I assume it has to do with using the group 2 clock for input instead of output, but that's just a guess.
I suspect that the problem in my DAQmx code has to do with the fact that the Traditional code defined non-default (but legal) group numbering, i.e. first group for output and second group for input.  i.e. input is on ports 0,1, but we send out PCLK2 (not PCLK1) to the external device when doing input to the 6533.  In the 6533 DAQmx docs, it says that ports 0,1 must be used with group 0, and ports 2,3 must be used with group 1.  I can't find the DAQmx equivalent to DIG_Grp_Config, which allowed us to redefine the port-to-group mapping.  This functionality is essential for compatibility with our external device's pinout.
As a side note, I figured that if the problem was that DAQmx wants PCLK1/PFI4 to be used for input on ports 0,1, then even if our hardware requires PFI5, I would try using PFI4 just to see if it made the DAQmx error go away.  Well, using either PFI4 or PFI5 in a call to DAQmxCfgBurstHandshakingTimingExportClock gave me the error message:
"Terminal for the device is invalid. Property: DAQmx_Exported_SampClk_OutputTerm. Requested value: dev2/PFI4."  (or PFI5)
Since PFI4 is supposed to be associated with the lower 16 lines, what is causing this error?  Now, looking at the MAX "Device Routes" tab for the card, it shows that PFI4 and PFI5 can be routed to the "sample clock timebase," but not the "sample clock" -- is that the problem?  How do I export my input clock on PFI5 / PCLK2?
Thanks, Larry
jcarbonell
2007-03-06 14:10:13 UTC
Permalink
Larry X wrote:

Jeff,
Thanks for the reply.  After reviewing our old Traditional code again, I cleared up one misunderstanding that I had, but I still have some DAQmx questions. 
In our Traditional code, we define the following groups:
    input: group=2, ports=0,1
    output: group=1, ports=2,3
(in Traditional, group numbers start at 1; in DAQmx, they start at 0)
Then we use PCLK2 / PFI5 / pin6 as the input clock (clock sent to the external device while it is writing to the 6533 -- my previous post had this backwards).  We also do the following:
    Set_DAQ_Device_Info(deviceNumber, ND_CLOCK_REVERSE_MODE_GR2, ND_OFF);
I don't know why that code is there, since someone else wrote it.  I assume it has to do with using the group 2 clock for input instead of output, but that's just a guess.
I suspect that the problem in my DAQmx code has to do with the fact that the Traditional code defined non-default (but legal) group numbering, i.e. first group for output and second group for input.  i.e. input is on ports 0,1, but we send out PCLK2 (not PCLK1) to the external device when doing input to the 6533.  In the 6533 DAQmx docs, it says that ports 0,1 must be used with group 0, and ports 2,3 must be used with group 1.  I can't find the DAQmx equivalent to DIG_Grp_Config, which allowed us to redefine the port-to-group mapping.  This functionality is essential for compatibility with our external device's pinout.
As a side note, I figured that if the problem was that DAQmx wants PCLK1/PFI4 to be used for input on ports 0,1, then even if our hardware requires PFI5, I would try using PFI4 just to see if it made the DAQmx error go away.  Well, using either PFI4 or PFI5 in a call to DAQmxCfgBurstHandshakingTimingExportClock gave me the error message:
"Terminal for the device is invalid. Property: DAQmx_Exported_SampClk_OutputTerm. Requested value: dev2/PFI4."  (or PFI5)
Since PFI4 is supposed to be associated with the lower 16 lines, what is causing this error?  Now, looking at the MAX "Device Routes" tab for the card, it shows that PFI4 and PFI5 can be routed to the "sample clock timebase," but not the "sample clock" -- is that the problem?  How do I export my input clock on PFI5 / PCLK2?
Thanks, LarryHi Larry,1. DAQmx doesn't allow you to reassign groups to different ports.&nbsp; This leaves you with a few options: do not upgrade from traditional daq, change your fixture, or upgrade to the <a href="http://sine.ni.com/nips/cds/view/p/lang/en/nid/202772" target="_blank">NI-6536/7</a> and get the NI-653x cable adapter (p/n 195846-01) (This cable adapter is a terminal block that connects the data lines, but there are screw terminals for the 6533 PFI and 6536 PFI lines).&nbsp; My apologies for this incompatibility.2. The clock reverse property specifies whether the burst clock is internally generated and exported; or if the burst clock is an external clock.3. For terminal names, if you specify the device name, you need a leading forward slash, "/dev2/pfi4", ought to work.&nbsp; Also, you can just specify the terminal name without the device name, "pfi4".&nbsp; Terminal names without the leading forward slash are have a default device which is the device of the DAQmx task.Jeff
Loading...