LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parallel port sample rate

Hi,
 
I`m desperately in need of your help.
For my school project, I`m trying to write a labview code in order to acquire air pressure data by using 8-bit analog digital converter via parallel port. Although my signal frequency very low -100 Hz-I think  I experience sampling rate problem. I  want to put sample rate and frequency data in my code but  how can I put it in my code?I `m giving square waveform via function generator which I need to see it on my graph in Labview. But there is something wrong in my signal in waveform chart. You can see screenshot and code attached.  . Also there are some noises and amplitude is not stable . How can I fix this?
 
Would you please have a look at to my code and tell me how can I set sample rate and frequency?
 
 
0 Kudos
Message 1 of 4
(3,332 Views)

Hello LW-s,

There is a good tutorial on www.ni.com that might get you started. Here is the link:

Using the Parallel Port in LabVIEW
http://zone.ni.com/devzone/conceptd.nsf/webmain/72C6FC6CE4AD4D1386256B1800794596?opendocument

Good luck!

Chris J

0 Kudos
Message 2 of 4
(3,300 Views)

i think i have done parallel port communication correctly. i can see correct shapes of the waves that i give through parallel port on the display. i see square wave when i send square wave from the signal generator and sinus wave when i send sinus etc.

but the problem is that the waves i see on the display are not smooth as i see on the osiloscope.

i think there is a sampling rate problem. but i couldn`t find a way to state my sampling frequency on the code. would you help me to smooth the waves.

here i attach the square wave i acquire.

0 Kudos
Message 3 of 4
(3,288 Views)

Hi LW-s

There isn't really a way to set the sampling rate for these VIs. You will have to use software timing. The only way to do this is with 'wait' functions inside your loop. You can also implement some logic to smooth/adjust your waveforms.  For a square wave the logic is pretty simple. If the input value is above a threshold store it as the max and if it is below the threshold store it as the min. (See the example below). For sine waves this is a bit more difficult and if I were you I would probably try to implement some sort of averaging. 

Best Regards,

Chris J

Message Edited by ChrisJ on 08-23-2005 05:31 PM

0 Kudos
Message 4 of 4
(3,261 Views)