MATLAB DAQ External Trigger (digitalio) Not Working

조회 수: 3 (최근 30일)
S Stron
S Stron 2013년 5월 21일
I need to send an external trigger from my computer to a TMS Magstim device.
I have been advised that this is the code I need:
dio = digitalio('parallel','LPT1');
addline(dio,0:7,0,'out');
line = 1;
% Set value to 0 (low)
putvalue(dio.line(line),0);
% Set value to 1 (high)
putvalue(dio.line(line),1);
% Set value to 0 (low)
putvalue(dio.line(line),0);
However it doesn't seem to work! The code produces these lines:
Display Summary of DigitalIO (DIO) Object Using 'PC Parallel Port Hardware'.
Port Parameters:
Port 0 is port configurable for reading and writing.
Port 1 is port configurable for reading.
Port 2 is port configurable for reading and writing.
Engine status: Engine not required.
DIO object contains line(s):
Index: LineName: HwLine: Port: Direction:
1 'Pin2' 0 0 'Out'
2 'Pin3' 1 0 'Out'
3 'Pin4' 2 0 'Out'
4 'Pin5' 3 0 'Out'
5 'Pin6' 4 0 'Out'
6 'Pin7' 5 0 'Out'
7 'Pin8' 6 0 'Out'
8 'Pin9' 7 0 'Out'
But nothing happens on the machine end, even though it's set up to run.
If anyone has any advice I would be grateful!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Configure Simulation Conditions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by