LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA

Hi NI Community this is my first time posting on a forum. I have an issue where I implemented a falling edge trigger using a NOT and a NOR gate together. It works fine once but when I press the button again it does not want to detect the falling edge again. What is the issue with it? Is it a logic error? How do I solve it? The equipment I am using is a myRio-1900

UltrasonicSensor.png

0 Kudos
Message 1 of 5
(2,043 Views)

The logic appears to be fine. I think?

I would suggest using a Feedback node rather than two Shift Registers though, especially since it seems that the two Shift Registers are always identical (and so you only need one data source, not two!).

 

It makes it a bit more compact and easier to understand (hopefully you agree):

Example_VI.png

Here I right clicked on the FB node and chose to "Change Direction" - this has no change to function, but alters the appearance and makes wires look nicer for this case.

 

I would guess your problem occurs somewhere between the code you're actually running, and the simplified version you posted for people to test with the button (thanks for that, by the way).

I'm not sure but it looks like you intend to connect C/DIO7 instead of the button, and then it has different cases with different code, perhaps?


GCentral
0 Kudos
Message 2 of 5
(2,001 Views)

Thank you for your response. I will try your method out regarding the shift registers seems pretty neat Smiley Happy.  It is true that the C/DIO7 is to be connected where the button is, however, the function is still the same regardless. 

0 Kudos
Message 3 of 5
(1,958 Views)

@JosiahTham wrote:

Thank you for your response. I will try your method out regarding the shift registers seems pretty neat Smiley Happy.  It is true that the C/DIO7 is to be connected where the button is, however, the function is still the same regardless. 


You have 4 copies of the C/DIO7 node (one per state) by the look of it. 3 of these are seemingly outputs (you're writing a value) but if you use it as a replacement for the button, it's an input.

It might be that this is causing your problem?


GCentral
0 Kudos
Message 4 of 5
(1,944 Views)

It should not be a problem as it is supposed to be used to measure the Echo Pulse from the Ultrasonic Sensor. The button was just use to simulate the echo.

0 Kudos
Message 5 of 5
(1,929 Views)