Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PCIe-6537 signal routing

How do I route the sample clock of a PCIe-6537 to the RTSI bus in a way not associated with a task (using C function calls). Here is what I have:
 
DAQmxConnectTerms("Dev2/20MHzTimebase","Dev2/RTSI7",DAQmx_Val_DoNotInvetPolarity);
 
Get error:
 
DAQmx Error: Terminal for the device is invalid
Terminal: Dev2/20MHzTimebase
 
Status Code: -89129
 
Ok, that is fine.... I have the wrong terminal name. Well what is the correct terminal name then. I have read all of the DAQmx and 6537 help as I can stand and nowhere is the correct terminal name give. Plenty of overall discussions and diagrams on all of the wonderful ways to generate a clock and route the clock......but nowhere is their the correct syntax or a example given!
 
Help please!!!!!!!!!!!!!!!!!1
 
0 Kudos
Message 1 of 4
(4,061 Views)


@FrustratedwithDAQmxHelp wrote:
How do I route the sample clock of a PCIe-6537 to the RTSI bus in a way not associated with a task (using C function calls). Here is what I have:
 
DAQmxConnectTerms("Dev2/20MHzTimebase","Dev2/RTSI7",DAQmx_Val_DoNotInvetPolarity);
 
Get error:
 
DAQmx Error: Terminal for the device is invalid
Terminal: Dev2/20MHzTimebase
 
Status Code: -89129
 
Ok, that is fine.... I have the wrong terminal name. Well what is the correct terminal name then. I have read all of the DAQmx and 6537 help as I can stand and nowhere is the correct terminal name give. Plenty of overall discussions and diagrams on all of the wonderful ways to generate a clock and route the clock......but nowhere is their the correct syntax or a example given!
 
Help please!!!!!!!!!!!!!!!!!1
 


If you are trying to generate a continuous pulse train, you'll need to use a DAQmx Task to export the sample clock:

DAQmxCreateTask("", &task_handle);

DAQmxCreateDOChan(
            task_handle,
            "Dev2/port0",
            "",
            DAQmx_Val_ChanForAllLines);

/* use pipelined sample clock so the clock is free running */
DAQmxCfgPipelinedSampClkTiming(
            task_handle,
            "", /* clock source, empty string is onboard */
            50.0e6, /* sample clock rate */
            DAQmx_Val_Rising,
            DAQmx_Val_ContSamps,
            10000);

DAQmxSetExportedSignalAttribute(
            task_handle,
            DAQmx_Exported_SampClk_OutputTerm,
            "RTSI7");

DAQmxSetExportedSignalAttribute(
            task_handle,
            DAQmx_Exported_SampClk_Pulse_Polarity,
            DAQmx_Val_ActiveHigh);

/* committing the task will export the clock */
DAQmxTaskControl(
            task_handle,
            DAQmx_Val_Task_Commit);

@/* after the task is cleared, the sample clock export @ RTSI7 will still
   be toggling */

DAQmxClearTask(task_handle);

Good luck,

Jeff
Message 2 of 4
(4,059 Views)

jcaronell,

Thanks for you quick reply. Unfortuantely this does not quite to what I wanted. I have several questions about your code.

1. Where are these functions described? Am I missing some docuement? I have all of the elp that came with DACmx 8.3.1 but no where do I see DAQmxSetExportedSignalAttribute described or  DAQmx_Exported_SampClk_OutputTerm defined.

2. I am trying to pickup the RTSI bus clock to feed it to a PCI-6533 PCLK2 signal. I see now from the Traditional PCI-6533 documentation (which seems to be easier to understand than the DAQmx documentation) that I cannot use RTSI7 for anything but the 20MHz master clock. Thus I wish to use RTSI6. Now when I try:

DAQmxSetExportedSignalAttribute( task_handle, DAQmx_Exported_SampClk_OutputTerm, "RTSI7");

I do not get and error. However when I try

DAQmxSetExportedSignalAttribute( task_handle, DAQmx_Exported_SampClk_OutputTerm, "RTSI6");

I get

Error: Specific route cannot be satisfied, because the hardware does not support it..

I thought I could route the sample clock to any RTSI line. Can I not?

Thanks again

0 Kudos
Message 3 of 4
(4,051 Views)
RTSI6 is not a supported destination for the synchronous exported sample clock.  Page 6 of the specifications(http://www.ni.com/pdf/manuals/374373b.pdf) has a complete list of to where the sample clock may be routed:

Exported
Sample clock
destinations

Generation
1. PFI 4
2. RTSI 7
(PCI Express only)
PXI_TRIG7
(PXI Express only)
3. PXIe_DSTARC
(PXI Express only)

Acquisition
PFI 5

You can export the sample clock timebase to RTSI6 or I believe you may also use a DAQmx connect to connect RTSI7 to RTSI6.  The result would add skew in the clock relative to your data but if you're just using it for clock routing then it may work.
0 Kudos
Message 4 of 4
(4,035 Views)