09-11-2013 06:48 AM - edited 09-11-2013 06:52 AM
Hello,
i've some problems with RFSG(5673) arb. waveform streaming generation. My waveform have low samplerate - 9000 kHz and also I have to write waveform by pieces of 300 samples(renew signal for every 30 ms because input parametres change at such). Also we need to have small latency between input parametres and outpu RF signal - so i have to preload only two pieces of waveform in allocated RFSG memory before initiating generation.
And now i have problem - if i preload less than eight pieces of waveform, niRFSG Initiate.vi gives me an error:
-1074118136
niRFSG Initiate.vi<ERR>The AWG reported the following error:
The data being written to the streaming waveform cannot keep up with the output.<LF/>Decrease the sample rate or write data to the streaming waveform more frequently.
Status Code: -219106
Also, while waveform is generating if there are less than 4 pieces of waveform in memory, i'll get the same error, but really i my code is able support new pieces of waveform on the fly and don't let flush the RFSG memory.
How can i avoid this error?
Should i increase samplerate to have more samples be written while preloading?
Thank you,
Andrey
09-11-2013 07:36 AM
Sorry, samplerate in first post is not correct. 9 kHz is correct, not 9000 kHz
09-11-2013 10:07 AM
I am not sure how you have architected your code but you may want to take a look at Producer-Consumer Application Design Patter :
http://www.ni.com/white-paper/3023/en
Here you are conducting the process of "creating the data" and "writing to RFSG and streaming" parallely. That way RFSG is not going into the mode of waiting for the data.
Hope this will help.
09-11-2013 10:39 AM
Or you may want to download this example.
from
http://zone.ni.com/devzone/cda/epd/p/id/5894
which uses the architecture Sastry references.
Or, another example that is more flexible (can handle multi channels/chassis, but also just 1 channel) is
NI RF Multi-Channel 1.2.2
09-11-2013 12:17 PM
Thank you, Sastry. I actually use Producer-Consumer Architecture. And i'm sure that there are still some samples in RFSG(5673e, not 5673) memory when error appears - SpaceAvailInStreamingWfm RFSG's property indicate me little bit less than 600 samples are still in memory (i write 300 samples by one time and whole allocated memory is 3000 samples).
My problem is looks like that one: http://forums.ni.com/t5/RF-Measurement-Devices/NI-RFSG-Instrument-Driver-Programming-Flow/td-p/13302... . As I understood I have to keep a lot of data in memory, but in my caase I can't because of requirements for latency between inputs and outputs
09-11-2013 12:24 PM
Thank you, Nemo.
As i can see in example you suggested there is a mention of this error in Stream NI-RFSG.vi (see attached file). They just clear error when generation is getting to the end. So it is known problem. In my case error appears while generation is doing because i keep low amount of samples in RFSG memory, i think. May be i should to write samples in even smaller pieces??
09-11-2013 12:48 PM
One approach might be to run one of the examples I referenced and, assuming it does not give an error when generating, probe the size of data being written to the queue and generator. You can them do the same.
Or, if the example is working, you can just use the example and modify it to do what you need. Note that if you are processing your data on-the-fly, you may need to create yet a 3rd loop so that the processing does not slow down your other loops, causing the underflow error you are getting.