01-06-2006 12:44 AM
01-07-2006 01:41 AM
Hi Rishe,
There is no synchronisation between your AI and AO.
In your VI, for each iteration, Analog Output is generated, After it is completed, AI measure will execute ( it can happen vice versa too)
so you will not be able to achieve what you wanted to.
Go for a multi function sync program
Look at attached VI to get an idea
If u need any clarifications, do get back.
Regards
Dev
01-08-2006 08:26 PM
Dear Dev,
Thanks for your kind response.
I sort of understand the program u mentioned and i changed my program according to that. but still the same problem exists. simply, when i change the parameters of my input signal (in this program mainly the frequency and amplitude of the sine waveform) during runtime, (signal to be read), it doesnt seem to change at all. in other words, the program reads the signal with the parameters set before the start running the program. once the program starts running, whatever change i make doesnt have any effect at all.
with the previous program it changed, but happened only after a certain time delay. I dont know whats the reason behind it. could u please assist me again. please find the new program attached.
thanks a lot for your help.
Rishe.
01-08-2006 10:53 PM - edited 01-08-2006 10:53 PM
Hi Rishe,
You will observe that in the attached VI, the analog output configuration/ setting the frequency, amplitude parameters of the generated sine wave happens outside the while loop. Hence inside the while loop, only continous sine wave generation can be seen
To change the generated sine wave's parameters on the fly ( during generation), use this VI
Regards
Dev
Message Edited by devchander on 01-08-2006 10:55 PM
01-09-2006 09:30 PM
Dear Dev,
Once again thanks for your help.
this is great, i changed the program according to your instructions, and it works perfectly.
except that one problem still remains: the time delay between the generation and acquistion. when i make changes to the input parameters, (that goes in to daqmx-write) during runtime, it changes immediately but acquired (through daqmx-read) only after 10 seconds.
Could you please assist with this one too. i attached the program with changes done.
thanks a lot mate.
Rishe.
01-10-2006 05:07 AM
Hi Rishe,
Run this attached VI.
I do not have a DAQ card with me today, and so i could not test the code on hardware.
let me know how it works.
Regards
01-10-2006 11:12 PM
Hi Dev,
Thanks again. I changed the program. all i had to do was to add a property node, to avoid regeneration of the samples. i dont understand what it does, but it serves its purpose. so the program updates the signal fairly quickly. i still have like 1.5 - 2 sec delay but i think i can live with that. once again thanks for your help dev.
look out for me dev, i will come up with more questions. 🙂
many thanks.
Rishe.
01-10-2006 11:35 PM
Hey Rishe,
Glad to have been of help.
To put it briefly, the "do not allow Regeneration" property does this- "new data has to be provided throughout the duration of the continuous Analog Output operation. This allows the generation of any arbitrary frequency as this VI computes new data for each iteration of the loop, maintaining phase continuity of the signal"
If you allow regeneration, The signal you want to generate is written into the AO buffer.
On each AO write Iteration, the write marker returns to the beginning of the buffer after the device generates all samples currently in the buffer and teh same signal is generated repeatedly.
Do go ahead and keep posting your queries.
all the best
Regards
Dev
01-12-2006 12:40 AM
01-12-2006 02:33 AM