Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger delay from Python to NetStation 4.5.1 #1

Open
AntoineBellemare opened this issue Sep 25, 2019 · 1 comment
Open

Trigger delay from Python to NetStation 4.5.1 #1

AntoineBellemare opened this issue Sep 25, 2019 · 1 comment

Comments

@AntoineBellemare
Copy link

We are trying to send triggers from a stimulation computer to NetStation 4.5.1. NetStation is installed on a Mac OSX system. We tried with both Linux and Windows10 stim computers.
The two computers are connected with an Ethernet cable.
We are able to send the trigger using this script, but a delay of around 150ms (we didn't measured it exactly) constantly occurs. The delay seems variable as well. We observed the delay by comparing the apparition of the event in the log window of NetStation with the 'print' in Python
We will try to perform this test locally (with only one computer) to better tackle the problem
Any advice would be greatly appreciated.

import time
import numpy as np
import copy
import egi.simple as egi

​ns = egi.Netstation()
ns.connect('10.10.10.122', 55513)
ns.BeginSession()

​
def trigger_write(code='testev'):
    ns.sync()
    ns.send_event(code)
    return

for ii in range(50):
    trigger_write(str(ii))
    print('tip')
    time.sleep(1)
@imnotamember
Copy link
Owner

Hi Antoine,

Sorry for the delay. Apparently I had notifications off for this repo. I'll follow up later today when I'm free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants