LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquisition of 2 analog signals sample rate

Hello

 

I have to acquire 2 analog signals with an amplitude of +-10 V and a Frequency from 1Hz to 10kHz.

I have a I/O-Card which I use to generate the AC-Signal (Picture 2 - signal generator). Then I give the signal on a sawyer tower circuit ( 2 capacitors - serial )

In the next step I use the I/O-Card to acquire 2 signals, visualize it on a XY-Graph (Picture 3 - hysteretis curve) and store them in a spreadsheet file. (Picture 1 -LV Program)

The first input signal Is the same like the output and the other one Is from the voltage divider point to ground.


Questions:

 

1) The sampling rate Is 500kS/s per channel and the "number of samples" Is the sampling rate / signal frequency

Then I have a measure time of 10 Periods (T=1/f)

-> Problem with 1Hz results 500'000 Samples. How can I limit the samples?

 

2) I have a ME RedLab I/O-Card 1208HS-4AO. The signals are not both on the zero line. The first signal Is ok but the second one have an DC-Offset of -2 to -3 V. Why?

 

3) How can I use a fitting without change my hysteresis curve? Is there an option to do something?

 

 

I hope anyone can help me because I'm an amateur and work every day on the project but without any help it's very difficult.


Best wishes

 

Johnny

0 Kudos
Message 1 of 6
(3,060 Views)

Hello,

 

in your program the sample rate is initialized in front of the while loop. So the program only asks one time for the sample rate. When I understand you in the right way then you want to change the sample rate in runtime in addiction to the frequency. This is only possibly when you put the sample rate function in the while loop.

 

When you have some problems with the ME RedLab I/O-Card 1208HS-4AO card, then the best thing is when you ask the producer of that hardware for support.

 

I don't really understand what you want to do at point three. Please describe it more precisely.

 

Regards

0 Kudos
Message 2 of 6
(3,007 Views)

Hello,


-I know because I have had some problems when I used a while loop so I decided to change it into a for loop. Now I start the measurement, read 10 periods and then I can save it. When I want to change the frequency I have to start a new measurement. But the problem is when I use a low frequency I have to many samples. An option will be to change the sampling rate = fixed Samples (as example 10000) / frequency. But it's not perfect to change the sampling rate.

 

-Today I have to test my circuit if there is a problem and then I will ask the producer of the HW

 

-I take 10 periods and want only to save 1 period. So it was the idea to take the mean of the 10 periods. But with 10000 Samples I have to take only every 1000 Sample and then take the mean. (example: 1= 8.91V ; 1000= 8.92V ..... 10000 = 8.915V) At the end I have the mean of 1000 Samples. But how can I realize this?

I can't use a Linear Fit.VI then I only have a straight line and I must have the hysteresic curve.

 

I hope you understand it now.

 


Best regards

 

Johnny

 

0 Kudos
Message 3 of 6
(2,990 Views)

Hello,

 

so you want to make an ouput where only every 10th measurment is shown. I made an short example where you can see a method how this could be realised.

 

You can make this with every period and after that you can put the 10 arrays together and make so a ouput from the 10 periods.

 

I hope this will help you.

 

Regards

0 Kudos
Message 4 of 6
(2,970 Views)

Hello

 

I'm sorry I haven't the time to try the example before because I have a lot of work.
Now I can't open your example because I use only LV-Version 2009.

 

Can you please send me the example in this version?

 

But I'm not sure if you really understand what I want to do. Not that you make en effort and it's not this what I want. So I will describe it a second time:


As Example:

 

I have 1000 samples. This are 10 periods ( T=1/f)

So I want only 1 period. (Example: measurement1= 0V; m2=0.1V; ...... 100= 0.02V ; 101 = 0.11V; .... 901 = 0.01V; 902 = 0.14V; ...)

 

Then I want take the mean ( of 0+100+200+..+1000 and 1+101+201+..901 and so on) and at the end I have 100 measurements of one period.

 

And the sample rate is variable. But this I can realize with a Local Variable I think (at the N-Wire of a For-Loop)

 

 

Thank you and best regards

 

Johnny

0 Kudos
Message 5 of 6
(2,949 Views)

I forgot: I solved the problem with the DC Offset of the RedLab I/O-Card 1208HS-4AO. The Support of the Producer said that I have to use an 1MOhm potentiometer and to connect between the Analog Input (with de DC Offset) and the 5V DC Output of the Card. Then you can adjust the resistor and the DC Offset "disappears". The Problem is the internal circuit, a transistor works not optimal with a to low current.

0 Kudos
Message 6 of 6
(2,944 Views)