Kawai

Members
  • Content Count

    11
  • Joined

  • Last visited

About Kawai

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi attila, The dwfw.dll file that you attached does not work. The error message is that FDwfDeviceConfigOpen_ is not found in the DLL file. The dwfw.dll file in the web page https://shop.trenz-electronic.de/en/Download/?path=Digilent/27069-Analog Discovery 2 also does not work. The error message is that dwfw.dll is not found. I think your VBA code works well by using 32 bit excel in 64bit OS and dll file in the web page. I want to use 64bit excel and the both dll file does not work well.
  2. Hi Attila I tried your excel but it doesn’t work. In my condition, I have to change declare sentence like this because of the 64bit excel. Public Declare PtrSafe Function FDwfDeviceOpen_ Lib "dwfw.dll" (ByVal idxDevice As Long, ByRef phdwf As Long) As Long And I put the dwfw.dll and excel macro into the folder C:\Windows\SysWOW64\ . But it doesn’t work because dwfw.dll is not found. Do you confirm VBA in 64bit excel ?
  3. Hi attila Attached, please find the Excel VBA and dll file. In module1, the declare sentences are shown. In module2, the main function for the pulse generator is listed. I tried the wrapper DWF file that you mentioned but it doesn’t work well… AD2_PGDeBuG_Send.zip
  4. Hello. I’m trying to generate the custom data by using pattern generator in Analog Discovery 2. Although I set the digital output mode as custom, the output data is depend on the setting of the FDwfDigitalOutCounterInitSet. For example, I try this code and the custom data is not come from the pattern generator. rg(0) = &HAFAFAFAF FDwfDigitalOutTypeSet(hdwf, 7, 1) FDwfDigitalOutDataSet(hdwf, 7, rg(0), 32) Then I add the FDwfDigitalOutCounterInitSet and the output data is successfully generated. rg(0) = &HAFAFAFAF FDwfDigital
  5. Hi Attila Thanks, I successfully send the data to the pattern generator. The codes are shown below. I use rg instead of rg() in Declare sentence. Public Declare PtrSafe Function FDwfDigitalOutDataSet Lib "dwf.dll" (ByVal hdwf As Long, ByVal idxChannel As Long, ByRef rg As Any, ByVal countOfBits As Long) As Long Call FDwfDigitalOutDataSet(hdwf, 7, var(0), 16). But I found another question that the pattern generator output depends on the setting FDwfDigitalOutCounterInitSet. I’ll make another thread about this question and close this thread.
  6. Hi attila Thanks, I tried your code in Python and I got the same result as you mentioned. I think the receiver side is OK. Is there any way to use set the pattern generator in VBA? If no, I’m going to use Python.
  7. Hi Attila I tried this code. rg(0) = &HAA rg(1) = &H1 Call FDwfDigitalOutDataSet(hdwf, 7, rg(), 9) The expected output of the pattern generator is 010101011. But in my condition the output of the pattern generator is 100000000. How to set the output data of the pattern generator?
  8. Hi Attila I tried the code listed below. The initial setting is not listed. Public Declare PtrSafe Function FDwfDigitalOutDataSet Lib "dwf.dll" (ByVal hdwf As Long, ByVal idxChannel As Long, ByRef var() As Any, ByVal countOfBits As Long) As Long Dim rg(8) As Byte rg(0) = 0 rg(1) = 1 ... rg(7) = 1 Call FDwfDigitalOutDataSet(hdwf, 7, rg(), 8) But the data array rg() doesn’t seem to be transferred to pattern generator. The output depends on only countOfBits. Is it possible for Analog Discov
  9. Hi Attila Thank you for your reply. Actually, I already use the command FDwfDeviceConfigOpen(-1, 3, &hdwf) and I successfully use the 16k buffer. My question is how to send the data to the 16k buffer. I want to use command FDwfDigitalOutDataSet in VBA or Python for automatic measurement (not Wavefomr GUI). For example, I want to generate the data 11111111….11111111(1k bit stream) by using the pattern generator. But to my knowledge, FDwfDigitalOutDataSet(hdwf, 1, &HFFFFFFFF, 33) is the longest bit setting and I can set only 32 bit data stream like 11..11(32 bit st
  10. Hello, I’m trying to generate the data whose length is over 1000bits by using the pattern generator in Analog discovery 2. I use Microsoft Excel VBA or Python and command FDwfDigitalOutDataSet. But the VBA cannot treat the int data whose length is over 1000bit in binary. Is there any way to transmit the large data to the pattern generator by using VBA or Python? Thanks.