Skip to content

Rsync correct code #115

Answered by ThomasAkam
LiliVig asked this question in Q&A
Jan 11, 2024 · 4 comments · 2 replies
Discussion options

You must be logged in to vote

You don't need to define the Rsync class but you do need to import it, which is usually done with from devices import *.

This is code for a minimal example task that generates rsync pulses:

from pyControl.utility import *
from devices import *

# Define hardware (normally done in seperate hardware definition file).

board = Breakout_1_2()  # Instantiate the breakout board object
sync_output = Rsync(pin=board.BNC_1, mean_IPI=5000)  # Instantiate Rsync output

# States and events.

states = ["state_1"]

events = ["rsync"]

initial_state = "state_1"

# State behaviour functions

def state_1(event):
    pass

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@LiliVig
Comment options

@ThomasAkam
Comment options

Answer selected by ThomasAkam
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants