Search the Community

Showing results for tags 'c++'.



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

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 11 results

  1. Dear Diligent AD2 team Please can you update your companies notes supporting Microsoft .net drivers which work with C# and VB.net and F# for the Analog Discovery 2 tool. It is a an excellent tool , but be even more excellent if could work and be used in the microsoft .net environment. This is a link to a previous forum post on the subject which used visual basic 6 from a while back. https://forum.digilentinc.com/topic/3049-vbnet-andor-cnet-wrapper-for-dwfdll/ The original visual basic 6 example . From the time before .net happened https://forum.digilentinc.com/applications/core/interface/file/attachment.php?id=1450 >> 160314_dwf_wrapper.zip I have taken this worked example and updated to get it to run with vb.net in visual studio 2017 .See enclosed attachment- It is failing to work properly due a. dll memory project fault in the .dll driver. The C++ source code for the .dll driver is also included in the attachment. My request is can Digilent fix the driver so that is usable in .net assemblies and is Memory safe . This is the reported run time fault when trying to access FDwfDeviceOpen in vb.net line of code : nRet = FDwfDeviceOpen(-1, hdwf) Fault report : System.AccessViolationException HResult=0x80004003 Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source=<Cannot evaluate the exception source> StackTrace: <Cannot evaluate the exception stack trace> Thank you for considering this request Digilent_AD2_try2_vb.net.zip
  2. Hi, I've created a custom software program in C++ that uses analog discovery 2 and I have two questions. 1. I want to read some data using I2C interface, but I'm having trouble on the idea of how should I set up a "typical I2C" interface in C++. Is there an example anywhere on how exactly can this be accomplished in C++? 2. When reading the on-board temperature value in C++ I keep receiving a constant value if I'm doing multiple reads in a row. How can I fix it so that every time I read the AD2 on-board temp value I would get an updated temp value not the initial value? Thank you!
  3. the error are : note: candidate function template not viable: requires 3 arguments, but 5 were provided void dut_mmult_accel_core ( sorce/main.cpp:645:2: error: no matching function for call to 'dut_mmult_accel_core' dut_mmult_accel_core <float, 60, 1*60, 4, 5, 5>(in_stream, out_stream, predict_label1_hw_trig,precision1_hw_trig,prob_estimates_t1_hw_trig); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `dut_mmult_accel_core <float, 60, 1*60, 4, 5, 5>(in_stream, out_stream, predict_label1_hw_trig,precision1_hw_trig,prob_estimates_t1_hw_trig);` where (predict_label1_hw_trig,precision1_hw_trig,prob_estimates_t1_hw_trig):output ``` template <typename T, int DIM1,int DIM2,int DIMa,int DIMb,int DIMc,int DIMd,int DIMe,int DIMf, int SIZE, int U, int TI, int TD> void dut_mmult_accel_core ( AXI_VAL in_stream[SIZE], AXI_VAL out_stream[3*SIZE], //volatile ap_uint<1> *hw_trig) volatile ap_uint<1> *predict_label1_hw_trig; volatile ap_uint<1> *precision1_hw_trig; volatile ap_uint<1> *prob_estimates_t1_hw; { // Map ports to Vivado HLS interfaces #pragma HLS INTERFACE ap_fifo port=in_stream #pragma HLS INTERFACE ap_fifo port=out_stream // Map HLS ports to AXI interfaces #pragma HLS RESOURCE variable=in_stream core=AXIS metadata="-bus_bundle INPUT_STREAM" #pragma HLS RESOURCE variable=out_stream core=AXIS metadata="-bus_bundle OUTPUT_STREAM" #pragma HLS RESOURCE variable=return core=AXI4LiteS metadata="-bus_bundle CONTROL_BUS" ap_uint<1> logic_zero = 0; ap_uint<1> logic_one = 1; T LabelS [DIM1][DIM2]; T out predict_label1[DIMa][DIMb]; T out precision1[DIMc][DIMd]; T out prob_estimates_t1[DIMe][DIMf]; *predict_label1_trig = logic_zero; *precision1_trig = logic_zero; *prob_estimates_t1_trig = logic_zero; assert(sizeof(T)*8 == 32); *predict_label1_trig = logic_one; *precision1_trig = logic_one; *prob_estimates_t1_trig = logic_one; ```
  4. Hi Digilent Im currently working on my finals in electronics development, including a hardware setup and a custom-made C++ application for my Analog Discovery 2. However it seems that the calibration data made with WaveForms does not apply to the hardware when using custom C++ applications. I've been looking through the manual and haven't encountered any examples of how it is done. I hope you can help me Kind regards Rasmus Pforr-Weiss, Brüel & Kjær SV
  5. Hello everybody, My name is Simon, I'm currently working in an R and T department, trying to design a prototype using the MyRIO motoradapter. My background is mechanical engineering and I already have made simple prototypes using python and a Phidgets motor adapter. But I have to use a MyRIO for this project and I have to code in C++ (no labview for me ) and here, the problem begins.... Have any of you ever seen such projects ? I can't find any example on the net and to be honest, the small exemple by NI on the C++ for MyRIO aren't clear for a newbie like me. Any help will be much appreciated, I can't find anything on the forum... The motor is not even started yet ! Have a nice day Simon
  6. I would like to utilize the SDK to develop a C++ application for the Analog Discovery 2 within Visual Studio 2015. I am trying to get one of the C++ sample applications provided to work but I am not having much luck. I tried adding a reference to dwf.dll but that failed. There is a lib file - do I use that and how? I am not sure what type of application I should start with (Forms, Console) and how do I bring in the sample app. Has anyone this? Can you provide step by step instructions with the expected result?
  7. I found the dwfcmd in /usr/share/digilent/waveforms/samples/dwfcmd/dwfcmd.cpp. How do I compile this file? g++ throws many errors starting with "ISO C++ forbids forward references to 'enum' types" and "use of undeclared identifier".
  8. Hello all tech-lovers; Do any of you guys have experience using Eigen library (http://eigen.tuxfamily.org/index.php?title=Main_Page) in bared metal OS ? When I try to define a matrix like : xil_printf(" TP CC 0 \r\n "); MatrixXd m1(6,6); MatrixXd m1_inv(6,6); xil_printf(" TP CC 1 \r\n "); the program is compiled and built, but when running it on the board, it HALT happens! I saw the assembly code of the line that exception happens, it is 0010da80: ldr r0, [r0] in which r0= 3758100524 I think the halt is because of referring to the address( decimal: 3758100524, Hex: E000102C )which is out of range of the address bus of Zybo! However this code works fine on PC ( X86) But I don’t know why my c codes convert to this assembly code. I would appreciate if any of you guys have any hint or experience on that.
  9. I want to build the DaciDemo project in Visual Studio 2010. Following the recipes given in "Building and Adept SDK Project in Visual Studio.pdf" one has to add all required paths and the additional dependencies (of course at different locations due to the fact that I am using 2010 and the reference doc is 2008), all libraries and other files get nicely attached. Nevertheless, the project won't build. There are 10 Error messages , all of the type: Error 1 error LNK2019: unresolved external symbol __imp__## referenced in function _main c:\....\visual studio 2010\Projects\dacidemo\dacidemo\DaciDemo.obj dacidemo where ## stands for {DmgrClose, DaciDisable, DaciGetBuf, DaciPutBuf, ...} - shortly said: all references to the attached libararies occuring in the project. In the meantime I found out that changing the library path (in Project Property sheet | Linker | C++Directories|) from "lib64 " to "lib" will eliminate 8 of the above 10 errors (even though my platform is Win64 :-) ). Now all external names from "Daci" are resolved but the "Dmgr" references are still left: {DmgrClose,DmgrOpen} The problem is solved: There is an error in the documentation file that comes with the SDK! It is NOT enough to include only depp.h and daci.h in the "additional dependencies" as stated in the documentation but one has to include dmgr.h as well. Obviously, depp.h and daci.h do not include any external symbol to open and close depp resources.
  10. Hi all, I've recently bought an Arty board (Microblaze processor) and some Pmods (PmodDPOT, PmodDAs, PmodADs), which use SPI protocol. I've looked everywhere for an example on how to access the Pmod headers or just how to use Pmods with the Arty but I couldn't find anything (even on the reference wiki page for the Arty). I found a library for SPI on Xilinx SDK which is called Xspi but I also am not sure how to use it. Can anybody perhaps help me by giving me the basic steps on how to do this? I'm very new to FPGA, so any feedback or suggestions are welcome! Thanks Viv
  11. Hello guys, I have a problem to configure the digital output of my Analog Discovery with a custom designed/programmed signal. I can handle the fundtions given in Waveforms and watched the tutorials. The plan is to generate a PWM with the device in C++. As compiler I am using CodeBlocks. I tried to generate a sine, which is given in the samples of waveforms, but right there I am stuck. I included the samples.h and managed, that the dwf.h is included. In Waveforms itself I only can import .txt files. Because of that I think I have to connect with the Analog Discovery with the commands out of the "WaveForms SDK Reference Manual". After building the sample sine signal, my compiler gives me the error, that something in the dwf.h is noch correct. The compiler is confused by the expression "DWFAPI" in every line in dwf.h. The error message is: "expected identifier or '(' before string constant". I could not find a tutorial fiiting my problem, so I hope to find some answers or solutions right here Thanks for help!