Jump to content

Moj

Members
  • Posts

    13
  • Joined

  • Last visited

Moj's Achievements

Member

Member (2/4)

2

Reputation

  1. Dears, Analog Discovery 2 (AD2) can simultaneously generate a signal and measure the response of my circuit to this signal when it is connected to my laptop. However, AD2 can't do the same task when it is connected to the Raspberry Pi 4 (RP). In the other words, It hangs. If I reduce the sampling frequencies of the scopes and the wave generator, it works but many data are lost and corrupted. I would be thankful if you help me solve this problem. Thank you very much in advance! Moj ********************************************************************** Here are some details you may need to know: ****Description of the task that can be successfully done by AD2+ laptop, but AD2+RP hangs **At the same time, the wave generator plays a chirp and two scopes record the response of the circuit. **The sampling frequency of the wave generator is 0.5 Million samples per second. Since the duration of this task is 1 second, therefore the number of generated samples is 0.5 Million. **The sampling frequency for acquisition is 1.2 Million samples per second. The duration is 1 second. Since there are two scopes for reading the response, the number of read samples is 2x1.2 Million. ****Description of the task that AD2+RP can do but many data are lost or corrupted **Sampling frequency of the wave generator = Sampling frequency of the scopes = 0.2 million sample per second **Duration of task = 1 second ****My laptop spec **Operating system: Windows 10 Enterprise **System Type: 64-bit operating system, x64-based processor **Processor: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz 2.11 GHz **Installed RAM: 16,0 GB (15,9 GB usable) ****Raspberry Pi 4 spec **Operating system: Raspberry Pi OS with desktop, Debian version: 11 (Bullseye) **System Type: 32-bit **Processor: Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz **Installed RAM: 8GB LPDDR4-3200 SDRAM **********************************************************************
  2. @attila Hello, You are right. After increasing the sampling rate from 500e3 to 1.2e6 , the problem was solved. Thank you!
  3. Dear @attila I appreciate your time in preparing those two useful python codes for me. I only have one question for you. when I want to play and record a chirp between 160 kHz and 200 kHz, i.e., f1=160e3 and f2=200e3, I get different voltage amplitude. To explain more, the peak-to-peak amplitude of this chirp in theory should be 2 volts, but during the measurement, it drops down. The amount of this reduction is not always constant. for example in Figure 1, the peak-to-peak amplitude is 1.1 volt while in another try it is 1.6 v. Is it possible to solve this problem? Just so you know, I connect the analog discovery 2 to my laptop through the USB cable that you provided in the box. For your information, the delay problem is not as severe as in the past, but there is still a little delay (please see Figure 1 in the box - There is approximately 1000 sample delay). Thank you very much.
  4. Hello @attila @reddish Thank you for your replies and "Happy New Year"! I wanted to use two threads to solve a problem. But you mentioned that my solution is not practical. So I explain the main problem. My goal is to generate a signal and read it simultaneously using Analog discovery 2 + Python. For this, I selected the trigger source of AnalogIn as follows: dwf.FDwfAnalogInTriggerSourceSet(hdwf, c_int(7)) # trigsrcAnalogOut1 dwf.FDwfAnalogInTriggerConditionSet(hdwf, c_int(2)) The sampling frequency for AnalogIn and AnalogOut is 800e3. The number of samples of this signal is 4000, Figure-left. I selected 4000 because I know that the buffer size of analog discovery 2 is more than 4000. when I run the code, I see a delay in the measured signal, Figure-right. The amount of delay is not fixed. I mean that it fluctuates. The python code has been attached. Please let me know how I can remove this delay. I appriciate your time in advance! Python_code.py
  5. Hello everyone, I want to connect an analog discovery 2 to a CORE i7 laptop. Then, I want to play a signal using one core, and record this signal using another core. But I get this error: "Devices are busy, used by other applications". I would be thankful if you help me to solve this problem. If you need more information, I use the the attached python code. This code is a combination of "Admittance_player.py" and "AnalogIn_Record.py" exisiting in sample/py. Thank you! one.py
  6. Hello@JColvin Is there any python code for switching in the "sample" folder? Thank you
  7. Dear all, I am a beginner and have a question about multiplexing. I thank you very much in advance for reading this long question. I have an analog disovery 2, and I do some measurement on one circuit, as shown in Fig.1. Now, I want to do the same measurement on eight circuits one after the other, as shown in Fig.2. The wave generator generates a chirp. (start frequency=0 Hz, end frequency = 200 kHz, duration = 2 sec) Now, I have below questions: 1- Can Analog discovery 2 play the rule of a multiplexer? 2- If yes, could you please help me how to do that? 3- If yes, is there any appropriate python code in "Digilent\WaveFormsSDK\samples\py"? 4- If No, Could you please intoduce me an approriate multiplexer? Energy consumpption is important for my project, therefore digital multiplexers are better. For your information: 1- The analog discovery 2 is connected to a Raspberry PI 4. 2-I am using Python to control the Analog discovery 2. Thank you very much again, Moj
  8. @attila Thank you very much! @Fausto Many thnaks!
  9. Hello everyone, I am running the sample code (AnalogOut_sweep.py). The only change that I made is to have an offset of zero instead of 1 volt. Sometimes, I get an unexpexted result (Please see the attachement). Could you please let me know what the reason is? Thank you in advance, Mojt
  10. Hello @Fausto Thank you for your response. I read it but it didn't mention how I can set the duration of data acquisition and sampling rate. Thank you Moj
  11. Hello all, I want to measure an analog signal. it has 10 second duration, and the desired sampling rate is 1 MHz. How can I do this using analog discovery 2? (I have already installed Waveform on my PC) Thank you
×
×
  • Create New...