LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set a trigger that only changes between true and false when voltage goes above threshold and not when it goes below again?

Solved!
Go to solution

That is brilliant, thank you so much.
I will try to incorporate that into our experiment with our lasers.

 

Thank you

Mathias

0 Kudos
Message 11 of 19
(1,588 Views)

Again I really appreciate the help and apologize for repeatedly having questions.

 

I am struggling to adapt that code from a virtual fish to two voltage signals from the two lasers going over and under a threshold limit.

0 Kudos
Message 12 of 19
(1,585 Views)
Additionally, once the first laser is activated in tank A the system no longer thinks the fish is in tank A or tank B. It is "nowhere". It is not until it is finished breaking the lasers that the fish is defined at being in tank B. 
 
Reality is this:
It should be registered as being in tank A even when the first laser is broken alone, when both lasers are broken and when the second laser is broken alone. 
Only once the second laser is no longer being broken should the system define the fish as being in tank B. 
Same in reverse. The fish should be defined as being in tank B even while the second laser is broken and the first laser is broken. Only once the second laser is no longer broken followed by the first laser becoming unbroken should the system define the fish as having moved back to tank A.
 
It complicates it a lot but is a relatively important detail.
 
Best regards and much appreciate the help.
Mathias 
0 Kudos
Message 13 of 19
(1,581 Views)
Solution
Accepted by topic author Math808

@Math808 wrote:
It complicates it a lot but is a relatively important detail.
 

Not really. See if this gets you closer.... (of course there are many ways to do all that)

Message 14 of 19
(1,572 Views)

Altenbach:

 

Is your code 'scaleable'? 🙂

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 15 of 19
(1,538 Views)

@AnalogKid2DigitalMan wrote:

Altenbach:

 

Is your code 'scaleable'? 🙂


You mean for an infinite number of tanks, infinite number of fish, and an infinite number of tunnels with two lasers each?

 

Even for one fish and three tanks, the geometry could be linear with two passages (4 lasers) or triangular with three passages (6 lasers). For even larger system, you'll quickly run out of IO ports anyway.

 

So, no, it's probably not really scalable. 😄

(Of course if will scale well geometrically and, given correctly sized hardware, would work identically for a guppy or a blue whale. No change in code needed :D)

Message 16 of 19
(1,534 Views)

How do you change it from a virtual fish to two independent numerical control variables? So that the first numerical control simulates the activation of laser one and the second numerical control simulates the activation of laser 2, but with all the same principles where its the last laser that turns off that indicates the position of the fish.

 

Thank you 

Mathias

0 Kudos
Message 17 of 19
(1,520 Views)
Solution
Accepted by topic author Math808

@Math808 wrote:

How do you change it from a virtual fish to two independent numerical control variables? So that the first numerical control simulates the activation of laser one and the second numerical control simulates the activation of laser 2, but with all the same principles where its the last laser that turns off that indicates the position of the fish.

 


Well, these are booleans, not numericals (laser beam blocked? T|F).

 

Just turn the two laser booleans into controls and delete the slider and related code.

(later replace the controls with hardware IO, of course)

 

 

altenbach_0-1587763364377.png

 

 

Message 18 of 19
(1,517 Views)

Hi Altenbach,

 

It's been a few years now and thanks to your help we have successfully run a lot of experiments with this setup, so thank you for your help.

 

We are now scaling up the experiment, and to be honest, my LabVIEW skills are very rusty. 

 

We are now setting up 8 tanks lined up in a line and we have two lasers between each tank (14 lasers in total). How would you scale up this program so we can detect when the fish moves between the 8 tanks? Again it should have the same criteria for the order of breaking the lasers. For example, if the fish moves from Tank 1 to Tank 2 and there are two lasers (laser A & B) between Tank 1 and 2 (laser A being closest to Tank 1 and laser B being closest to Tank 2 inside the tunnel between Tanks 1 & 2) it's first gonna break laser A then break laser B then release laser A and then release laser B before the program says it has moved tanks.

 

I hope you can still help me with this, would very much appreciate it!

0 Kudos
Message 19 of 19
(621 Views)