Showing results for 
Search instead for 
Did you mean: 

trigger to start and stop data collection

Good afternoon,

The attached VI that I have is used to collect vibration data. As it is right now I can set the time in hourly increments on when I want the VI to record data. I want to do away with the timed data collection and make it so that when the accelerometer signal reaches a certain level the VI collects data and then after it peaks and lowers to a specified level that it stops collecting data. I have manufactured parts running through a machine that spins them and everytime a part gets lowered into the machine and starts spinning, I want it to start collecting vibration data and after it is finished, to stop collecting data until the next part gets lowered into the machine and so on, but I don't want ot have to sit there and hit a button everytime. Once the acceleration signal starts ramping up, I want it to start data collection.  I am assuming that I can use the DAQmx Start , but I'm not exactly sure how to incorporate it. 





0 Kudos
Message 1 of 5

Hi John,

LV2015 is relatively new; if you back-save your VI ("save for previous version") more people will be able to look at it.


Without seeing your code I'm guessing you have built it based on a "finite" acquisition example. Take a look at a "continuous": acquisition example.  By continuously reading data, you can examine it and choose whether to capture or not.  I don't think you need to use an AI start trigger.



0 Kudos
Message 2 of 5

Thanks for the tip. And I attached a back save  LV2013 version of the code 

0 Kudos
Message 3 of 5

As you describe it, you have code that when you press a button (and generate a Boolean signal), you start Data Collection (you don't describe how you stop it, but I suppose it stops itself).  You mention lowering a part into a machine -- is there a sensor associated with that?  Can you read that sensor and get an Analog or (better) a Digital signal that says "Part is in Place"?  You can turn that signal into the same kind of Boolean that is represented by your Button Press, and off you go.


Oops, now I've taken a look at your code.  Not very good.  Open LabVIEW, look at some examples of Data Acquisition (I think there may be some Sample Projects that build an Acquisition system for you, using much better LabVIEW Practices and Design Principles).  Are there other LabVIEW gurus around to whom you can talk and from whom you can learn?


Bob Schor

Message 4 of 5

Thanks Bob,

No unfortunately I do not have any other LabVIEW gurus around. This code was written awhile ago by someone else and I am just trying to alter it for what I want to do. I will take a look at Data acquisition examples as you have suggested to see if I can find a better solution. 




0 Kudos
Message 5 of 5