LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inputs (buttons) on USB interface board /event case

Thanks a lot guys! I now see what you mean. Working with hardware is new for me, working with Labview also Smiley LOL haha 

Sometimes I find it very hard to come up with the solutions you gave.. But we'll keep on trying..

Thanks!

0 Kudos
Message 11 of 26
(814 Views)

The way it is now with the time-out event is still not correct. When I now press a button on the board it does react but goes back immediately to the time out event so it does not stay in the event, and that is what I wanted.... I think this program needs another set-up without the event case... Someone better idea?

0 Kudos
Message 12 of 26
(802 Views)

You have nothing in the timeout event and you have that silly value(signaling) property. You posted an old VI. A event structure is supposed to keep re-running the timeout event as long as there is no user event. I have no idea what you mean by 'stay in the event'. What does that mean? After reading the hardware, what you want to do?

0 Kudos
Message 13 of 26
(798 Views)

Oops indeed old VI, hereby my latest

0 Kudos
Message 14 of 26
(795 Views)

When you press a button on the board you now go to event 2. In that event I want to measure the time and the voltage, so I can calculate capacitor RC time. Do you understand me now? 

0 Kudos
Message 15 of 26
(794 Views)

With stay in the event I mean that event 2, were the calculations are done, remains active till another button is pressed which activates another event, for example stop button.

0 Kudos
Message 16 of 26
(804 Views)

So you want to take multiple readings in the 'Input' event? It's not very good style but you could have a for loop that takes x number of readings. The time between readings would be set by wait like you have now.

0 Kudos
Message 17 of 26
(803 Views)

F*cking hell stupid me, I think this is what I need. I replaced the "input event" for a case structure, now the measuring continuous. Thanks, thoughts in a different direction.. 

0 Kudos
Message 18 of 26
(798 Views)

Hello,

 

I have a new question... I post it here so I do not have to create a new forum..

In my VI I want to measure the time how long it takes to perform the calculations (bottum of the for loop). I tryed it with an equal comparison block, that does not work. It works with the greater or equal comparison block but then the time keeps on running, offcourse it does because the outcome is still bigger then 3,14322. But I don't have a sollution to fix this. Someone has?

Thanks in advance.

 

Matt

0 Kudos
Message 19 of 26
(782 Views)

Hi Matt,

 

is has been shown a lot of times before how to measure timings of (parts of) code:

check.png

 

Btw. right now your loop timing should be limited by the "Wait for next multiple" function...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 26
(779 Views)