Dear JCC(SK)
Many thanks for your help. well i checked your VI and othe basis, i have few questions, difficult for me and i dont find the answer of these questions. please help me.
i added two more Function generator, and i discuss each in detail why did i add two and what are the problems i am facing, after addition of every Function generator.
1) in my first generator(that sub vi i am using two times to generate sine). first sine generating sub vi, when i send 1 period, on osilloscope i see 2 periods, when i send 2 periods, on oscilloscope i see 3 periods, and so on so forth. every time one more period than actually i send is displayed. why?
2) always there is a delay(word document attached) after every period. i think this is due to this repetition in while loop, as you said 50,000 times 1 period displayed.i thought this may be due to the time delay of loop. i reduced time on the timer and increse the timer, but no good results .well this problem is present in my all of three generated sines.
3)when i set 0 parameter for AO start, then there is a continuous and very nice smooth display of sine(such a display is required when i set parameter 1) , but the bad news here by setting this parameter to 0 is that i cannot pause any more or stop any more.after setting this parameter to 0, the program is out of control. only then i have to abort the program. why?
4) i added one more channel and obviously one more source(my sub vi). good news is that this sub vis is also taking value from period variable. that means period act like a global variable, and it runs as much as periods i define. but the bad news is that again this sub vi on different channel(1) also display the same results like the 1st VI. i mean delay between periods.
5) the third sine sub vi source i took (Function generator).it is simple, has only frequency and amplitude) when i am adding its result wave to my other source (Sub vi). i am getting delay again after addition of two sine waves. i think a little dely from 1st sine( MY sine sub vi) and the second dely from Function generator(the simple sine array source).the good news here again that when i run the 1st,second and third source, it finishes execution as soon as number of given periods finishes.
6)Now very very important issue.and that is let us talk about periods,time relation ship.
if i give in the field of periods 100 periods as input and if i give input frequency(for 1st my sub_VI source 1.6HZ frequency). on this basis i calculate the total time required. it is 62.5 seconds. as you can see in the indicator this periods must take 62.5 seconds for execution or displaying on osilloscope. but the bad news is that these 100 periods with 1,6 HZ frequency take around 16 seconds to finish their execution. another example if i select 50,000 periods with 1,6 Hz frequency.these periods must finish in 31250 seconds. but in this case they are finishing execution early. why these periods does not pass the mathematical calculaton/definition of periods, frequency, time relationship? And you know this is very important ,because when you give N number of periods, according to frequency, youmust acheive corresponding time.
7) why i am interested in all these, i would like to tell you that i have two cylinders, one cylinder i am moving vertically. for this vertical movement/osillation i need addition of two sines.one sine that that has assymetric amplitude e.g, from 5 to
- 7( the word document of the sine wave that is not the true sine attached). this sine wave( my 1st sub_vi for sine wave generation), the user input is max ampl, min amplitude(frequency in Double) and the total number of periods.
in the second sine that i add to first sine( user input is frequency ampitude and corresponding periods).
here i want to mention, if i have total number of periods for first sine wave and the frequency, i can calculate the total time , that i am doing already but as i said I am not getting correct and corresponding total time.
well this addition of sine waves was for vertical movement of cylinder.
😎 for the horizontal movement of the cylinder, i am using another channel and sub vi source. there again the delay problem appear.
i hope, now i explain every thing in detail, so that you have clear picture,when you are answering me.
9) I am using AT-MIO-16XE-50 board from NI .
I think these problems are due to some bug in AO start, that is.when you start generation, you cannot pause resume it any more. i dont know whether i am right or wrong.
well with the answers of my questions, i learned a lot from you and all other colleges they help me about Labview and i would be very thankful and grateful to you and other colleges who help me on this forum.
have a nice day.
Regards
Hood