05-19-2011 05:34 PM
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?
05-20-2011 11:43 AM
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
05-20-2011 11:48 AM
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
05-20-2011 05:42 PM
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.
05-24-2011 07:46 AM
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.
05-25-2011 11:03 AM
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
05-26-2011 06:31 PM
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.
05-30-2011 05:44 PM
06-01-2011 08:21 AM
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?
06-01-2011 09:45 AM
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