# 2 parallel ports to 2 TMS coils

**URL:** <https://discourse.psychopy.org/t/2-parallel-ports-to-2-tms-coils/2985>\
**Category:** Builder\
**Created:** [August 31, 2017, 6:17am UTC](https://discourse.psychopy.org/t/2-parallel-ports-to-2-tms-coils/2985 "2017-08-31T06:17:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stramacciadf](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@stramacciadf](https://discourse.psychopy.org/u/stramacciadf)\
**Post date:** [August 31, 2017, 6:17am UTC](https://discourse.psychopy.org/t/2-parallel-ports-to-2-tms-coils/2985/1 "2017-08-31T06:17:10Z")

</div>

OS: Ubuntu (Xenial)  
PsychoPy version: 1.83.04  
What are you trying to achieve?: Send triggers to 2 parallel ports, one at once, depending on trial type

Hello, I have two types of trials in my experiment and I am trying to set up parallel port triggers to “fire” two TMS coils.  
Depending on which trial is presented, I need to send a trigger to either parallel ports, each of them connected to a different TMS coil.  
Having worked in builder mode so far, I checked whether the parallel port specification field in the relevant object could be used dynamically, but that is not the case.  
Therefore, I guess that I could use code snippets to check which type the current trial belong (from my stimuli spreadsheet), and send a trigger to the respective parallel port (with a 500ms from trial onset).  
Any advice on the code bits that would allow me to do so? I could not find examples that really matched my current design, and I don´t have much experience with parallel ports altogether.

---

<div class="post-metadata">

**Author:** ![chenglin\_li](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/chenglin_li/32/5452_2.png) [@chenglin\_li](https://discourse.psychopy.org/u/chenglin_li)\
**Post date:** [December 6, 2018, 12:43pm UTC](https://discourse.psychopy.org/t/2-parallel-ports-to-2-tms-coils/2985/2 "2018-12-06T12:43:19Z")

</div>

Hello, I want to ask whether you solved this problem?  
Now I want to create a TMS experiment, but I have no experience with the program. so could you give some guideline and help me to solve my problem?  
the link of my problem is [How to use PsychoPy Builder to create a TMS experiment?](https://discourse.psychopy.org/t/how-to-use-psychopy-builder-to-create-a-tms-experiment/6030)  
Thank you very much!

---

<div class="post-metadata">

**Author:** ![stramacciadf](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@stramacciadf](https://discourse.psychopy.org/u/stramacciadf)\
**Post date:** [January 10, 2019, 10:32am UTC](https://discourse.psychopy.org/t/2-parallel-ports-to-2-tms-coils/2985/3 "2019-01-10T10:32:50Z")

</div>

Hi chenglin\_li, sorry for the late reply, I have been away for a while. Did you manage to build your TMS experiment or do you still need help? In the end I was able to figure out my setup and run the study.

---

<div class="post-metadata">

**Author:** ![chenglin\_li](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/chenglin_li/32/5452_2.png) [@chenglin\_li](https://discourse.psychopy.org/u/chenglin_li)\
**Post date:** [January 10, 2019, 10:47am UTC](https://discourse.psychopy.org/t/2-parallel-ports-to-2-tms-coils/2985/4 "2019-01-10T10:47:52Z")

</div>

Yes, I need your help. If you can, I hope you can send it to me through the e-mail([lichenglin105@gmail.com](mailto:lichenglin105@gmail.com)). Of course, if you’d like, you also through the discourse to help me.  
Best wishes,  
Chenglin
