LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

urgent help neede plz!

been tearing my hair out for days! using an example that came with labview 'Cont Acq&Graph Voltage-Analog SW Trigger' (attached) the functionality is exactly what i need apart from one thing. i need to log data for say a period of an hour. but after every loop cycle this VI resets, thus data is lost. if i change the stop button to 'continue if true' it does what i want kind of!! it gathers al the data but the triggering is all to pot. i.e not capturing at the zero crossing (whcih is a fundamental  criteria for me)


tried using producer/consumer using a collector in my consumer. but same thing happens, i.e i just get the first 1 second worth as thats all i ask for. i need 10 cyles every second, with an interval of 10 seconds between each. please help!

any suggestions.

Message Edited by labnoob on 04-03-2006 06:58 AM

0 Kudos
Message 1 of 10
(3,316 Views)
Hi Labnoob,
 
This vi is designed to only aquire one burst of information once an analog trigger is received.  What exactly do you want your program to do?
Do you simply want to log a complete set of data, or just a number of samples after a trigger input (say half a second) over a period of hours?
 
The reason I'm asking this question is because it might be easier to simply log all of the data, over a period of hours, to a file and then read the data back afterwards.
 
Please post back and I will help you further
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 2 of 10
(3,274 Views)
Hi AdamB, my aim is to log a complete set of data. i.e i need to capture 10 complete cyles of a 50Hz signal (mains) every 10 seconds for a finite time.  possibly hours at a time. any ideas?

ive been mucking about with that example, but placing a write labview meaurement file. seems to work when i set it up to save the file automatifcally with a new name after every run. so i can get it to saeve the file as the date and time. though it may have been usefull to just save one big file with all the different runs. i thought that the option "apend to existing file" may have worked, but it never! 😞

can you see what im trying to achievce mate?
0 Kudos
Message 3 of 10
(3,271 Views)
Hi Tom,
 
Sorry it's taken so long to get back to you.  I've been experimenting with a number of different solutions and I think I have come up with the best one for yourself.
And I understand it you are fairly new to LabVIEW so I have create some example code that is less complicated than the ideal solution, but non the less will still work very well.
 
The code is documented and should be ready for you to run off the load (after setting up the channels) so that you can see if this gives you the functionality you need
 
Please post back if you have any more questions regarding the code and how it all works.
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 4 of 10
(3,233 Views)

Hi, AdamB, did you mean to post that here. my name isnt, Tom! lol

also, you never posted anycode.

thanks again for  your precious time.


0 Kudos
Message 5 of 10
(3,230 Views)
Ha ha.
 
Getting mixed up with names again!
Yep I meant to post here.  Here's the example code.
I have set it up to aquire from just the one channel for the moment.  It's up to you how you want to write the data to file.  As long as you put the wite to file inside the true statement of the case structure then it should work fine.
 
Please post back if it's managed to help (or not)
 
Thanx
 
AdamB
 
(you are on LV 8 right?)
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 6 of 10
(3,219 Views)
Hey again....
The example in 7.1 (just in case)
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 7 of 10
(3,216 Views)
lol, thanks m8. im lv7.1 🙂

just waiting for a computer with labview installed,  to become free. will i be able to eaily  implement your code in to a state diagram so i can have an analysis section and stuff?
0 Kudos
Message 8 of 10
(3,213 Views)

AH!

You never mentioned a state machine, You should be able to place it in there but not a simple drag and drop.

As long as you call the aquire function (and write if it's the right itteration) once every half a second or less then you shouldn't have a problem.  (The buffer will store the data you need)

Good luck

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 9 of 10
(3,209 Views)
lol, sorry m8. i will have a play about. thanks again and take care.


Griogair
0 Kudos
Message 10 of 10
(3,200 Views)