取消
显示结果 
搜索替代 
您的意思是: 

How can I guarentee my two PXIe-6396 cards are using PXIe_CLK100 from PXIe-1083 rather than onboard oscillator for clock?

已解决!
转到解答

Hello,

I am using the "NI-DAQ™mx C Reference" functions through a MATLAB interface to control my cards. I have a PXIe-1083 chassis with two PXIe-6396 cards. I want to synchronize analog inputs and digital outputs between the two cards. I want the cards to use the PXIe_CLK100 signal supplied from the chassis rather than the on-card oscillators so that I can guarentee that all clocks on the two cards are derived from the same 100 MHz signal (PXIe_CLK100) and are thus synchronized. From the X series manual I see this is possible:

V_lab_0-1722968857160.png

 

I want to setup something like this:

V_lab_1-1722969153320.png

 

So my question is this -> how can I force the cards to use the PXIe_CLK100 signal using the functions provided in the  "NI-DAQ™mx C Reference" through MATLAB? I couldn't find a function to assign this.

 

An alternate approach I was thinking was that I can route the PXI_CLK10 to an RTSI channel using the name format, "/PXI1Slot2/PXI_CLK10", which works fine and then map that to ai/sampleclock (Terminal Names - NI), but I'm not entirely sure that this would work.

 

Any ideas? Seems like a simple thing I am missing (i.e. a function).

 

Thanks!

0 项奖励
1 条消息(共 4 条)
936 次查看
解答
已被主题作者 V_lab 接受

Refer to shipping example C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Synchronization\Multi-Device\Continuous AI

 

		case 2: // M Series Sharing Reference Clock for PXI Devices
			DAQmxErrChk (DAQmxSetRefClkSrc(masterTaskHandle,"PXI_Clk10"));
			DAQmxErrChk (DAQmxSetRefClkRate(masterTaskHandle,10000000.0));
			DAQmxErrChk (DAQmxSetRefClkSrc(slaveTaskHandle,"PXI_Clk10"));
			DAQmxErrChk (DAQmxSetRefClkRate(slaveTaskHandle,10000000.0));

Replace the ClkSrc with PXIe_Clk100 and ClkRate with 100M 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
2 条消息(共 4 条)
908 次查看

(I'm posting this as a screenshot because it blocked me from typing this out perhaps due to the code?):

V_lab_0-1723054402049.png

 

0 项奖励
3 条消息(共 4 条)
886 次查看

Hello,

 

I actually solved my issue. I just added the ref clock to all of the tasks on the same card. If you don't do this you may get the error -89137 "Specified property value cannot be used, because it requires resources that are currently in use.". 

 

Everything is working well now! 

0 项奖励
4 条消息(共 4 条)
881 次查看