LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect threshold crossing signal in Labview with NI USB 6008?

Hello everyone,

 

I'm doing research on the implementation of eye signals to control devices. i have a program to compare signals based on polarity like the attached VI. the program only shows polarity for half movements (?), such as from the eye when looking straight ahead (normal) then looking up. However when the eye is returned to its normal position it will produce the opposite signal and will detect movement as when looking down.

 

The attached program is made to see the polarity of the signal as shown in Figure A. When used to detect polarity in Figure B, it will detect up and down in a short time.

 

So, now i plan to detect full eye movement (normal - look up - back to normal) which produces a signal like a sinusoidal signal (like Figure B) for one move command. but I don't know how to detect the polarity when it crosses the threshold. I found reading about crossing threshold detection VI but using hardware FPGA module. Btw, the threshold that I use is +- 0.2.

 

Thank You,

 

Regards,

Alta.

 

 

 

B Full Signal.JPGA Up Down Signal.JPG 

0 Kudos
Message 1 of 4
(958 Views)

Unfortunately your uploaded vi is missing dependencies:

- several controls/typedef which are (e.g. movement.ctl, cutOff.ctl, Polaritas.ctl, etc)

- sub vi (e.g. Global Variable.vi)

It would be better if you put your source code in an organized Project and packed them in zip or Rar. additionally your sample signals would also be necessary.


Is This what you are looking for?

If yes, please find attached.

 

I made two Loop:

  1. The 1st Loop is Just to simulate your eye movement signal. (you can play with Up and/or Down key press)
  2. the 2nd Loop is might be what you are looking for.
0 Kudos
Message 2 of 4
(920 Views)

Hi ThamS, thanks for replying.

 

Here I include the rar file used.
This program is used to detect eye movements based on the polarity of the signal. the polarity detected on channel 1 and channel 2 is the half-signal polarity. I will make the results of this motion detection as a command input for the device.

in this program, the polarity relationship with the command as shown below.

1th algorithm.JPG

 

eye activity that is detected looking up is when the eye from its normal position then looks up. but when looking back to the normal position, a signal will be detected as when looking down.

 

So, I want to combine 2 eye movements to make one command. this way I have to determine the polarity of the signal for the 2 movements. where the polarity will cross the threshold. like the following picture.

 

2th algorithm.JPG

 

But i don't know how to detect the polarity if there's crossing threshold.

 

Thank You, 

Regards

 

Alta.

0 Kudos
Message 3 of 4
(902 Views)

Hi, you're always welcome. 
@AltairAquila wrote:

 

So, I want to combine 2 eye movements to make one command. this way I have to determine the polarity of the signal for the 2 movements. where the polarity will cross the threshold. like the following picture.

 

2th algorithm.JPG


Unfortunately, I don't clearly understand how to read your table. How does channels signal behave to vs the desired Threshold?

 

Can you visualize it? I.e. signal timing chart / sequence timing diagram. 

 

Also, you've mentioned the value of the Threshold of 0,2 on previous post. Please visualize it as well.

 


@AltairAquila wrote:

 

So, I want to combine 2 eye movements to make one command. this way I have to determine the polarity of the signal for the 2 movements.


Just to understand your application, 

 Does Ch1 and Ch2 means signal from each eyes respectively?

Or Ch1 and Ch2  for single eye movements?

0 Kudos
Message 4 of 4
(878 Views)