LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

advice on finishing touches for circuit.

hmm, its really wired, its like it opens up labview when you double click th file, but  then doesnt show the front panel or block diagram. and that zerro crossings justwont open as its in version 8, as apposed to v7.1

same thing happens when i try and open the file from within labview.
0 Kudos
Message 31 of 44
(1,018 Views)
Sorry, I had in my mind you were working in LabVIEW 8 (too much work on today!)
 
I've converted the VIs across to LV 7.1 and checked they open on my machine (although I don't have DAQmx on this one). Third time lucky hopefully.
 
Mark
0 Kudos
Message 32 of 44
(1,003 Views)
opens this time mate! you truly are a gentleman. top bloke. credit to NI. thankyou very much for all your help on this. 🙂

Griogair.
0 Kudos
Message 33 of 44
(993 Views)
Hi G,
 
<Phew> Thank God it opened this time (though I guess the wrong version posts were my fault!)
 
Thanks for your great feedback, Good Luck with the rest of your code, and have a great Easter!
 
Best wishes,
 
Mark
 
 
0 Kudos
Message 34 of 44
(986 Views)
you too mate. just a couple of minor questions though. it doesnt always take exactly 10 cycles. on a fs of 1K, read 1K, fund freq of 10Hz, for 10 cyles .but when i try changing it to 5 cyles. it will do that no problem at all. also, i take it 100.00m is the smallest that can be used. it doesnt like anything below that!?

cheers.
0 Kudos
Message 35 of 44
(984 Views)

Hi G,

 

I’ve tried the same thing on my machine (10Hz, 1kHz sampling rate and 1000 samples), and seen the same issue I think you’re seeing.

 

The problem is that if you’re taking 1 seconds worth of a 10Hz signal, you’re only just going to get 10 full cycles if the generator and sampler are deadly accurate (because the 10 full samples will take the whole of your sampling ‘window’), if either one of them drifts you may see slightly more or less than 10 full cycles.

 

This would be OK if the sampling window always started at a zero crossing point, BUT what I think the analogue level VI is doing is throwing away all the samples before the first positive going zero crossing, leaving you with an even smaller sampling window, and hence less than 10 full cycles of your waveform.

 

The answer I think is to increase the number of cycles you are sampling by at least a hundred, to cope with the possibility of a maximum of one period of your waveform having to be discarded as the analogue level waits for a zero cross.

 

I hope this makes sense! Please have a go at increasing the number of samples and see if this helps. The sub-vi should be fine as long as it sees the 10th zero cross fine (if it doesn’t I think it just returns the whole sample set.

 

Good Luck,

 

M.

0 Kudos
Message 36 of 44
(975 Views)
hmm, im really not sure if this is going to work. forgeting the (10Hz, 1kHz sampling rate and 1000 samples) for a minute, as its really (50Hz, 10kHz sampling rate and 2000samples, to give 10 cyles) that i need. increasing the sample rate yeiled less cycles. any ideas?
0 Kudos
Message 37 of 44
(971 Views)

Hi,

Took a while but I figured it out! The code you've got at the moment is only ever returning 1000 samples, no matter what you set the control to (hence if you try and sample 2000 samples and it only returns 1000, you see less wavelengths).

This can be fixed by connecting the samples to read terminal into the sample clock setup vi (see attached jpeg), which forces the VI to get that number of samples subsequently. I've checked this with 50Hz and 2200 samples on my machine, and it returns 10 cycles reliably.

Hope this helps!

Cheers,

M.

0 Kudos
Message 38 of 44
(968 Views)
perfection 🙂
0 Kudos
Message 39 of 44
(960 Views)
any ideas why i have to now multiply the 'detected fndamental freq' from the harm analyz vi by the sampling rate in order to get a realistic freq reading. never used to have to do that 😕 also, will this mean that other parmatres are not right to?

cheers.

G
0 Kudos
Message 40 of 44
(944 Views)