Search the Community

Showing results for tags 'pattern generator'.



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

  1. Greetings, I am creating a VBA Macro Script to enable the Pattern Generator function of Analog Discovery 2 for parallel transmission of data. I've already created a VB6 Wrapper (Pattern_Generator) containing these two files: 1). Pattern Generator Wrapper.txt(Calls APIs from dwf.vb) 2). dwf.vb I've referenced it to a VBA Script to call those functions using this snippet of codes: Public TxWrapper As Pattern_Generator.ComClass1 Public Function PatGenForTx() Set TxWrapper = New Pattern_Generator.ComClass1 'PatGen Parameters Dim rgBits1 As String: rgBits1 = "UART" Dim n As Long: n = Len(rgBits1) + 1 Dim idxDevice As Long: idxDevice = -1 Dim handle As Long Dim phzFreq As Double Dim idxChannel1 As Long: idxChannel1 = 0 Dim fEnable As Long: fEnable = 1 Dim secRun1 As Double: secRun1 = (n * 8) * (1 / 9600) Dim cRepeat As Long: cRepeat = 1 Dim t As Long: t = 1 ''DwfDigitalOutTypeCustom As Byte = 1 Dim i As Long: i = 2 ''DwfDigitalOutIdleHigh As Byte = 2 Dim countOfBits1 As Long: countOfBits1 = n * 8 Dim fStart As Long: fStart = 1 'Initializing Device PatGen = TxWrapper.AD2_FDwfDeviceOpen(idxDevice, handle) 'Setting for enabling 1st Channel PatGen = TxWrapper.AD2_FDwfDigitalOutInternalClockInfo(handle, phzFreq) PatGen = TxWrapper.AD2_FDwfDigitalOutEnableSet(handle, idxChannel1, fEnable) PatGen = TxWrapper.AD2_FDwfDigitalOutRunSet(handle, secRun1) PatGen = TxWrapper.AD2_FDwfDigitalOutRepeatSet(handle, cRepeat) PatGen = TxWrapper.AD2_FDwfDigitalOutTypeSet(handle, idxChannel1, t) PatGen = TxWrapper.AD2_FDwfDigitalOutIdleSet(handle, idxChannel1, i) PatGen = TxWrapper.AD2_FDwfDigitalOutDividerSet(handle, idxChannel1, (phzFreq / 9600)) PatGen = TxWrapper.AD2_FDwfDigitalOutDataSet(handle, idxChannel1, rgBits1, countOfBits1) 'Start Site 1 Transmission PatGen = TxWrapper.AD2_FDwfDigitalOutConfigure(handle, fStart) 'Closing Device PatGen = TxWrapper.AD2_FDwfDigitalOutReset(handle) PatGen = TxWrapper.AD2_FDwfDeviceCloseAll() End Function But I am encountering this error at the FDwfDigitalOutDataSet: Any advice? Regards, Lesiastas
  2. Greetings, I am creating a VBA program which uses the DigitalOut Functions in the dwf.vb file to replicate the capability of the AD2's Pattern Generator. I'm having trouble of declaring the FDwfDigitalOutDataSet API in VBA. I always encounter this error: I am aware that this is because of some data types in VB6 that are not supported in VBA. I've encountered similar errors in the FDwfDigitalOutRepeatSet and the FDwfDigitalOutDividerSet API. What I did was change the UInteger data type to Integer, since its the data type supported supported in VBA. Function FDwfDigitalOutRepeatSet(ByVal hdwf As Integer, ByVal cRepeat As Integer) As Integer End Function Function FDwfDigitalOutDividerSet(ByVal hdwf As Integer, ByVal idxChannel As Integer, ByVal v As Integer) As Integer End Function I already changed countOfBits in FDwfDigitalOutDataSet from UInteger to Integer, but the error is still present. I think the error is because of the <MarshalAs(UnmanagedType.LPArray)> used in the FDwfDigitalOutDataSet. What changes could I do to FDwfDigitalOutDataSet in order to agree with VBA? Function FDwfDigitalOutDataSet(ByVal hdwf As Integer, ByVal idxChannel As Integer, <MarshalAs(UnmanagedType.LPArray)> rgBits() As Byte, ByVal countOfBits As Integer) As Integer End Function Sorry in advance, but I could be wrong since I'm a complete novice in coding, especially across different programming platforms. Any advice on how to work around this? Regards, Lesiastas
  3. Greetings! I'm working on a Project involving the use of the Analog Discovery 2's Pattern Generator function. I was tasked to create a VB6 Wrapper in MS Visual Studio 2013 that will perform the functions of the Pattern Generator by calling certain APIs from its dwf VB.NET file. I have two concerns on how to do this. First, as I looked at the WaveFormsSDK sample codes and the WaveForms™ SDK Reference Manual, there is no API available for setting the clock frequency of the Pattern Generator, unlike in its WaveForms GUI. The only API available is the FDwfDigitalOutInternalClockInfo, which only retrieves the internal clock frequency, not set it to want I need. Secondly, what I need is to sucessfully transmit an ASCII character using the APIs of the Pattern Generator. I'm a novice at coding, especially with complicated routines, so I'm having trouble with coding for the FDwfDigitalOutDataSet API. What I want to do is to send an ASCII character using a string variable that will be converted into its binary equivalent using the snippet of codes below and store those values to the rgBits variable, which is a byte array to transmit it. For example, I'll use ASCII character "U", convert it to its binary form which is Bin(01010101) and put those values in the rgBits variable to be sent to a UART Controller or Logic Analyzer to see if it was transmitted properly. I came up with these codes but I don't think its the correct way of doing it. Sorry but I'm really, really not that good at coding. It would really help to receive some advice on how to do it. 'Convert String to Binary Dim Text As String = TextBox1.Text Dim oReturn As New StringBuilder 'but first, convert String to Byte() Dim PatGenTx As String = ("") Dim rgBits() As Byte ReDim rgBits(0 To Len(PatGenTx)) For i = 1 To Len(PatGenTx) rgBits(i) = Asc(Mid(PatGenTx, i, 1)) Debug.Print(rgBits(i)) Next 'Then store binary values into byte array For Each Character As Byte In ASCIIEncoding.ASCII.GetBytes(Text) oReturn.Append(Convert.ToString(Character, 2).PadLeft(8, "0")) oReturn.Append(PatGenTx) Next TextBox2.Text = (oReturn.ToString) 'Take note: bits order is lsb first ' for TS output the count of bits its the total number of IO|OE bits, it should be an even number ' BYTE: 0 |1 ... ' bit: 0 |1 |2 |3 |...|7 |0 |1 |... ' sample: IO|OE|IO|OE|...|OE|IO|OE|... Dim countOfBits As UInteger : countOfBits = 8 Thank you and God Bless you guys.
  4. Hello, In my waveforms script I am trying to import and run a saved custom 7-bit bus pattern in csv format that I generated from the custom pattern generator. I am able to read the data from the csv, but when I do: Patterns1.Channels.Bus._custom = data all of the data is just written into the first channel of the bus. Is there another format or syntax that should be used when specifying patterns for custom busses?
  5. Hi: I know that .csv files can be imported into the Digital Discovery pattern generator, but I am curious about other formats, and what exactly their syntax/organization needs to look like. Saw the description of pattern export file formats, but nothing on import. We are trying to use prober patterns as starting points, importing into the Digital Discovery pattern generator and then modifying as needed. Many thanks.
  6. 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.
  7. Hi all, I am doing a project on vhdl in which i am trying to display a pattern (like forming an eight) on seven segment display on spartan 3 fpga kit.I have written the vhdl code and simulation works correctly,but the problem is i am not able to write the ucf code (written but may be wrong) required for implementation on spartan 3 kit.I would highly greatful if anyone can help me as to how to write ucf code or modify my vhdl code. Thanks in advance. Regards, Nikhil Singh pattern generator.txt
  8. Hello, I'm using the pattern generator with the output type set to open drain when the output is Z, measuring the output impedance I read almost 5K Ohm, What could be the problem?
  9. 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 FDwfDigitalOutTypeSet(hdwf, 7, 1) FDwfDigitalOutCounterInitSet(hdwf, 7, 1, 10) FDwfDigitalOutDataSet(hdwf, 7, rg(0), 32) What does the FDwfDigitalOutCounterInitSet mean when the output mode is custom?