Skip to content

Commit

Permalink
pxi6733: try to fix ping method
Browse files Browse the repository at this point in the history
  • Loading branch information
fallen committed Sep 4, 2015
1 parent 6e5b71a commit 7dfd11e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions artiq/devices/pxi6733/driver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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 numpy as np
Expand Down Expand Up @@ -50,11 +50,13 @@ def _done_callback(self, taskhandle, status, callback_data):

def ping(self):
try:
data = (c_ulong*1)()
self.daq.DAQmxGetDevSerialNum(self.device, data)
data_len = 128
data = create_string_buffer(data_len)
self.daq.DAQmxGetSysDevNames(data, data_len)
print("data == {}".format(data.value))

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Sep 4, 2015

Member

Please do not leave debug prints in committed code. You should use logger.debug for this or remove it entirely.

This comment has been minimized.

Copy link
@fallen

fallen Sep 4, 2015

Author Contributor

It's for debug purpose, I replaced with logger.debug, thanks!

except:
return False
return True
return data.value != ""

def load_sample_values(self, sampling_freq, values):
"""Load sample values into PXI 6733 device.
Expand Down

0 comments on commit 7dfd11e

Please sign in to comment.