mariusgreuel / dwfpy Goto Github PK
View Code? Open in Web Editor NEWDigilent WaveForms for Python
License: MIT License
Digilent WaveForms for Python
License: MIT License
Hi @mariusgreuel! Could you please confirm the functionality of data recording on dwfpy?
I would like to simultaneously record information for 7 digital input channels.
From what I can understand, the following line of code:
logic.record(sample_rate=10e3, sample_format=32,sample_count=SAMPLE_COUNT // 2,prefill=SAMPLE_COUNT // 2, start=True)
records only a single np.ndarray with the number of specified samples. How does the API decide which channel to record, and how do I selectively record a specific digital-input.
Your help would be highly appreciated.
After downloading the source and trying to make edits to duplicate instances of AnalogDiscovery2 and ANALOG_DISCOVERY2 to include references to the new AD3, I still wound up with some issues access the device with the dwfpy package. With that said, all is not lost. For those interested the core functionality appears to still be maintained with the core dwf.Device class. I'm sure there is some functionality that is lost but it can still work to some degree.
I didn't go through all of the examples, but for my limited usage (i.e., just the waveform out channels and the scope functions), the following appears to work:
with dwf.Device() as device:
print(f'Found device: {device.name} ({device.serial_number})')
scope = device.analog_input
wavegen = device.analog_output
##....Do your thing....
Is it possible to use the digital input trigger to start the acquisition of the analog channels? I know this is possible via Waveforms, but I would like to acquire data in a more defined fashion. The analog_in_record.py example uses either channel 0 or 1 for the trigger:
scope[0].setup(range=5)
scope.setup_edge_trigger(
mode='normal', channel=0, slope='rising', level=0, hysteresis=0.01, position=-0.25
)
recorder = scope.record(sample_rate=100e3, length=2, configure=True, start=True)
Is there a way to change the trigger channel source to logic.setup_trigger(source='detector-digital-in')
or an equivalent digital pin?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.