High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Acquire chirp(5421) delay and generate acquired chirp(5122)

Hey Gary,

 

I'm very glad to hear that I finally hit on what you were looking for!  I'm sorry that it took a few tries.  I'm still looking into this set up a little more.

 

I'll have to see what I can do about any "pull" with R&D and any NI-FGEN trigger delay functions, but as far as being a dreamer goes, I hear you're not the only one.

 

Also, I haven't been able to find which spec's say that the 5421 supports P2P.  Do you know where you saw that?

 

Regards,
Jake G.
National Instruments
Applications Engineer
0 Kudos
Message 11 of 26
(4,099 Views)

HI Jake,

 

That example showed promise, but as it's using script triggers , timing jitter is a problem. We have a consultant working on this and he has tried a number of approaches ,each with it's own pitfalls.  What should have been relatively simple,  has become quite complicated dealing with timing issues,triggers etc, all for want of the ability to delay the trigger in the FGEN.  I still find it amazing that such a basic function isn't included in FGEN.

It appears that the exported "start trigger" is not coincident with the actual analog edge trigger, so we are forced to base the triggering on the end of record event, that is stable/coincident.  What a convoluted waste of time this has become.

The project manager has referred to the labview system behaviour as "ridiculous".  I would have to agree, as I don't see how any of this is "extremely unique", this is basic test gear functionalilty.  I liken this to trying to drive a nail in with hammer that has no handle.

 

We are now exploring using a counter board to delay using sample clocks ( or similar)  . I'm hoping that the consultant finds a way to accomplish the task without the need for more hardware, as we don't have an endless budget. Are there no counters on either the 5421 or 5122 that we can directly access to accomplish this task ?

 

 

 

Gary

 

 

0 Kudos
Message 12 of 26
(4,091 Views)

Hi Jake,

 

Sorry I forgot to aswer your question about where I read about about data streaming.

Our consultant pointed out that he read it here :http://sine.ni.com/nips/cds/view/p/lang/en/nid/12714  , "Supports Data Streaming ?"    YES

right after his attempt to implent P2P ( for waveform transfer) produced unsupported errors.

 

Gary

 

 

0 Kudos
Message 13 of 26
(4,090 Views)

Hi there,

 

I'm the previously mentioned consultant. This morning I successfully implemented what you've laid out. The details are below:

 

Configure Scope

Set Reference Trigger to Export to RTSI 1

 

Configure FGen in Script Mode with the following script:

  Wait until scriptTrigger0
     generate DelayWfm

     generate AcqWfm

Allocate memory for DelayWfm and SampleWfm

Set ScriptTrigger0 to Digital Edge on RTSI 1

 

Initiate Generation (FGen)

 

Read Cluster (Scope)

 

Set Named Waveform Next Write Position

Write Named Waveform

 

This appears to be working fine as long as there is a large enough delay. If the delay is too short the waveform from the previous cycle will be output.

 

All that's left is synchronizing the amplitude of the output signal.

0 Kudos
Message 14 of 26
(4,078 Views)

Hey Kevin,

 

That is really great to hear!  I hope Gary is happy with the solution.  I'm not sure if you are getting a variable amplitude, but if it's different at a constant multiple the example at Output Analog Wfms with Delays and Variable Amplitudes may help.  If not, let me know and I can look into some more options.

 

Regards,
Jake G.
National Instruments
Applications Engineer
0 Kudos
Message 15 of 26
(4,065 Views)

Hi Jake,

 

Am I happy with the solution ?  we're getting there 🙂    I'll be happy when it's all finished.

 

I do have to ask about data captured during acquisition.

 

We are capturing WDT using NI-scope read .  It appears that this returns scaled input data and not the raw unmodified input waveform ?

How do we get the raw waveform data from NI-scope, or are we forced to extract the scaling info and use that to modify the output gain on NI-FGEN ?

Should we be using a fetch binary data instead ?  There's no mention of scaling in the documentation for fetch binary.  When would one use read WDT vs fetch binary ?  Why would folks want the option to return a scaled version of the their input signal ? 

 

Thanks

 

Gary

 

 

 

 

0 Kudos
Message 16 of 26
(4,057 Views)

Hey Gary,

 

I'm glad to hear you're getting closer. 

 

Read works similarly to Fetch, but with some differences.  The Read function combines the initiate acquisition, wait for complete, and retrieve data calls into one function and it doesn't return until the entire operation is complete.  Whereas the Fetch function just transfers the acquired data from the digitizer memory to your program.

 

Although Fetch requires an additional function to initiate an acquisition, it offers a couple more advantages over the Read function, including freeing the host computer processor for other operations while you wait for the digitizer to acquire data, and not re-initiating the aquisition every time.  For more information this, please see Section 3 of http://zone.ni.com/devzone/cda/tut/p/id/3382

 

Both, however, will be scaled digitized data, so you'll have to adjust the FGEN to compensate for the scaled gain.

 

Regards,
Jake G.
National Instruments
Applications Engineer
0 Kudos
Message 17 of 26
(4,046 Views)
Hi Jake, Couple of more questions. We're almost there, but need too add some marker functions. We're using scripting, but I haven't been able to find very much info about scripting at all ? I can create markers, and export them , but how can I control the marker pulse width ? I see that as a property that I should be able to set, but when I add a property and set it, it's not working. If I initialize it at start and set it, it errors out. If I try to set it before generating the acquired waveform, it complains that it can't be set while it's generating. It would be so much easier to set it when we create a marker in script mode, but I can't find any examples of the correct syntax to use. we're generating markers as such : generate acquiredwfrm marker1(12) This generates marker1 at position 12 but how do we set the pulse width of the marker ?? I've tried every combination of characters I can think of but it won't work. generate acquiredwfrm marker1(12,100) for example generates 2 markers ,one at positions 12 and 1 @ position 100 Again, how do I set the pulse width ? Where is the correct syntax and allowable commands ,for scripting, explained or documented ? Thanks Gary
0 Kudos
Message 18 of 26
(4,038 Views)

Hey Gary,

 

I hope all is still going well.

 

After scavenging all the examples I could find on scripting with markers:

Generating Waveforms with Markers - This script generates countUp and generates a marker event at samples 0 and 20.

script upOnlyWithMarkers
  generate countUp marker0 (0, 20)
end script

 

So there doesn't seem to be a way to script the width of the duty cycle.  However, and it seems you may have already seen this, you can use the property node to configure the marker event.  An example of this is seen at

Advanced Waveform Sequencing and Triggering on Arbitrary Waveform Generators, under Marker Events. 

 

Now you say that you have set a property node, and it's erroring out.  What error are you getting?

Regards,
Jake G.
National Instruments
Applications Engineer
0 Kudos
Message 19 of 26
(4,029 Views)

Hi Jake,

 

I'm almost there.

I was finally able to set the marker pulse width (I found the property node was position sensitive in that it must follow a select few VI or it just errors out with little explanation. ) only to discover that it's limited to 640nsec ... That was a complete waste of time. and I'm unable to find that limitation documented anywhere ?  It begs the question, why is the limitation there in the first place ?  😞   

I'm now on to trying to accomplish the last task ( Transmit/Receive switch control) using data events instead, but again , the documentation is sorely lacking.  Can I use data makers with scripting  ?   ie generate wfrm marker1(5000)   ... is there a similar function like : generate wfrm 1/datamarker0  ???  We're using scripting to generate waveforms and markers, but I need to use data markers...  is that supported in the script editor ? I can't find any examples of this . 

 

Thanks

 

Gary

0 Kudos
Message 20 of 26
(4,027 Views)