Skip to content

tekscope starting issue (with solution) #64

@ispielma

Description

@ispielma

The bug is when blacs starts it throws an error having to do with starting h5_lock before h5.

The beginning of the blacs worker file currently looks like:

import time
import numpy as np
from blacs.tab_base_classes import Worker
import labscript_utils.properties

class TekScopeWorker(Worker):
def init(self):
global h5py; import labscript_utils.h5_lock, h5py
global TekScope
from .TekScope import TekScope
self.scope = TekScope(self.addr, termination=self.termination)
manufacturer, model, sn, revision = self.scope.idn.split(',')
assert manufacturer.lower() == 'tektronix'
"Device is made by {:s}, not by Tektronix, and is actually a {:s}".format(manufacturer, model)
print('Connected to {} (SN: {})'.format(model, sn))

But it should be like:

import time
import numpy as np
import labscript_utils.h5_lock
import h5py

from blacs.tab_base_classes import Worker
import labscript_utils.properties

class TekScopeWorker(Worker):
def init(self):
global TekScope
from .TekScope import TekScope
self.scope = TekScope(self.addr, termination=self.termination)
manufacturer, model, sn, revision = self.scope.idn.split(',')
assert manufacturer.lower() == 'tektronix'
"Device is made by {:s}, not by Tektronix, and is actually a {:s}".format(manufacturer, model)
print('Connected to {} (SN: {})'.format(model, sn))

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions