From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wait for Rising edge trigger

Hi ,

im implemented a state machine , at one of the final states , i need to detect a rising edge of I/O node signal(external signal). The frequency of that signal is much slower than the SCTL clock , i thought to use a while loop inside the SCTL , and stop the condition will be the value of '1' of the signal. im looking for a better solution than a while loop inside the SCTL , hope will get a good solution here .

 

Thank you in advance.

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

Hello,

 

I may be helpful to understand where these "external signals" are coming from.

 

What hardware are you using in conjunction with this project?

0 Kudos
Message 2 of 5
(2,784 Views)

Hi , im using a kintex 7 FlexRio 7931.

i have a VHDL code which i instantiated as a clip , on of this clip signals is a clock , which i need to detect a rising/falling edge of it , to start another procedure.

Hope this explanation is better.

 

Thank you,

 

0 Kudos
Message 3 of 5
(2,779 Views)

I have some additional points I'd like to clarify with you: it sounds like your FPGA code is a state machine that uses a SCTL as the while loop of a state machine. You have an input from some user-defined CLIP which takes in an external clock and would like to use the state of this clock signal to determine the logic of whether your state machine moves to the next state or continues to wait. Is this correct so far?

 

First off, a normal while loop will take an absolute minimum of 3 FPGA clock cycles to execute, so using this inside a SCTL will break timing. If you haven't run into any other problems, you might simply take the clock signal from your CLIP and use that as boolean logic to select a case within your "wait" state. A low or "false" clock should send through an enum that tells the state machine to repeat while a high or "true" input to the case will cause the enum to tell the state machine to move on to the next state. Here's similar logic with a "Select" block in LabVIEW. Not sure if this would meet timing but it's worth trying.

 

select.PNG

Sam R.
0 Kudos
Message 4 of 5
(2,760 Views)

HI , thanks for your reply.

The SCTL clock is much more faster than the external clock , the SCTL is 40Mhz , and the external clock is 100Hz.

I will try to put this logic, and see what happened.

Thank you.

0 Kudos
Message 5 of 5
(2,738 Views)