3 Commits

Author SHA1 Message Date
wendtalexander
0113e94625 [dataio/nix] adding comments 2024-11-04 08:04:20 +01:00
wendtalexander
cce7c55fe7 [daq] trying different channels 2024-10-25 18:03:43 +02:00
wendtalexander
6c49f19b43 [dataio/daq] updating log messages 2024-10-25 18:03:23 +02:00
3 changed files with 10 additions and 5 deletions

View File

@@ -21,7 +21,6 @@ class DaqProducer:
self.device = device
self.ai_device = self.device.get_ai_device()
self.channels = channels
self.stop = False
def read_analog_continously(
@@ -163,9 +162,11 @@ class DaqProducer:
log.debug(daq_status)
chunk_size = transfer_status.current_total_count - prev_count
log.debug(transfer_status.current_index)
log.debug(transfer_status.current_total_count)
log.debug(transfer_status.current_scan_count)
log.debug(f"DAQ current index {transfer_status.current_index}")
log.debug(f"DAQ total count {transfer_status.current_total_count}")
log.debug(
f"DAQ Samples per channel {transfer_status.current_scan_count}"
)
log.debug("Appending last chunk")
if prev_index + chunk_size > len(data_in) - 1:
@@ -221,6 +222,7 @@ class DaqProducer:
]
log.info("stopping")
log.debug(self.buffer.totalcount())
log.debug(self.ai_device.get_scan_status())
break
break

View File

@@ -68,6 +68,9 @@ class NixWriter:
log.debug(f"Samples written {index}")
def _write_header(self):
"""
Writing the header of the nix file
"""
self.nix_file = nixio.File.open(path="data.nix", mode=nixio.FileMode.Overwrite)
self.block = self.nix_file.create_block("recording", "testfile")
self.data_array = self.block.create_data_array(

View File

@@ -100,7 +100,7 @@ class PyRelacs(QMainWindow):
if self.mccdaq:
log.debug("Creating Daq Generator")
self.daq_producer = DaqProducer(self.buffer, self.mccdaq.daq_device, [1, 2])
self.daq_producer = DaqProducer(self.buffer, self.mccdaq.daq_device, [4, 5])
log.debug("Creating Sinus Generator")
self.sinus_producer = SinProducer(self.buffer)