# External Trigger (digitalio) Problems

**URL:** <https://psychtoolbox.discourse.group/t/external-trigger-digitalio-problems/324>\
**Category:** Uncategorized\
**Created:** [May 23, 2013, 11:01am UTC](https://psychtoolbox.discourse.group/t/external-trigger-digitalio-problems/324 "2013-05-23T11:01:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [May 23, 2013, 11:01am UTC](https://psychtoolbox.discourse.group/t/external-trigger-digitalio-problems/324/1 "2013-05-23T11:01:44Z")

</div>

I need to send an external trigger from my computer to a TMS Magstim device.  
  
I have previously 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!
