Effacer les filtres
Effacer les filtres

MATLAB DAQ External Trigger (digitalio) Not Working

2 vues (au cours des 30 derniers jours)
S Stron
S Stron le 21 Mai 2013
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!

Réponses (0)

Catégories

En savoir plus sur Digital Input and Output dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by