LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Gate and Trigger Function in giving output repeatedly for the set conditions in a loop

Hello everyone

I need some help. I am using an Inertial Measurement Unit (IMU) to get data from an Impact device. There are number of impacts in each experiment and I need certain number of data samples during the impact for each impact. I am trying to use Gate and Trigger function for this purpose. The problem I am facing is that I am able to get my required data set (data samples) only for the 1st Impact in the experiment using this function and nothing for all the impacts after 1st impact.

I am using Gate and Trigger function in another part of my program for a different task and its working fine for all the impacts but I am unable to make it work in this case. 

Please find the attached sample data file and the part of VI I am having problem with. In actual, the data would coming in real-time from the sensor. 

I have tried using manual trigger, replicating settings from working part of my program and some other things but nothing worked so far. I hope I have made myself clear. Please feel free to ask if anything is unclear. Please help me with this problem either using this approach or some other approach. Looking forward to your kind responses. Thanks in advance.

Best regards,

Fahad Bin Zahid

Download All
0 Kudos
Message 1 of 4
(2,459 Views)

What exactly are you trying to trigger on?

I see the Trigger and Gate is looking at Channel 0, which given the Array Subset is corresponding to your Pitch?

It triggers when falling below -85 and stops after rising about -75, is that right?

 

You can do this more clearly by avoiding the Express VIs.

Please clarify what you're trying to do and I'll try and post a simpler method (with easier to read code).

As a side note, it's not clear what your While loop is doing (although with the DDT, it's possible it is doing something despite constantly the same inputs...)

 

You might get some benefit (depending on how you're initially collecting the data from the sensor) with something like this:

bundle.png

Here I'm using a cluster (you'd want to make this a TypeDef so that you could later change the fields if needed and your code would automatically update) containing appropriate data fields (based on my guesses from the headers of the spreadsheet and the visible values). You can then unbundle them by name as needed.


GCentral
0 Kudos
Message 2 of 4
(2,368 Views)

Hi Fahad,

 

Could you please clarify a little bit about the problem you have been facing right now so we can narrow down the issue. May I know it's what you need right now is you need to read certain value from your test result ? . If yes, please clarify which of the result that you need to read ?. Base on the code that you have attach it look like you are reading the value for column 3 and column 4, and the value that it start to read is at value -85 .

 

Looking forward for more clarification

 

Regards

Naim

Application Engineer

National Instruments

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

Thank you everyone for your kind response.

The problem was solved the same day I posted the thread. I was applying gate and trigger function on the logged data from sensor. I applied gate and trigger function on the data directly from Arduino and the problem was solved.

0 Kudos
Message 4 of 4
(2,293 Views)