LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to emulate the characteristics of germanium transistors using the Y[i]=Clip{X[i]}PtByPt.vi and two simulated arbitrary waveforms

I am trying to emulate the clipping characteristics of germanium transistors. To do this I am using the Y[i]=Clip{X[i]}PtByPt.vi and two simulated arbitrary waveforms( one for the upper limit and one for lower limit) My main problem is that  regardless of the input signals amplitude the output of the Y[i]=Clip{X[i]}PtByPt.vi is the input of the lower limit and if I only have an input for the upper limit the output is the same. My data type for the input signal to be clipped is dynamic and so is my arbitrary simulated clipping waveforms. My second problem is that the Simulated arbitrary waveforms from recorded data of the germanium transistors don’t seem to be outputting at the right period length as the data was taken. Such that right now I am using a wave form that is 100 points which was decimated from a set of 1700 points. When both the 100pt. and 1700pt. data sets are used at the same time in the simulated arbitrary waveform generator they have different periods. In the data they both have the same time length. My second problem is that I can’t seem to reset the simulated arbitrary waveforms properly. What I need to do is reset the clipping wave form whenever X[i] = 0 or since X[i] is never at exactly zero,  whenever X[i]>0 for upper limit & X[i]<0 for lower limit. My last problem has something to do with my misunderstanding of data types. I can output my input wave form which is dynamic to my DAQ Analog out, but I can not out put my simulated arbitrary waveforms (dynamic) or my Y[i]=Clip{X[i]}PtByPt.vi output wave form(SGL), although I can see the wave forms on my graphs. I have searched through many examples and threads and have fixed many problems so far but I can not seem to figure these problems out. I appreciate your help very much, Thank you, sincerely, Forrest

0 Kudos
Message 1 of 12
(4,301 Views)
Hi, Forrest.

Let me make sure I'm understanding you correctly. Here are the problems you're encountering:

1. You cannot output a signal that comes from a dynamic data type.
2. Y[i]=Clip{X[i]}PtByPt.vi doesn't seem to be working correctly.
3. The Simulate Arbitrary Signal Express VI doesn't seem to be simulating the data correctly.

I'll address these in order.

1. Can you tell me a little more about how you're unable to output the data? Are you receiving an error, is the wire broken, or are you actually reading the output and not seeing your signal?

2. I'm a little bit confused about this -- the clipped signal seems to be exactly as it should be. I resized your graphs so that this can be demonstrated a little more clearly. (See attached VI.)

3. All the timing in this VI comes from the value specifed as dX inside the Define Signal dialog box. So even though you may have supplied Simulate Arbitrary Signal (SAS) with data that you acquired at some other frequency, that acquired timing will not automatically be transferred into the SAS settings. (But you can simply add it yourself as the dX.)

Let me know how it goes! Good luck.


Message Edited by sarahk on 04-17-2006 02:43 PM

Sarah K.
Search PME
National Instruments
Message 3 of 12
(4,283 Views)

Sarah K.,

 Thanks,

I just can’t seem to get those graphs right

 

OK

1.)     With my Digital to Analog out connected to the input signal (Gain and DC) my oscilloscope shows the same as the graph of (Gain and DC).

With my Digital to Analog out connected to the output signal of the clipping function my oscilloscope shows no signal at all. Although I do see a signal shown on graph of (Clipped signal).

 

2.)      You are right that the signal is clipping properly, but that is only for a DC signal.

With DC set to zero and AC gain set to anything, regardless of the amplitude there is no clipping or even signal coming out of the clipping function.

 

3.)        Right now with the arbitrary signal my defined signals consists of about 100 data points with dX of the defined data points at 106usec. Where the timing of the data points are 106usec. So my timing is one to one. By making the timing different in the box labeled dX you choose the amount of samples per sec. from your curve that is created from your data points. To verify this I changed my timing to dX=1.06usec. and it picks 9600data points from my curve. And after doing this my period has stayed the same.

The thing that I do not understand is (106usec.)x(100data points) is equal to 10.6msec.

The Sim. Arb. signal is putting out a signal that is about 1.sec and 45msec long.      

 

4.) If we can work these out I am also having troubles resetting the SAS for each time the input signal crosses the origin.

 

Thank you so very much

Sincerely,

         Forrest

 

0 Kudos
Message 4 of 12
(4,271 Views)
Hi, Forrest.

1. What hardware are you using to output your signal?

2. It looks like you need to do some debugging in the upper-left portion of your VI (in which you do the signal manipulation -- multiplication, addition, etc.) I verified that the clipping works correctly with a square wave as well as a DC with the specs you suggested. (See attached VI. It's easier to verify the square wave if you give it a frequency of 1.)

3. I'm having trouble picturing exactly what the discrepancy is. Would you mind posting a screenshot of the two sets of data in some graphs so I can gain a clearer understanding?

4. Can you be a little more specific about the type of troubles you're encountering?

Let me know! Have a nice afternoon.
Sarah K.
Search PME
National Instruments
Message 5 of 12
(4,255 Views)

Hi,

I have just realized that I am having trouble opening the Labveiw files that you sent. I have Labview 7.1 and every time I try to open them an additional promt screen appears with the New, Open, Configure, Help options.

 

1.) The NI-DAQmx device that I am using is a “PCI-6221”.

           

            2.)  The Input signal to be used with this program is a guitar signal. So the program has to operate from a signal that is in between a sine wave and a triangle wave with maximum amplitude of .1mV and a frequency range of 200Hz.-20kHz.

            Success! (Kind of) I have found out that it does work with a sine wave, but it only works from .1Hz.-4.9Hz. until the frequency is at 5Hz. Then the output is zero. So much for the 200Hz. – 20 kHz.

 

3.)                            The frequency of the SAS is .28Hz. The frequency of the defined signal from the data that has already been taken is 50Hz. When you define what dX is in the SAS my frequency should be 50Hz. But it is .28Hz.

4.)                            When you apply a true command to the reset SAS it will not come back on until the command is false. I can not find any way that it is possible to pulse a true when the amplitude is at a certain value range like 0 to .001mV. when I say x>0 and x<.001 and put both of them into an “AND” Boolean the data types conflict for Y such that source is dynamic and sink “Y” must be a Boolean data type.

Much thanks,

        Forrest 

0 Kudos
Message 6 of 12
(4,246 Views)
Hi, Forrest.

1. Are you able to output other signals successfully (for example, with the test panels in Measurement and Automation Explorer)?

2. I see what you mean. That seeming limit occurs because it just so happens that the clipping VI is sampling that sine wave around zero at that frequency. If you run the code I sent last time with an offset of 2 and a frequency of 50 Hz, you should see the clipping you'd expect. (Because the sine wave is centered around two, not zero.)

3. What dX are you using to simulate the 50Hz signal?

4. Can you post a screenshot of the segment of code in question? I'm confused about the type of data conflict you're seeing.

Have a nice night!
Sarah K.
Search PME
National Instruments
Message 7 of 12
(4,236 Views)

Hi, Sarah.

 

1.      Yes, in fact I can output the signal before it goes into the clipping section. My data type into the clipping section is dynamic and after it is single 32bit real.

2.      I can’t run the files that you posted. I think it is do to the fact that I have Labview 7.1

With an off set of 2 the sine wave no matter what frequency is not even going to be in any range of the clipping wave form. So it is going to return just the clipping wave form. If you play with the frequency in the file I posted you will see that the clipping effect that I need is best seen at 0.1hz. You can vary the Gain and apply a little (0.2 to -0.2volt) DC offset to see what I am looking for. If you play with the frequency something happens when you approach 10hz. And decades of ten (10, 20,30,40-1000).

3.      I am using a dX which is the same as my dT (sampling rate of the defined signal. 106.0u) It does not even matter if I have a dX of 1 with one point nothing changes at all. It has the same wave form and frequency. What does seem to make a difference in frequency is the amount of data points. The more data points the lower the frequency regardless of any dX or dT.

4.      I‘ve gotten around this problem.

 

Thanks,

    Forrest
0 Kudos
Message 8 of 12
(4,211 Views)
Forrest,

Part of your problem with the clipping is that you are feeding an array of points to the Clipping PtbyPt.vi. It only appears to be looking at the last data point in the array. Your Arbitrary signal simulators are generating one point per iteration, the Sine simulator generates 16000 samples per iteration at acquisition timing, and the DC simulator generates 16000 samples as fast as possible. Put probes on some of those points and add a Wait(ms) function with about 100 ms delay and you can see what is happening. If you look at the Clipping PtbyPt.vi diagram, it is just two Max-Min functions.

I presume what you have posted is simplification of your overall program. For example: ANDing a TRUE with "anything" always produces "anything." Multiplying and dividing the volume by 10 does not change the result. I recommend that you try to use right to left wiring and avoid running wires under objects. It makes understanding and troubleshooting much easier. Look at the Style guides.

Lynn
0 Kudos
Message 9 of 12
(4,203 Views)

Lynn,

        Thanks for the tip about the probes. How can you tell that the arbitary gen is only getting one point per iteration? Are there five points per iteration for my input signal or 16000. I thought I was running at a continous operation. How does applying a wait(ms) help and where do I apply it? How come changing the dX of my arb gen doesn't affect anything?  Your right about dividing and multiplying but they were just ten for the time being for simplification. Where are you talking about ANDing a TRUE with "anything" always produces "anything." ? On the reset of the arb gen? I have organized my wiring so its better to troubleshoot.

Thank you,

          Forrest

Message Edited by Forrest on 04-27-2006 08:37 PM

0 Kudos
Message 10 of 12
(4,201 Views)