取消
显示结果 
搜索替代 
您的意思是: 

Rising Edge

Hello,
 
does anybody have a simple solution for this problem?
 
Push-Button     LED
        0                 0
        1                 1
        0                 1
        1                 0 
        0                 0
 
With the first rising edge the LED should be switched on and with the next rising edge the LED should be switched of and so on. 
 
LV 6.0
 
 
Regards
ThomasD
0 项奖励
1 条消息(共 9 条)
4,277 次查看
Thomas,

should that be in LV only or is there hardware involved? if only in LV: what is the mechanical action of the button?

Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 项奖励
2 条消息(共 9 条)
4,270 次查看

Hello Norbert,

hardware is only indirect involved. In the way with Push-Button and the LED I will do a previous check of the function in LV only. Later I will read in a signal from a pushbutton over the parallel port. The pushbutton which will be read in should work like a switch. Rising edge of the pushbutton --> "LED on" next rising edge of the pushbutton --> "LED off". I like to simulate this in LV.

 

 

0 项奖励
3 条消息(共 9 条)
4,267 次查看
Thomas,

then you can do the following:
check the button (depends on architecture of your vi, use polling or event-based programming here)
compare with old status of button (shiftregister in while-loop)
if edge=rising
    toggle LED-status (shiftregister in while-loop)

this should work out quite easily for your needs.

Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 项奖励
4 条消息(共 9 条)
4,262 次查看
Hi Thomas,
look at attached VI
 
You looking for something like this?
 
Regards
 
Dev
 
0 项奖励
5 条消息(共 9 条)
4,261 次查看

Opps! did not observe you have LabVIEW 6.0

sorry, i do not have that version on any of my systems.

Sorry again for the goof up

regards

Dev

 

 

0 项奖励
6 条消息(共 9 条)
4,257 次查看

Hi Dev,

can you post a picture from the VI?

0 项奖励
7 条消息(共 9 条)
4,253 次查看
Hi Thomas,
 
Here's how to do it with a very simple "XOR with previous value" method.
 
Note that it is important that the switch's "mechanical mode" is "latch when pressed" or it will not behave as you expect - experiment with the different "mechanical modes" and you will see.
 
I would have posted a lot sooner if I hadn't had to save all the way back to version 6.0 - time you upgraded perhaps?
 
Regards.
 
Mark H.
0 项奖励
8 条消息(共 9 条)
4,248 次查看
Hi Thomas,
 
Here is a Pic of the block diagram
 
In the shown block diagram, Click is a Boolean swithc with its mechanical action property set to 'latch when pressed'
 
and in the false state of the case structure, the boolean value from shift register is wired out
 
Regards
 
Dev
 
 
 
 
下载全部
0 项奖励
9 条消息(共 9 条)
4,247 次查看