LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Loop to read value

Hello !!

 

 I am detecting rising and falling edge of a square wave in a loop.......but i am not able to do it.....kindly help........sample code is...

 

Case 1 :

do

{

 

Val = readhardware(channel number);

if (val >2) break;

 

 

}while(1)

0 Kudos
Message 1 of 2
(4,171 Views)

It depends on how your read hardware ( ) function is designed. A tight loop like that is not processing events, so if you function relies in any way in event processing then that system won't work. Can you post a summany code of your function an some detail on how it interacts with the hardware? Does it use serial functions or GPIB or VISA or a third party dll or what?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(4,160 Views)