LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To send appended ascending ramp with sine to oscilloscope through board AT-MIO-16XE-50

Hello everybody
 
first i wish  happy new year and all the best to all the members.
i am using labview 8,0 and AT-MIO-16 XE- 50 board.
 
now i have following questions/problems.
 
1) in the first VI i am appending  the ascending ramp with the descending ramp and sending throught the board to the oscilloscope. what i see on the graph or on the computer display , it  is perfect but when this signal reaches the oscilloscope it shows only the descending part but not the ascending part of the signal. why it is like this? why dont  i  see on the oscilloscope first the ascending ramp and then a ramp appended to it and descend to zero again. why only on the labview graph i can see this but not the the oscilloscope.
2) here it is also the same problem. iam appending ascending ramp with sine and diplaying it on the labview graph. so far it is ok but once again when i send it to the oscilloscope, i dont see the first ascending signal on the oscilloscope but i see only the sine signal, which is the last appended part of the signal. so i would like to ask why dont i see each part of the signal appended with each other on the oscilloscope like i see on the labview graph?
3) in the last example is my objective that i want to send an ascending  ramp appended to  a sine, in result that is appended to a descending ramp. here again on the labview computer graph it works fine but when i send all these appended signals to oscilloscope, i see only the l last appended part. why?
i would be very grateful if somebody help me in this issue.
Regards
Hood
 
 
0 Kudos
Message 1 of 14
(3,039 Views)

Hi,

Either Post a pic of your block diagrams or 'save for previous' version and paste your VI's

 

0 Kudos
Message 2 of 14
(3,026 Views)
Hallo
ok i am sending all files in zip format.
thanks
0 Kudos
Message 3 of 14
(3,020 Views)
Sorry Hood,
 
I could not unzip the attachment.
 
0 Kudos
Message 4 of 14
(3,000 Views)
Hallo

I will send today each file in separate and i also got some success sending this signals using another output functions. this i will also send you.
Thanks
0 Kudos
Message 5 of 14
(2,993 Views)
Hallo,
now i am sending all the VIS in previuos version. in the first zipped folder i am using AO functions to output the tsignal to oscilloscope. but it is not working with this approach.
in the new approach i am able to send the signals to oscilloscope by using AO wave output function.it works here but the problem is not yet solved. because in this case i see the ascending ramp on oscilloscope then the sine and then the descending ramp that brings the sine back to zero. but what between ascending and descending ramp?here i want to run the sine for certain time and with certain  objective.this i explain in my last zipped folder what my intentions are with the sine?
ok i hope i have  explain my questions.
thanks regards
Download All
0 Kudos
Message 6 of 14
(2,987 Views)

Hi Hood,

Here is a simple VI to get the waveform pattern you want to generate.

Just generate the final resultant pattern on your analog output channel

Modify it as per your requirement

Regards

Dev

 

Message 7 of 14
(2,983 Views)
Hi devchander,

Thanks for the the tips. actually i the waveform pattern you suggested, i was producing also before but with different method. you suggested instead of waveform append, build array function. may be you have also noticed in my VIs. but the problem is when i am sending this pattern to osilloscope through the board i am facing problems.
so now when we use this pattern(you suggested or mine VI ), when i start generating it and sending to board through method1(that is using AO write, Ao start functions ), this pattern would not appear on the osillosope display. when i use other AO wave function, then it appears on the osilloscope but if use it under while loop, it generates whole pattern again and again. what i would like to do is to send ascending ramp only once and then i want to send  a few thousand sine periods/cycles and when this cycles finish, i would like to send a descending ramp. morover when i contnuously run it under while loop. i see the pattern rise -sine- fall pattern again and again till i stop it or it shows an error19843 at Ao wait: Ao buffer.
what i tried to avoid this in a  third VI and attached rise VI with case and fall vi also attached with case, i set a value 1 as an input to sine frequency and then i run the sine one cycle in a loop. due to loop after every loop  i see the very very small delay when the new cycle begins.
the final thing is how can i then control this sine when i am continuosly run it in a loop. i think this sine signal is the root of the problem. because i did not find any sine signal generating function to which i can control like if i want to send 4 cycles or 400000 cycles or if i want to control that i want to genearte it for 40 minutes or for 3 days days. here in this basic function generator,if i set frequency 1 then it is not frequency 1 but cycle 1(why  it is given that it is frequency?). if  want to run the signal for few hours. so that i calculte cycles of my own, it is also not possible with this basic sine generator VI.why this sine generator cannot take cycle/periods, frequency and time as an input and generte the signal that is based on these three parameters. why this input frequency parameter is not the real input freuency? how should i treat it? cycle or frequency. if frequency then when  iset the frequency 1 without while loop, i see only cycle on the oscillosopce and when i set this input frequency parameter 20(also without while loop), isee exact 20 cycles on the oscilloscope and then if  iput a while loop after each pattern repeptition isee a very small delay(this is due to while loop). so my question is to this sine genertor at which point shall i give frequency(in HZ) as an input, number of cycles also as input and time to run all these cycles also as an input. i think therfore this sine genertor VIs are not complete.
please clarify my confusion about this sine generator . i would be very grateful.
Regards
Hood
0 Kudos
Message 8 of 14
(2,979 Views)
sorry i forget to send all these VIS in previous version. i am sending it again in the previos version.
regards
0 Kudos
Message 9 of 14
(2,963 Views)

Hi Hood,

Let me answer your last question first.

Here is a brief explanation for how the output signal's frequency is determined.

To control the frequency, all you have to do is toy around with the update rate, cycles per buffer  and the buffer length

For ex,  if cycles per buffer = 10 and buffer length = 1000, effectively, each sinusoidal oscillation in the generated waveform will be represented by 100 points.

Now  if update rate = 1000, then you will get a sine wave of frequency 10 hz on the selected AO channel.

in the same case, if you bring the update rate to 100, frequency of sine wave generated on Analog output becomes 1 Hz.

for going to higher sampling rates, take a larger buffer size, suitable update rate and increase number of cycles

Just keep in mind, lesser number of samples per cycle, poorer will the quality of your generated sine wave be.

so represent each sinusoidal cycle by suitable number of points.(practically i have observed that each sine wave represented by more that 20 points looks decent. but the fact is that more number of points, the better sine wave you get )

hope you get the idea.

so a buffer size of 10000, cycles per buffer 100 and update rate 10000 give a sine signal of frequency 100 hz.

check out the maximum update rate and permitted buffer size that the AO of your DAQ card supports to calculate the max frequency you can generate using this VI.

I will get back with an answer for your first query on generation

Regards

Dev

 

 

0 Kudos
Message 10 of 14
(2,963 Views)