Jump to content
  • 0

Coninuous (streaming) arbitrary waveform output


gcb

Question

I am looking for a device that will allow me to output my own continuous arbitrary digital bit patterns.  I would want to stream this information from a PC to an external device that would then output the digital data.  Basically the reverse of doing digital capture.

I have seen arbitrary generators that have an internal buffer it will play back. But this only for a fixed time period. I want to continually feed it with arbitrary data.  The external device would need to buffer this and feed it out with the appropriate timing.  I would prefer to just feed it transition data, rather than at the sample rate it is outputting, though I suppose I could live with either.

If you can’t accept streaming data, how many points can the internal memory hold? Is the internal data stored as sample values, or transition points? If the latter, then the time period could be much longer.

Are any of your devices capable of something like this? If not, can you suggest a vendor/software etc?

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Hi @gcb

Continuous digital play is not available with any device.
The Digital Discovery has Play mode for up to 256MiB of data.
Other device support 'unlimited' AWG Play which could also be used as 1bit digital line.
Analog Discovery with 32k device buffer up to about 4MS/s. ADP3X50 has 32Mi AWG sample device buffer, ADP2230 has 128Mi buffer and USB3.

image.png

image.png

Link to comment
Share on other sites

  • 0

You showed two screen captures. The first one is for Digital Discovery, and the second is for which device - any of the analog device (Analog Discovery, ADP3x50, ADP2230)? I think it refers to the the ADP2230 - correct?

Play mode states it can play back data "imported from file on DIO lines". I do not want to play back recorded data. I want to create an arbitrary file on a PC and transfer it to the buffer of the device for playback.  Can I do that?  If so, what is the format of the data in a file for doing this?

How does the memory map to each byte of the buffer? If there are 16 playback channels, each sample would use 2 bytes?  So a buffer of 128MB would be 64M samples?

For my application I want to output at a rate of 1M. So 64M samples would be 64 seconds of playback?

You stated "Continuous digital play is not available with any device", but then seemed to contradict yourself with the statement "Other device support 'unlimited' AWG Play which could also be used as 1bit digital line."  Can you explain?

Analog Discovery with 32k device buffer up to about 4MS/s. ADP3X50 has 32Mi AWG sample device buffer, ADP2230 has 128Mi buffer and USB3.

Link to comment
Share on other sites

  • 0

Hi @gcb,

I think I understand what your confusion is and will do my best to help clear it up.

"Continuous digital play is not available with any device". -- It is not possible on any Digilent device / through WaveForms to have an existing file of digital data on your host computer and then stream/play back ("reverse digital recording") that data on the 16 Digital I/O channels (or however many Digital I/O signals on a Digilent device).

There are three potential alternatives that partially resolve the above inherent limitation and might help you.

  1. One is the Play function exclusive to the Digital Discovery where you can take previously captured digital data and play that captured digital data back out on different digital lines. But as you are not working with recorded data, this will not help you.
     
  2. The second potential work around is to use the Arbitrary Waveform Generator/AWG/Analog output channel. The AWG does support the streaming of data from a file stored on a host computer. This (in my limited understanding of the backend of WaveForms with poor terminology) loads/buffers the file into the WaveForms application which then feeds the data to whatever Test and Measurement Device output buffer in a circular manner.
    There are two catches with this method. The biggest one is that because you are using a single analog output channel, that is equivalent to only using a single digital channel / 1-bit digital data (on/off). The second catch is WaveForms feeds the file data to the device's analog output buffer over USB; if the device's buffer is small and the USB connection is slow, you may be at risk to lose/miss some samples while streaming the data.
    Regarding that second catch, the AD3 only has a 32k device buffer size and supports up to 4 MS/s for streaming out analog output data. The ADP3x50 and the ADP2230 have much larger buffers thanks to their on-board DDR memory.
    The 2230 also uses USB 3.0 to further help out with the streaming of data, letting WaveForms rapidly stream large chunks of data into the big buffer, putting you at far less risk of losing samples while any USB overhead/handshaking occurs before the next chunk of data is streamed over. This does not get around the fact that you are working with only a single channel output though, which might be a deal-breaker if you are wanting to stream multi-bit digital data in parallel.
     
  3. Third workaround is to simply load the entire custom data into the device's on-board memory for analog output or digital output. You won't have the risk of missing any samples as you are not streaming, but are, of course, limited to the buffer size for how much data you can pack in.

Let me know if you have any questions.

Thanks,
JColvin

P.S.

Quote

How does the memory map to each byte of the buffer? If there are 16 playback channels, each sample would use 2 bytes?  So a buffer of 128MB would be 64M samples?

For my application I want to output at a rate of 1M. So 64M samples would be 64 seconds of playback?

If digital data streaming was supported, your math principle is correct. Technically you would get more samples and seconds of playback out of the deal because the all of the MS values are rounded down from MiS, meaning 64 MS is actually 67,108,864 samples, but you have the right idea regardless. There are a couple of lines in the various specification documents mentioning this, but it's definitely one of those "another sentence in a big block of text" situations.

Link to comment
Share on other sites

  • 0

Hi @gcb

The Play mode with Digital Discovery lets you generate 1-16 bit wide digital signals from tabs. The tab data can be an earlier capture or imported csv, txt or binary file, or generate with the embedded Script interface. This Play mode is not 'infinitely' continuous, but up to 256MB.
For 'infinite' length AWG can be used on other T&M devices. These are intended for analog signals, but can also output 1 digital signal.

Link to comment
Share on other sites

  • 0

The Digital Discovery is the much more cost effective solution, so I would prefer to use it.

Attila - you state that the Digital Discovery has the ability to playback imported data from a PC, but JColvin stated that it can only playback data it recorded.  Which is it?

From your support page, it states "...the contents of the custom signalcan be loaded from a file...", so it seems it can be done. What is the format of this file? Where is it defined? Where is the button/menu to import it in "Waveforms"?

image.thumb.png.3587a2c22791c661e0d2cd351f86762d.png

I could get by with downloading the data and playing it back out of the Dig Disc's buffer, as long as I can store a long enough sample. I need 20 secs.  Seems like 256MB should be plenty at a playback of 1Mhz. If its a bit per channel, 16 chanels=2 bytes/sample. So 256MB/2B=128M samples. At 1Mhz output this would be 128secs?

* How may bytes of this 256MB does each sample occupy? Is it actually 1 bit/sample?

*Does the amount of memory required in the buffer for each sample increase based on the number of channels being played, or is it a fixed memory format set up for 16 channels, no matter how many you are playing back?

I downloaded "Waveforms" and I am running it in demo mode. I went to the "Patterns" window. Where is there an option to import a file in this window?

 

Link to comment
Share on other sites

  • 0

Since I haven't heard back, I kept digging. I am using Waveforms in demo mode.

As you stated, I have 2 options - 1) Use waveforms with one of the analog devices, 2) Use Digital Discovery and play from the internal buffer.

Option #1:

First I tried the AD3 demo device, using the 'wavegen' tab.

By exporting a file and looking at it, reading the forums, I was able to figure out the proper data format of the file.  I was able to create my own file and import it for playback successfully. So I am OK for creating a file for importing into the AD3 buffer and playing it out of the buffer.  The file I created is a text file.

But since the buffer is quite small, I want to be able to get the streaming output option working for the AD3. I am only running the sample rate at 1Mhz, so I am hoping that the 32kB buffer can keep up. 

How do I initiate the streaming option?

What format is it expecting? Is it just streaming the same text file as I would use for importing? 

Is there an option for streaming binary data, since this will reduce the traffic?

How do I handle over running the buffer? What is the flow control mechanism? Is all of this handled in Waveforms?

Option #2:

I changed the demo device to Digital Discovery and went to the 'Patterns' tab. But for the life of me I cannot figure out how to get to the custom waveform or import screens as shown in the 'Digital Pattern Generator' section of https://digilent.com/reference/software/waveforms/waveforms-3/reference-manual. Can you tell me how to do this? I want to verify I can load a big file into memory and play it back with DD3.

Link to comment
Share on other sites

  • 0

A lot of questions, and I just get 2 pictures??

I would have thought that playback would be part of the Digital Pattern Generator tool. The manual states "The Digital Pattern Generator (Patterns) lets you define the output on the digital lines, using standard types or user-defined types.

The manual states for the  Logic Analyzer tool "The Logic Analyzer allows acquisition and visualization of digital inputs."

In any case, my objective is to play back my own custom file I created.  So if it is done via the Logic Analyzer, no matter...

In the demo tool, I imported my file (junk.txt) into the Logic Analyzer via the screen shown in picture "import". It consists of 2 columns of data - time and value. Based on the screenshot, it appears to recognize these properly.

After importing it, I open up the data window to look at the data. Refer to "import3".  Isn't the data window supposed to show what was imported? It does not look like what I imported.  Why is there a red box with the word "busy"?

I am running this in demo mode. Perhaps it is getting confused. Maybe this would work better if I had an actual device?

If I click play, I would then expect that the data I imported would play back on DIO24, correct?

Can you point me to a tutorial or video of playing back an imported file?

Import.JPG

Import3.JPG

junk.zip

Link to comment
Share on other sites

  • 0

Hi @gcb

In Pattern Generator the DIOs can be configured to generate different frequencies, pulses, phases... optionally each having 1k-32k custom pattern buffer. In a bus the selected DIOs are configured at sequential phase, period... settings to generate various types of counters.
The Play mode Logic Analyzer is different, currently only available with Digital Discovery. Main usage is to regenerate the capture on 1 or more DIOs but it can also generate data from imported files, DIOs have at same frequency and phase but different bit positions of samples.

The application lets you open multiple instruments (Scope, Wavegen, Logic, Patterns, Logger, Voltmeter, Spectrum, Network, Impedance Analyzer, Tracer...) relying on the same device resource (Scope, Wavegen channels, Logic, Patterns, Supplies, StaticIO). Only one of these instances can control at a time a device resource, the last used instance (Run or Stop press), the other display Busy state.
Like having multiple identical interfaces open only the last started one will capture, the other will be busy.
The Voltmeter, Logger and Spectrum also uses the Scope device resource.
The Wavegen channels are separate device resources, can run independently, except when used in Synchronized mode.
The Network and Impedance Analyzer use Scope and Wavegen 1 channel, by default, also Supplies and StaticIO when used with IA adapter.
The Tracer uses Scope, Wavegen 1 and 2, also Power Supplies and StaticIO when used with Transistor tester adapter.
The Protocol tool uses Patterns device resource to send and Logic to receive data.
The Logic uses the Patterns resource in Play mode.

Regarding your junk.txt which is actually a csv, change the "List separator" to comma.
The default delimiter for TXT files is Tab and for CSV is comma. This is regional system option dependent but can be set to US under Settings/Options/Application.

image.png

 

If you want to generate burst like in your file, this can be done with all T&M devices and Pattern Generator.

image.png

 

The demo mode is intended to explore the application and device features, but it does to fully emulate all the features.

image.png

image.png

DIO24 wired to DIN0

image.png

 

 

Link to comment
Share on other sites

  • 0

Thank you for these details!

I did not know about the tab vs comma issue.

Since I am not able to see the waveforms in the demo mode, I did order a unit last Friday to play with.

The patterns I will end up sending will be much more random than the one example I sent you, so I can't use any of the pattern generator tools. I need to download and run them. For the system I am setting up this will be done for hundreds of files as part of a test fixture. To that end, this all must be automated. So I want to use the SDK instead of the GUI interface.

I looked through the SDK for an API to import a file and then play it, but I did not find anything. I searched the entire SDK manual for the word import and found nothing.  Does the SDK support this?  If so can you point me to the proper docs for this? Any example code of this? If not, then this path is not an option.

I would need an API to import the file, and to know when it is done processing/decoding it before I try to play it via an API call. The decoding process is also kinda slow. If this is done via an API will it be faster? 

I did see in the SDK API calls for doing streaming output via the AWG. This seems to support this nicely. But I would need one of the analog devices to use this. If I only one channel, perhaps this is a better option - perhaps I should order and AD3 as well to test...

Link to comment
Share on other sites

  • 0

Hi @gcb

As you can see in the changelog, beta versions are frequent updates that add new features and fix bugs.
The release version comes out about twice a year, usually in sync with a product release, and is tested a bit more. These are useful in class so that everyone uses the version over the course of a semester.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...