mirror of https://github.com/m-labs/artiq.git
pxi6733: try to fix ping method
This commit is contained in:
parent
6e5b71a43e
commit
7dfd11e2f0
|
@ -1,6 +1,6 @@
|
||||||
# Yann Sionneau <ys@m-labs.hk>, 2015
|
# Yann Sionneau <ys@m-labs.hk>, 2015
|
||||||
|
|
||||||
from ctypes import byref, c_ulong
|
from ctypes import byref, c_ulong, create_string_buffer
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -50,11 +50,13 @@ class DAQmx:
|
||||||
|
|
||||||
def ping(self):
|
def ping(self):
|
||||||
try:
|
try:
|
||||||
data = (c_ulong*1)()
|
data_len = 128
|
||||||
self.daq.DAQmxGetDevSerialNum(self.device, data)
|
data = create_string_buffer(data_len)
|
||||||
|
self.daq.DAQmxGetSysDevNames(data, data_len)
|
||||||
|
print("data == {}".format(data.value))
|
||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
return True
|
return data.value != ""
|
||||||
|
|
||||||
def load_sample_values(self, sampling_freq, values):
|
def load_sample_values(self, sampling_freq, values):
|
||||||
"""Load sample values into PXI 6733 device.
|
"""Load sample values into PXI 6733 device.
|
||||||
|
|
Loading…
Reference in New Issue