LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to response Digital input event in event structure

Solved!
Go to solution

Hi,

In my code , I need do something when I detect  one digital line high. Because that I have other controll butons event response, I need use event structure.

 

now I code a sample example (labview 8.61) and use indicator "boolean 2"  instead of digital input. please help me to come out the cause Thanks .

 

 

Sonic

Sonic

Diffrent Strokes for Different Folks
0 Kudos
Message 1 of 6
(4,480 Views)
Solution
Accepted by 菊花烧饼

Hi,

         I think it is useful to u. Initially the control button should be zero. Otherwise when u run suddenly it goes to the event.

Thanks

Sivabalan.V 

0 Kudos
Message 2 of 6
(4,471 Views)

When the vi runs the event structure will wait for some user action to happen and that is the reason you wont be able to see anything when you click the "Boolean" control next time (i.e when the i=1).

 

 

So you create an event to handle this (the same way you have done for the Boolean2 indicator) and place the value signalling property iside this newly created event case of the event structure like shown below.

 

 

 

Regards
Guru (CLA)
0 Kudos
Message 3 of 6
(4,471 Views)

Thanks all.

time out  frame is useful .

Sonic

Diffrent Strokes for Different Folks
0 Kudos
Message 4 of 6
(4,436 Views)

Sonic,

 

I see that you have an accepted solution. Since that works for you - great. I do want to point out a few things, especially for others that might read this thread.

 

1) Value Signaling property nodes can be slow (and maybe that's OK for your application)

2) There is a LabVIEW function designed for your requirement (User Events)

 

The main purpose for Value Signaling property nodes is to simulate a front panel action. They can be used (and used well) for other tasks, but it's good to be aware of their limitations (mainly speed).

 

The main purpose for "User Events" is to allow the programmer to create custom events. The advantages of User Events are speed and the abilty to return mixed (custom) data types.


This is just something to keep in mind when faced with this progamming requirement.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 6
(4,409 Views)

Hi steve,

Thanks for you professional support. Now my procedure is ok for slow speed response,but your ponit is great.

 

 

Sonic

Diffrent Strokes for Different Folks
0 Kudos
Message 6 of 6
(4,378 Views)