LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like a particular step to be repeated 360 times per second...

So far, I have tried using the simulate signal vi and created a square wave at 360 Hz. I am then using the basic trigger detection vi to determine when the square wave reaches it's peak value (which should be 360 times per second, right?).

 

I then have a boolean indicator to show when the trigger is detected. This signal will eventually be used in a case structure to tell the program when to go through with a particular step (the one that should be 360 times per second). However, as you can see from my attached vi, the indicator shows that the trigger is not going off 360 times per second. Any ideas on what I am doing wrong?

0 Kudos
Message 1 of 9
(2,782 Views)

Your VI doesn't seem to match your description.

 

I don't see a Simulate Signal or a square wave.  I see a DAQ Assistant.

 

I don't see a case structure, I don't see a boolean indicator, I don't see anything that is related to 360 times per second.

0 Kudos
Message 2 of 9
(2,780 Views)

Sorry, I accidentally attached the wrong file. Here is the correct one.

0 Kudos
Message 3 of 9
(2,742 Views)

Here is the correct file

0 Kudos
Message 4 of 9
(2,738 Views)

I'm pretty sure Basic Level Trigger Detection only returns the first trigger. You can either modify the sub VI to return multiple triggers (not hard) or repeatedly run BLTD and reset it after every trigger is found.

---
CLA
0 Kudos
Message 5 of 9
(2,722 Views)

Can you explain what you mean about editing the subVI?

0 Kudos
Message 6 of 9
(2,713 Views)

Have a look at the following for one way of getting this done: https://decibel.ni.com/content/docs/DOC-21702

 

Regarding editing the VI, the BLTD VI calls a library function to find all crossing points in the input data. It's just that it's been wired only to return the first trigger, rather than the subsequent ones.

 

Somebody on here did a fantastic job a while back of creating a VI called "Detect All Triggers" where they've edited BLTD, but I'll be damned if I can find it anymore.


Edit - found a version of it here: http://forums.ni.com/t5/LabVIEW/Reading-Digital-Pulses-from-a-Flowmeter/m-p/641648#M296477

---
CLA
0 Kudos
Message 7 of 9
(2,703 Views)

How do I actually edit the BLTD? When I double click on the icon, I just see things to change settings that are already inputs to the vi (level, hysteresis,etc.)

0 Kudos
Message 8 of 9
(2,698 Views)

Hi Laura, 

 

i would recommend some general LabVIEW Training like our online resources. 

 

You can visit -> http://www.ni.com/gettingstarted/

 

Here you can learn the basics and how you can create applications. 

 

The best way would be to visit our training courses:

http://sine.ni.com/tacs/app/fp/p/ap/ov/lang/de/ol/de/oc/de/pg/1/sn/n8:28/

 

Greetings from Munich.

Andreas K

0 Kudos
Message 9 of 9
(2,659 Views)