필터 지우기
필터 지우기

addclock generates Error "Timeout expired before operation could be completed."

조회 수: 5 (최근 30일)
Perry Robertson
Perry Robertson 2020년 8월 3일
답변: Aman Vyas 2020년 8월 12일
I am writing data to an NI PXIe-6536 (supported by data acquisition toolbox). Having trouble connecting the clock and get various errors upon write(). I have tried three different ways to addclock(), the most promising gave the error "Timeout expired before operation could complete." I have tried to connect to two different clock sources. Is there anyway to understand what is going on inside the hardware. I can't find an example where anyone has used this card.
clc
clear all
close all
daq = daq('ni');
% set the scan rate for the card, 1 MHz
daq.Rate = 1000000;
ch0 = addoutput(daq,"PXI1Slot13","port0/line0","Digital"); % Digital I/O
% Attempting to add the clock, get different errors for these attempts
%ck1 = addclock(daq,"ScanClock","PXI1Slot13/PXI_Star","External"); % Cannot start because the clock for digital output channel 'port0/line0' from 'PXI1Slot13' is not configured.
% Add a clock imported from an external source.
ck1 = addclock(daq,"ScanClock","External","PXI1Slot13/PXI_Star"); % Timeout expired before operation could complete.
% Add a clock imported from an external source.
%ck1 = addclock(daq,"ScanClock","External","PXI1Slot13/200MhzTimebase"); % Hardware does not support the specified connection.
scanData = zeros(64,1);
write(daq,scanData);

답변 (1개)

Aman Vyas
Aman Vyas 2020년 8월 12일
Hi,
You can check if you have added wrong clock connection with wrong port. You can try running command terminals and use other terminal to clock connection and see if error still persists.
After this code part :
ck1 = addclock(daq,"ScanClock","External","PXI1Slot13/PXI_Star");
Try running this:
data = startForeground(s);
You can also take a look at this question

카테고리

Help CenterFile Exchange에서 Data Acquisition Toolbox Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by