Jump to content

lokobob99

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by lokobob99

  1. Hey everyone, I wanted to ask, whether you could tell me the main differences between the Analog Discovery 2 and the Analog Discovery 3. In other words, when would you consider an upgrade and why? Thanks in advance! Kind regards,
  2. Hello everybody, I'm currently using the Analog Discovery 2 and was wondering, if you could help me with a question: The official specs of the Analog Discovery 2 list, that the Analog Discovery 2 has a Sample Rate of 100 MS/s. Now my task is to record a digital signal and send the data via sockets to a website. For that, I need to make calculations on the required bandwith. Now for that I have to know, how big the size of one sample is. Is it 1 Bit (because digital signal can only be 1 or 0)? And what would be the size of an sample of an analog signal? Thanks in advance! Kind regards,
  3. Hello everyone, I have a simple question about the DigitalIn_ScanScreen.py inside the WaveForms SDK for the Analog Discovery 2. Inside the code there is a variable called hzAcq. Is that the sample rate of the recording? Or is it the divider for calculating the sample rate? So for example if you set the variable hzAcq to 1000 it doesn't mean that the signal sample rate is 1 kHZ? Appreciating any help! Kind regards,
  4. Hey everyone, I just read in my newsletter, that you guys are about to release the Analog Discovery 3. Now my question is: Is the WaveForms SDK, which is used for the Analog Discovery 2, compatible to the Analog Discovery 3? So basically, is it possible to use the functions, which I have wrote for the Analog Discovery 2, for the Analog Discovery 3? Thanks in advance! Kind regards,
  5. Hey @attila, thanks for the fast reply! It's not that I want to measure the sampling frequency of the signal. I would like to measure the signal in realtime and for that I would like to obtain one value at a time. Now when you use the record function of the logic analyzer instrument, you save an great amount of values into a buffer of a specific size. Would it be possible to set the buffersize to one, so that I would always obtain one value from one recording?
  6. Hey everybody, I wanted to ask, whether there is an available function in the WaveForms SDK to measure one sample of a digital signal (e.g. a PWM-signal on a LED). Thanks in advance! Kind regards,
  7. Nevermind, I found a simple solution: I'm just passing in the device_handle as a parameter to the module, where I want to link it to the Analog Discovery 2.
  8. Hey everyone, let's say I have two python modules: A module called 'A' and a module called 'B'. Now let's say for instance, that I establish a connection to the Analog Discovery 2 in module 'A' (device_data/handle). Now I would like to use some functionalities written in module 'B'. But if you establish a connection in module 'B' to the Analog Discovery 2 it obviously throws an error, since the device is already connected through module 'A'. So is there a way to transfer the device_handle to make it usable over multiple python modules? Any help would be appreciated! Kind regards
  9. Hello everyone, I was wondering, if someone could help me with this problem: I'm currently trying to record a PWM-Signal (digital signal) and display it on a dynamic chart on a website. For that, I'm currently using the Scan-Screen-Mode (see the gif below, how the signal is displayed at the moment) and send every single value through sockets to the frontend. Unfortunately, this method does not display the signal in realtime, since it is first recording the signal into a buffer. Now I wanted to ask, if there is an opportunity to measure the signal in realtime using the waveforms sdk. Thanks in advance! Kind regards,
  10. Hello everyone, I have a simple question: Is there a possibilty to check, whether the Analog Discovery 2 is already in use by another application/server using the WaveForms SDK? For example, if you open the Waveforms Software and then try to run a python script you get an error, since the Analog Discovery is already used by the software. This is the log of the error message: raise error(err_msg, err_func, err_inst) WF_SDK.device.error: Error: PythonSoftwareFoundation -> generate -> Invalid device handle provided Any help would be appreciated! Kind regards,
  11. Hey @attila, thanks for the reply! So you mentioned data processing: I would assume the first step is to measure the signal and save the values in a buffer of a certain size (e.g. 4096 values). Do you have a hint of what to do next? I would also assume you also need the sampling rate/frequency. Kind regards,
  12. Hey @attila, thanks for the answer. I'm using an Analog Discovery 2 would, that be possible with this device? :) Kind regards,
  13. Hello everyone, I have a simple question: Lets say for example you have a simple LED, which runs with a pwm-signal and a frequency of 100kHz. Is it possible to use the waveforms sdk to get the frequency (100kHz) of the LED and save it in a variable (e.g. in Python). Thanks in advance! Kind regards,
  14. Edit: This also happens, when I first start the script. After some time (like about 4 seconds), it changes to the correct values.
  15. Hello everyone, I have created a function, which reads out a digital signal on one of the 16 DIO-Channels of the Analog Discovery 2. I have used the Scan Screen Mode of the API and used the AnalogIn_ScanScreenMode.py example as a starting point. Now I have a problem: When I try to read out channel 3 for example, it shows the corresponding example. But sometimes it just reads out the value: 34754 and other values, which are not logically explainable. Normally I expect values to either be 1 or 0 (since it is a digital signal). Maybe you have an answer, why that happens. The Analog Discovery 2 has a ground connection to the connected circuit. Kind regards
  16. Hi attila, thanks for the answer! Wow that sounds unfortunate, do you know whether the so called Banana Pi would be compatible with the AD2, which is based on the Raspberry Pi 4 architecture? Kind regards,
  17. Hey everybody, I just wanted to ask whether it is possible to use the Analog Discovery 2 with the Raspberry Pi 3. I have read that the device is compatible with the Raspberry Pi 4, but since there is a shortage on Pi 4's, I wanted to know if it is usable with its predecessor. Thanks in advance! Kind regards,
  18. Hello everyone, I have a question: I want to analyze a PWM-signal of e.g. an Arduino LED. Now I would like to use the Waveforms SDK to continously measure the PWM-signal. I furthermore want to display the PWM-signal in livetime (dynamic) on a website (see picture below). For that I want to send the results of the measurement via socket to the frontend. Is there any possibility to do this, or maybe do you have a simple example of continous measurement. Because what I saw in the Waveforms SDK example folder is only a method to record a signal in a buffer array (for example buffer size 4096), but that would not allow the possibility of a realtime measurement. Thanks in advance!
  19. Hey attila, thanks for the answer! Is there any example for a continuos measurement of a digital signal with the Waveforms SDK in Python? :) And basically you should be able to get every single value of the measurement so that you could possible send it over a socket to a frontend.
  20. Hello everyone, I have a simple question. Is it possible to use the WaveForms SDK and continously record a signal and instantly push every read value through a websocket like SocketIO? The aim for me is to show a dynamic livetime pwm graph on a website. Thank you very much. Kind regards,
  21. Ok nevermind, I forgot to first use the COPY command. So now my dockerfile looks like this: # syntax=docker/dockerfile:1 FROM python:3.8-slim-buster WORKDIR /FlaskVueServer RUN apt-get update && apt-get install -y git COPY digilent.adept.runtime_2.27.9-amd64.deb digilent.adept.runtime_2.27.9-amd64.deb RUN dpkg -i ./digilent.adept.runtime_2.27.9-amd64.deb ADD function_generator.py /FlaskVueServer/function_generator.py ADD oscilloscope.py /FlaskVueServer/oscilloscope.py ADD dwfconstants.py /FlaskVueServer/dwfconstants.py ENV LD_LIBRARY_PATH=/usr/lib/libdwf.so COPY requirements.txt requirements.txt RUN pip3 install -r requirements.txt COPY . . CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"] But now when I try to install the file, I get an error message (look at the screenshot below). Any help would be appreciated.
  22. Hey @attila, thanks for the answer. So I have downloaded those to files (.deb). Now I have added them to my Dockerfile, so my dockerfile looks like this: # syntax=docker/dockerfile:1 FROM python:3.8-slim-buster WORKDIR /FlaskVueServer RUN apt-get update && apt-get install -y git RUN dpkg -i ./digilent.adept.runtime_2.27.9-amd64.deb RUN dpkg -i ./digilent.waveforms_3.19.5_amd64.deb ADD function_generator.py /FlaskVueServer/function_generator.py ADD oscilloscope.py /FlaskVueServer/oscilloscope.py ADD dwfconstants.py /FlaskVueServer/dwfconstants.py ENV LD_LIBRARY_PATH=/usr/lib/libdwf.so COPY requirements.txt requirements.txt RUN pip3 install -r requirements.txt COPY . . CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"] I have put the two files in the same directory as the dockerfile. When I try to build this dockerfile, there is an error occuring: dpkg: error: cannot access archive './digilent.adept.runtime_2.27.9-amd64.deb': No such file or directory Maybe you can help me. Thank you!
  23. Hello everyone, I just wanted to ask, how it is possible to add a shared library to the Docker container. So in this case it is the libdwf.so library that can't be found by the docker container (OSError: libdwf.so: cannot open shared object file: No such file or directory) Thanks for any help!
  24. Ok I have solved the problem by just adding the GitHub link into the requirements.txt :D But now I have another problem: Whenever I start the container, I get the following error message: Traceback (most recent call last): File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.8/site-packages/flask/__main__.py", line 3, in <module> main() File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 1047, in main cli.main() File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 911, in run_command raise e from None File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 897, in run_command app = info.load_app() File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 312, in load_app app = locate_app(import_name, None, raise_if_not_found=False) File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 218, in locate_app __import__(module_name) File "/FlaskVueServer/app.py", line 23, in <module> import function_generator File "/FlaskVueServer/function_generator.py", line 27, in <module> from WF_SDK import device, logic, pattern, wavegen File "/usr/local/lib/python3.8/site-packages/WF_SDK/__init__.py", line 5, in <module> from WF_SDK import device File "/usr/local/lib/python3.8/site-packages/WF_SDK/device.py", line 40, in <module> dwf = ctypes.cdll.LoadLibrary("libdwf.so") File "/usr/local/lib/python3.8/ctypes/__init__.py", line 451, in LoadLibrary return self._dlltype(name) File "/usr/local/lib/python3.8/ctypes/__init__.py", line 373, in __init__ self._handle = _dlopen(self._name, mode) OSError: libdwf.so: cannot open shared object file: No such file or directory I think it has something to do with the last line: the socalled libdfw.so cannot be opened in the container. This is the content of my Dockerfile: FROM python:3.8-slim-buster WORKDIR /FlaskVueServer RUN apt-get update && apt-get install -y git ADD function_generator.py /FlaskVueServer/function_generator.py ADD oscilloscope.py /FlaskVueServer/oscilloscope.py ADD dwfconstants.py /FlaskVueServer/dwfconstants.py COPY requirements.txt requirements.txt RUN pip3 install -r requirements.txt COPY . . CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"] Any help would be appreciated. Kind regards
  25. Hey everyone, I have a problem: I'm trying to dockerize an application which uses the WF_SDK package. The problem is, that Docker seems to not be able to install the WF_SDK out of the requirements.txt (See picture below). Any help would be appreciated.
×
×
  • Create New...