NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Trusted Enthusiast
RobertoBozzolo
Posts: 4,525

Rif.: PCIe-6321

The easiest way is probably to setup a timer that fires say 4 times/sec and check the state of the digital line in it using the example that you already found. An improvement to the example is to move task configuration and cleaning at the beginning and end of your application, leaving only reading part in the timer callback.

 

An alternative, more complex method is to setup a callback that fires on the hardware event, something on the line of the example ReadDigChan-ChangeDetectionEvent.




Using LW/CVI from 3.1 on.

My contributions to the Developer Zone Community
________________________________________
If I have helped you, why not giving a kudos?
Member
leader06
Posts: 24
0 Kudos

Rif.: PCIe-6321

Hi,

 

I tried to use this function yesterday, its works  

 

but I want to switch on  iterative loop( while or do.....while) to make it work every time I click a push button (green)  to start the acquisition and we'll stop it with the red push button but when I tried with iterative loop it doesnt work & the program crashes

I send you an overview of  interface &  program I know it contains a lot of mistakes but I'm new to LabWindows

 

thx 

 

 

 

 

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page