Compare commits
3 Commits
2ef018ef07
...
datastream
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0113e94625 | ||
|
|
cce7c55fe7 | ||
|
|
6c49f19b43 |
@@ -21,7 +21,6 @@ class DaqProducer:
|
|||||||
self.device = device
|
self.device = device
|
||||||
self.ai_device = self.device.get_ai_device()
|
self.ai_device = self.device.get_ai_device()
|
||||||
self.channels = channels
|
self.channels = channels
|
||||||
|
|
||||||
self.stop = False
|
self.stop = False
|
||||||
|
|
||||||
def read_analog_continously(
|
def read_analog_continously(
|
||||||
@@ -163,9 +162,11 @@ class DaqProducer:
|
|||||||
log.debug(daq_status)
|
log.debug(daq_status)
|
||||||
chunk_size = transfer_status.current_total_count - prev_count
|
chunk_size = transfer_status.current_total_count - prev_count
|
||||||
|
|
||||||
log.debug(transfer_status.current_index)
|
log.debug(f"DAQ current index {transfer_status.current_index}")
|
||||||
log.debug(transfer_status.current_total_count)
|
log.debug(f"DAQ total count {transfer_status.current_total_count}")
|
||||||
log.debug(transfer_status.current_scan_count)
|
log.debug(
|
||||||
|
f"DAQ Samples per channel {transfer_status.current_scan_count}"
|
||||||
|
)
|
||||||
log.debug("Appending last chunk")
|
log.debug("Appending last chunk")
|
||||||
|
|
||||||
if prev_index + chunk_size > len(data_in) - 1:
|
if prev_index + chunk_size > len(data_in) - 1:
|
||||||
@@ -221,6 +222,7 @@ class DaqProducer:
|
|||||||
]
|
]
|
||||||
log.info("stopping")
|
log.info("stopping")
|
||||||
log.debug(self.buffer.totalcount())
|
log.debug(self.buffer.totalcount())
|
||||||
|
log.debug(self.ai_device.get_scan_status())
|
||||||
|
|
||||||
break
|
break
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ class NixWriter:
|
|||||||
log.debug(f"Samples written {index}")
|
log.debug(f"Samples written {index}")
|
||||||
|
|
||||||
def _write_header(self):
|
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.nix_file = nixio.File.open(path="data.nix", mode=nixio.FileMode.Overwrite)
|
||||||
self.block = self.nix_file.create_block("recording", "testfile")
|
self.block = self.nix_file.create_block("recording", "testfile")
|
||||||
self.data_array = self.block.create_data_array(
|
self.data_array = self.block.create_data_array(
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ class PyRelacs(QMainWindow):
|
|||||||
|
|
||||||
if self.mccdaq:
|
if self.mccdaq:
|
||||||
log.debug("Creating Daq Generator")
|
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")
|
log.debug("Creating Sinus Generator")
|
||||||
self.sinus_producer = SinProducer(self.buffer)
|
self.sinus_producer = SinProducer(self.buffer)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user