Search the Community

Showing results for tags 'MATLAB'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • Add-on Boards
    • Scopes & Instruments
    • LabVIEW
    • FRC
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 22 results

  1. Hello everyone! I'm Harri, an EE Master's student. Me and my team are currently working on assignments for three different courses around the topics of FreeRTOS, digital filtering and hardware-in-the-loop with MATLAB and Simulink. We are using the Zybo Z7-10 board and Vivado/SDK v.2018.2. In the first project, we are trying to use the Xilinx port of FreeRTOS to run a control engineering state-space-model on the ARM side. The vision is to have the model, which is a DC-converter, run at 10 kHz and the output of the model is shown as PWM to the onboard RGB LED. The project should also have a menu system via UART/Ethernet or by buttons and switches. These should be mutually exclusive, so when one input method is in use, the other will be blocked. We are kind of puzzled with this one, because our initial plan was to enable interrupts for GPIO and UART and then have those either take a semaphore from the ISR or send a struct to a queue from ISR. So far using the xscugic and registering the interrupts has been a huge puzzle for us and the workflow around this is unclear to us. We have managed to get task notifications to work from button press to periodic task, but trying anything more than that e.g. queues seems to not work. Any help on these topics would be highly appreciated! The other two project are on digital filtering. We are simply trying to run some simple audio effects on the music from LINE/MIC IN -> OUR FILTER -> HPHOUT. We have used this example https://reference.digilentinc.com/learn/programmable-logic/tutorials/zybo-z7-dma-audio-demo/start as a starting point and got that to work. Now we would like to remove the DMA part and just add our filtering IP in the middle. The PS side and buttons would be used for simple visuals for amplitude on LEDs or enable/disable certain effects inside the block. Any guidance on this one? We have already read the audio codec manual/register map, but we are missing something. Also, if someone has experience with Mathworks MATLAB and Simulink and this Zybo Z7-10 board, that would be awesome, as the other project is actually more focused on the filter design part and not FPGA stuff. Also, our professor would be glad to have this kind of HIL setup demoed: https://se.mathworks.com/help/hdlcoder/examples/running-an-audio-filter-on-live-audio-input-using-a-zynq-board.html. We have tried following the setup guide for that one, but we are tripping at the point of connecting to the board and running the simulation. The SD card setup also is not well explained. I'm hoping to get help, ideas and inspiration from here! I'll be glad to also share the projects when they're done. Cheers, Harri
  2. I am kind of new on electronics. I am trying to set a trigger connection to analog discovery 2(AD2) from matlab. Since matlab has a supporting package of AD2 for data acquisition tool, I tried to set a trigger with the function addTriggerConnection() but i got the message You cannot use "addTriggerConnection" with Digilent hardware. Is there any other suggestions on how to trigger data Recording from matlab data acquisition tool for AD2.
  3. Hey there I'm thinking about to get a AD2 for my project and I want to make sure, if everything will be working fine. I want to achive a closed loop with the AD2. I want to set a PWM to control a motor though the Matlab Data Acquisition Toolbox and check simultaneously the pulse signals of the hall sensor with the ADC. Is this possible? The ADC should work with 10Ms/s to get the data. The PWM will be around 20KHz Square/Sinus output. Thanks in advance
  4. Hi, I'am currently using my AD2 in Matlab 2018b and altough I'm capable of using some functionalities (the ADCs, for ex), I couldn't find a way of setting the power supply. Which, by the way, is doable in Waveforms. Does anyone know how can I set the DC power supply from Matlab? Thank you in advance for your time!
  5. Hello For a project I have to analyze two analog signals at a frequency of 78.4 kHz. Sampling rate must be at least 1 MHz. I have a Analog Discovery 2, I generate for now a signal square of 100kHz. I can observe this signal but only on a few periods. I wish I could get them back on a spreadsheet excel in order to treat them with Matlab. I can get a spreadsheet excel, but only with 8000 values, or I would need 1M values. Is it possible with a Analog Discovery 2 ?
  6. I wish to use the Analog Discovery 2 as a power supply for a set up which will involve variable currents through a helmholtz coil configuration in order to model the Upper Atmosphere's Magnetic Field. I will be running a real time model in Simulink that will contain values of the magnetic field in several directions. I have the coils set up so that a known current, and thus voltage, should be able to create the magnetic field in the center, which will be detected by a magnetometer. I would like to send the Simulink values to the Analog discovery to alter the voltage output of the Analog Discovery accordingly so that the current in the coil setup can vary in real time, thus spoofing the magnetic field for the magnetometer. Is this something that is possible with the Analog Discovery 2.
  7. The MatLab DAQ toolbox support for Analog Discovery offers limited functionality, but the underlying WaveForms SDK functions can be accessed too. For manual and examples in Python and C++ see the SDK located in the default Windows installation path: - 32bit C:Program FilesDigilentWaveFormsSDK - 64bit C:Program Files (x86)DigilentWaveFormsSDK function DWFtest(); % 32 bit system %hfile = 'C:Program FilesDigilentWaveFormsSDKincdwf.h'; %64 bit system hfile = 'C:Program Files (x86)DigilentWaveFormsSDKincdwf.h'; display(['Set variable hfile: ' hfile]); if ~libisloaded('dwf') loadlibrary('dwf', hfile); end islibloaded = libisloaded('dwf'); fprintf('Check if dwf library is loaded: islibloaded = %dn',islibloaded) % This is necessary to get the character strings pBuffer = libpointer('int8Ptr',zeros(32,1)); calllib('dwf','FDwfGetVersion',pBuffer); display(['Version: ' char(pBuffer.Value')]); %Just opening and making sure the device is in a known state phdwf = libpointer('int32Ptr',0); calllib('dwf','FDwfDeviceOpen',-1,phdwf); display(['FDwfDeviceOpen returned: ' num2str(phdwf.Value)]) % Close device and unload library if phdwf.Value > 0 calllib('dwf','FDwfDeviceCloseAll'); end unloadlibrary('dwf') end
  8. It is my understanding that the dual processor in a ZYBO board can be used in parallel, each with their own code. I have a project where I need to run two parallel tasks, one of which was developed in SDK and the other in MATLAB using Embedded Coder. I know how to target a specific processor using Vivado/SDK, however, when using Embedded Coder in MATLAB this is more difficult to achieve and I haven't found a way to do it yet (i.e. I can upload my code onto the board but there's no indication of which processor it is using). Therefore, I was wondering if there is any way I can check the contents of the board using Vivado or SDK. Is there a way I can check which files the board is using and where these are being used? Alternatively, if anyone has any experience with MATLAB's Embedded Coder, could you let me know which generated files I could manually import into SDK to finish my application there? Many thanks.
  9. Hi, I have been working on system generator Matlab r2017a. I have encountered a problem. I couldn't find the boards in hardware co-simulation.I need boards files to add. Can anyone help? Where can i find the files? Regards, Chandu
  10. Some questions about Matlab compatibility with Analog Discovery Module before I make a purchase. First, is the Analog Discovery hardware version 2 driver the same as version 1? Matlab tech rep says there is no listing for version 2. I want to make sure which versions are supported by matlab. Second, besides typical DAQ features, can Matlab control the digital I/O and the power supplies? I'm wondering if all the features of Analog Discover are supported by Matlab DAQ toolbox and Simulink? Thanks
  11. Hello All, I see that the data acquisition toolkit( MATLAB ) supports the original Discovery module. Has anyone tried the Discovery 2 with Matlab ? I am debating weather or not to get the toolkit. Thanks !
  12. Hello. I have to adjust the speed (baud), parity bit (if I want), stop bit. For both software alike. I would like to know if anyone has that code in VHDL / VERILOG ? (UART/JTAG)
  13. I hear you may be working on at Matlab interface for the AD2 but in the meantime it seems it would be possible to use the API in the SDK to talk to the AD2 directly. I am somewhat new to this and can see two ways to go. One would be to use VISA which Matlab supports through the instrument control toolbox. However when I install NI VISA I can't detect the AD2 so maybe it isn't VISA compatible? Am I missing something here? Another way would be to use the included Python scripts and call Python from Matlab (http://www.mathworks.com/help/matlab/call-python-libraries.html). This seems a little clunkier. Of course this is a waste of time if you are coming out with Matlab support for the AD2 in the near future. If not any advice on the best way to proceed would be appreciated.
  14. Hello, I have created a TCP server on Xilinx Zynq 7000 Zedboard and TCP client on MATLAB on host computer. Zedboard and the host computer are connected through the Ethernet. The client requests the connection to the server, SYN, SYNACK and ACK packets are delivered successfully and the connection is established. (Packets are monitored on wireshark on the host computer). Now, If the client keeps sending the data continuously to the server, then server receives the data and process them. BUT the server crashes if I take some time interval in sending the data. For example: If I send data from client to server at time 0, and I take a gap of 60 seconds and then try to send the data from client to server, then by this time the TCP server has crashed and it does not receive data.If I keep sending data continuously then it does not crash, but if I take some time sending the next data, then TCP crashes. can anyone suggest where I am going wrong I have been looking over the Internet to find solutions but any help/suggestions would be appreciated.Thanks
  15. Dear, Hello, I've considered using Analog Discovery for 100MHz ( >20MHz) ADC. I have some questions about it. I found some discussion that Matlab does not provide connection to Analog Discovery 2. Have you ever used Matlab Data Acquisition Toolbox to connect Analog Discovery 2? I wonder if the data acquisition toolbox only support Analog Discovery (old version). I have one more question. I'd like to measure 4 channels simultaneously. Can I use two Analog Discovery modules simultaneously? and is it able to run two S/W to handle two Analog Discovery modules at the same time? I appreciate if you give some idea for 4 ch. measurements using Analog Discovery.
  16. I am trying to control the analog discovery 1 with MatLab commands for the project that i am on. We can control everything except the +-5v power supply. We need it to power an op-amp we have in the circuit. Does anyone know the MatLab command to turn on the Power Supply in the Analog Discovery?
  17. Good afternoon everyone, I am working on a project to connect the Zedboard and FMCOMMS2 using the HDL workflow advisor. What I want to do is to have the Zynq FPGA (PL, not the processor) generate samples of a sine wave and send these to the RF for transmission FMCOMMS2, and to have this system operating stand-alone, without any further connection to the PC running Simulink. It seems to me that, the way I have the project set up, I need to keep Simulink connected to the board, even if it is not doing any processing. If I disconnect the ZedBoard from the PC, I get an error message on the PC. By "disconnect", I mean literally unplugging the Ethernet cable from the PC's port. The error message specifies that "a runtime error occurred in the System Object 'comm.internal.SDRTxZedBoardFMC234SL', while executing the 'stepImpl' method" . I would also like to know if it's possible to save the generated bitstream into a bootable image, so that I whenever I turn the board on, I get the desired functionality. I have followed the instructions in the PicoZed SDR SpeedWay 2015 Training but it doesn' work. I have attached a Word document with more details about how I have my project set up; also, the project folder with all the files. I'd be grateful if you could take a look at it and see if I'm doing everything correctly. Word document: https://www.dropbox.com/s/2avrwizrnjtfrgv/ZedBoard and FMCOMMS2.docx?dl=0 Project files: https://www.dropbox.com/s/gqm70cenxecks6m/SineWave2.rar?dl=0 Thanks for your help, Romel
  18. Hi I want to record approx 50-1000 us long square wave signals from a separate waveform generator with Analog Discovery (Portable Analog Circuit Design Kit) via Matlab. The official Matlab code for recording with an Analog Discovery does not work (http://se.mathworks.com/help/daq/examples/getting-started-acquiring-data-with-digilent-analog-discovery.html?search). Instead, the program is continuously busy when executing startForeground(s) and does not produce results. The official Matlab code for waveform generation and acquisition at the same time (http://se.mathworks.com/help/daq/examples/acquiring-and-generating-data-at-the-same-time-with-digilent-analog-discovery.html?search ) works but allows only for a lower sample rate and takes too long to start measuring for my experiment. Which is why I would prefer to only record rather than outputting zero and recording the actual target signal simultaneously. My Matlab code is s = daq.createSession('digilent'); ch = s.addAnalogInputChannel('ad1', 1, 'Voltage'); s.Rate = 1e6; s.Channels.Range = [-2.5 2.5]; s.DurationInSeconds = 2; [data, timestamps, triggerTime] = startForeground(s); figure plot(timestamps, data); xlabel('Time (seconds)') ylabel('Voltage (Volts)') title(['Clocked Data Triggered on: ' datestr(triggerTime)]) Additional Info: I use the 1+ and 1- pins of the Analog Discovery, the support package Digilent Analog Discovery 15.2.0 is installed, MATLAB version R2015b.
  19. Francesco

    Matlab files

    Hello, I am working on preparing Labs for my Circuit class using Digilent Analog Discovery (Real Analog - Circuits 1) and I have a question about MATLAB files. In a few labs, he mentions about required MATLAB files in order to complete the lab. For example, in Lab 12.4.1, this is the line that I have copied from the PDF document: "The calculations are simple, but rather tedious. The MATLAB m-file associated with this lab can be used to streamline these calculations. Run the m-file and input the appropriate resistance values when prompted. Assume that the inductor resistance is zero for the pre-lab calculations." Could you please help me find out where the MATLAB files are? Thanks! Kind Regards, Francesco Madaro, Ph.D.
  20. I would like to use the Analog Discovery via the MATLAB DAQ interface. I would like to output a custom signal to both AWG1 and AWG2 simultaneously. I am able to produce a signal on a single channel using the following code (where output1 is an array of 0s or 3.3s to produce a square wave). When I monitor this at the headphone jack I receive a frequency sweep in my right ear. s=daq.createSession('digilent') ; ch=s.addAnalogOutputChannel('AD1',1,'Voltage'); s.Rate=100e3; s.queueOutputData(output1.'); s.startForeground; If i change the second line to this: ch=s.addAnalogOutputChannel('AD1',2,'Voltage'); I am able to get a signal from AWG2. When I monitor this at the headphone jack I receive a frequency sweep in my left ear, as expected. I would like to get output from both AWGs simultaneously. In the code below the attempt is to duplicate the same signal on both AWGs. When I monitor this at the headphone jack I get a single frequency square wave in only the right ear. s=daq.createSession('digilent') ; ch=s.addAnalogOutputChannel('AD1',1:2,'Voltage'); s.Rate=100e3; s.queueOutputData([output1.' output1.']); s.startForeground; The entire length of the playback is 90 seconds. I have tried reducing the number of data points and the sample rate by a factor of 2 thinking it was a buffering issue. I would expect that cutting it in half would work since I am using the same data two times over, but even cutting it by a factor of 10 yielded no different results. Can you provide any suggestion as to what I might do to get the desired output?
  21. Hello everyone, I have a quick question regarding the Zynq 7000-Development Board. I will be inputting a sound into the board, filtering and delaying the sound, and emitting the new sound through another speaker. My question is if the board has a built in audio codec to produce the new sound or will I have to develop some code for an audio codec? I have been looking at the product page and I haven't really noticed anything saying that it does. If I do need to produce code for an audio codec, would anyone have some links to help me get started in creating some code? VHDL or Matlab (I heard Matlab was easier). Thank you in advance for all your help.
  22. Hello, I plan on using the Analog Discovery oscilloscope to capture data from an antenna, export as a .csv and then import to MATLAB for processing. Is there a limit on the amount of data I can collect using the WaveForms software? To capture more data, I can simply increase the base of the time scale, correct? I want to continuously send a data signal from the antenna and simultaneously receive using the scope. I believe it would be easiest to use the WaveForms software to capture the signal and then export to .csv and then re-import to MATLAB instead of using the MATLAB data acquisition. Is this an accurate claim? Thank you.