LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Logic Issue

I have 2 sensors in a system.

Items pass these sensors.

First is an inductive sensor and only activated by a passing metal object, which is what we want.

Second is an IR Through Beam - if the Inductive sensor activates it means a metal object has passed so the second IR Through beam is redundant in that case

If the IR Through Beam is broken and the Inductive HASN'T been activated, it means the passing object isn't metal (in this case it's plastic).

So if Inductive is (A) and IR is (B)

Metal:

(A) will activate on its own very briefly
(B) activates also
(A) deactivates
(B) still activated on its own for a very brief period
(B) deactivates

Plastic:

(B) activates on it's own
(B) deactivates

I've knocked up a VI and Metal is easy enough - if (A) is activated, using an implies and not gate, I can make sure only once it enqueues 'metal'

But for the Plastic on, it works most of the time, but sometimes puts 'reject' onto the queue when a metal passes - i'm assuming that because of the subVI iterating quickly and the period when (B) remains on alone, this somehow picks it up as plastic.

Can anyone see where i'm going wrong?

Cheers 🙂

without getting this first bit right I can't sort the second inspection part as it relies on a successful decision from the first section to fully assertain what to do at the reject area following - nightmare! 😞
0 Kudos
Message 1 of 27
(3,723 Views)
You need to have a latch when you are detecting a metal object : detect the rising edge of the A signal, and memorize it until you detect the falling edge of the B signal.
Need sometime to translate that in LV. I suppose that you will do that faster than me ?
Let me know...

CC
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 27
(3,708 Views)
thanks for the swift reply.

that's sort of what i've tried to achieve with a while loop and shift registers in labview, but my limited experience has left some logical errors in there evidently!

what you said is what i've tried to achieve though - a latch on A that remains until the object fully passes B, where it is reset, ready for the next passing object - just translating that to LV is my issue :S

cheers 🙂
0 Kudos
Message 3 of 27
(3,705 Views)
Try that ! I use an OpenG trigger detect function. Could probably be optimized, but...

CC
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 27
(3,677 Views)
cheers - i'll take a look in a little bit - at first glance it's a wee bit confusing for me 😄 but the proof of the pudding is in the testing....................:D

that will be activated by the metal edge and stay on until the object has passed the IR beam then?

sweet 🙂
0 Kudos
Message 5 of 27
(3,664 Views)


@Michael Burgess wrote:
...that will be activated by the metal edge and stay on until the object has passed the IR beam then?

sweet 🙂



Weellll...
That's supposed to be ! Unfortunately my own portable metal/plastic detector is under repair and I could not test the vi 😄

CC
Chilly Charly    (aka CC)
0 Kudos
Message 6 of 27
(3,657 Views)