Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Duplicate Channel Setting #13

Open
TommyCox opened this issue Jan 29, 2020 · 0 comments
Open

Duplicate Channel Setting #13

TommyCox opened this issue Jan 29, 2020 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@TommyCox
Copy link
Contributor

TommyCox commented Jan 29, 2020

There appears to be redundant adding of channels. The initialize function adds channels when passed to the first parameter (line 25), but a few lines below the channels are added again using a loop (lines 27-28).

# Initialize DAQ
self.daq.initialize(["cDAQ1Mod1/ai0"],
sample_rate=self.sample_rate, samples_per_chan=num_samples)
for i in range(len(self.output_ports)):
self.daq.add_channel(self.output_channel_list[i])

Personally I think it would be better to let the instrument controller module add the channels internally, and simply send a list of integers denoting which channels to enable. That would make future movement to a generic module easier. What do you think?

@TommyCox TommyCox added the question Further information is requested label Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants