How to wait for a digital input to go high?

I bet the following question is explained somewhere but I don't know how to find it.
Is there an optimal way to wait for a digital input to transition from 0 to 1? I mean, other than creating a loop that continously polls the input line is there a better way to wait for the transition? With all the "event driven" capability of CVI I suspect there's a slick way to do this but I don't know how to find it. I'm willing to RTFM if I know where to look.
thanks

Hi,
I have never done this, but it looks like it is possible to use the DAQmxRegisterSignalEvent function to assign a function that will be called when a "change detection event" occurs.
It works on a task basis, so if I'm not mistaken, you need to put the digital to be tracked into a separate task. 
It is not stated if all NI hardware is compatible with this functionality, so try and see if it works for you.
Hope this helps,
Edit: It looks like you have already found the solution by yourself
S. Eren BALCI
www.aselsan.com.tr

Similar Messages

  • Wait for the digital signal

    Is there like "wait for the panel activity" in digital signal, "wait for the digital signal goes up" etc. ?
    Or is it bad to make it with sequence structure and inside of first sequence use while loop?

    If you need to wait for a digital signal before continuing on with your program, the best way is to have a while loop that continuously reads the signal and stops the loop when the signal goes high. You can put this loop in the first frame of a sequence, or you can wire an output from the loop (like error out from the device read vi) into your next step. Be sure to put a delay (100mSec) in your loop so that the loop does not hog CPU time.
    - tbob
    Inventor of the WORM Global

  • How to wait for a variable to be set?

    Hi,
    I need to wait for a variable to be set. I tried this, but it didn't work (IllegalMonitorStateException). How to do it?
    Thanks!
    public class MyClass {
      private Boolean succed = null;
      public static boolean doStuff() {
        MyClass my = new MyClass();
        while (my.succed == null) {
          try {
            my.wait();
          } catch (InterruptedException e) { } // Nothing
        return my.succed.booleanValue();
      // and elsewhere set succed to Boolean.TRUE / FALSE and call notifyAll()
    }

    Try this:
    import java.util.*;
    public class Test {
      private Boolean  flag = null;
      public synchronized boolean waitForFlag() {
        boolean  res;
        while(flag == null) {
          try  { wait(); }  catch(InterruptedException e)  {}
        res  = flag.booleanValue();
        flag = null;
        notifyAll();
        return  res;
      public synchronized void setFlag(boolean  flag) {
        while(this.flag != null) {
          try  { wait(); }  catch(InterruptedException e)  {}
        this.flag = new Boolean(flag);
        notifyAll();
      public static void main(String[] args) {
        final Test  t = new Test();
        new Thread() {
          public void run() {
            System.out.println("1: " + t.waitForFlag());
        }.start();
        new Thread() {
          public void run() {
            System.out.println("2: " + t.waitForFlag());
        }.start();
        try  { Thread.sleep(5000); }  catch(InterruptedException e)  {}
        t.setFlag(true);
        t.setFlag(false);
    }

  • HT2731 I need verifymy account..... But how im waiting for an email but still no email arrive :-(

    How can i verify my account to start using my iphone 5
    Im waiting for an wmail but still... NO EMAILS
    FEELING STRESSED AND DISSAPOINTED :-(

    Hi Kirby grace bete,
    Thanks for visiting Apple Support Communities.
    If you have not received the verification email for your Apple ID, I recommend visiting the My Apple ID page to make sure your email was entered correctly, and re-send the verification email.
    You can also resend the email verification if the email address is not verified:
    Sign in to My Apple ID to manage your account information.
    Click Resend under Primary Email Address.
    Verify your changes by following the link in the email you receive from Apple, then signing back in to your account.
    From:
    Apple ID: Associating and verifying email addresses with your Apple ID
    http://support.apple.com/kb/he68
    All the best,
    Jeremy

  • Waiting for western digital

    Hi all,
    I recently added a 500GB western digital 'my book' to my set up.
    The question I want to ask is, why is it that whenever I try to do anything such as opening an app or file I have to wait for the 'my book' to power up before I can get started. It's obviously powered down when not in use but its as though the whole system has to wait until this thing starts up again before responding. I presume I'm using the correct description when saying 'powered down/up'. If its not been running for a while it'll make the noise of a drive starting up anytime there is an activity required, this doesnt mean accessing anything off the drive either. It'll do this if I'm accessing data from one of the partitions too.
    I've looked in the startup items to see if theres anything obvious there but cant see anything.
    I have had another external hard drive prior to this and that never interfered with the running of my mac. Is it possible something has been installed during the intitial setup. It's connected via firewire BTW

    If it has a special driver, it would have been installed by you (running a package or installer program) and you would know about it. A drive cannot automatically install something on your Mac without your knowledge. If something needs to get installed in your System (which would be necessary for a driver to be active), Mac OS X takes the additional precaution of asking for admin user authentication before proceeding.
    Take a look at the manual. The drive may have special features that are enabled or disable using switches on the back of the drive.
    Another possibility is formatting. If the drive was never re-formatted for use with a Mac, it may be FAT32 format. That could slow things down.

  • How to wait for events to happen without using sleeps.

    hi,
    I am basically doing Thread.sleep() for waiting the events to complete.
    For example, when i click on query button, it takes sometime to process in the background & then populate the data in my table.
    So i am using the sleep method for this event to finish.
    I feel this is not the correct approach, can anyone suggest just me a way to wait for the event to finish without actually using sleep method.
    Thanks & Regards,
    Vishal

    Hi,
    Firstly thanks for your valuable suggestion. But i would like to mention one thing, actually i am using JFCunit framework for doing Unit Testing for our Swing based client. So here i am not looking into Swing code that is being developed but rather i am concentrating on writing unit tests to whatever that is been developed.
    So when i click on the query button automatically, it is taking sometime to process (few seconds) & then its populating the data in a table. So in this case if i have to use the progress bar for the event to finish, i guess i have to modify the source code which is not advisable when you are doing unit testing. So i would appreciate if there is any other alternative that you could suggest me apart from using the progress bar.
    Thanks & Regards,
    Vishal

  • How to wait for a date field to be not empty in Designer workflow

    I am working on a workflow and need to pause the workflow to wait until a date field has been completed.  I am aware of setting dates to a workflow variable of type string to check for null, but there is no way in the Designer workflow to wait until a workflow variable is not empty.
    Does anyone know of a workaround to this?

    Hi,
    I agree with Andrej about using a Textfield as a alternative.
    But, I think you can try to add a new task (set the date value) into your workflow before other tasks.
    Let me know if you have further questions!
    Hope it is helpful!

  • How to wait for content rendering in a Div

    How can i check the status of a div content, whether the content is completely rendered or not?
    sekhar

    I have already tried WaitForControlReady Method. The thing is the content inside div is dynamic. We can't compare it using any of  InnerText , HelpText or DisplayText property.
    This Div tag consists of spans and child div's. The Content of these child elements consists MathJax content(For displaying mathematical eqtns/graphs etc..).
    sekhar

  • How to wait for a Process to complete without using wait,notify methods

    I have created a new Process using run.exec() method using a cmdline String array in the format "java, class name, 4 command line arguments" to be passed to the main method of that class. But I have a maximum limit of the no. of processes to be created e.g. 5. So whenever I create a process, I use a static semaphore class to decrease the count, and increase it again when the process ends; so when the 6th process wants to start it will be suspended until another process is complete. My problem is how do I communicate to the calling class that the process has ended. I don't want to create any threads as that will defeat the purpose of creating separate processes. I have tried Process.waitFor() method but it doesn't work.

    you could add a iamfinished method to the class where you store the counter and thread calls it if it is finished.

  • How to set up a wait for input system.

    hi :)
    gui.addClientText("Please input an ip: ");
    String ip = gui.returnLastUserEntry();Basically in between the 2 lines shows above i needthe program to wait. As you can see at the moment its simply asking for an input but no waiting, its instantly assuimg 'ip' is an unassigned value.
    As i write this im assuming im going to have to create a new method to give extra functionality too addClientText, in the form of waiting for a user input.
    This is my addClientText method
        public void addClientText(String clientText)
            textArea.append("From Client: " + clientText + newline);
            textArea.setCaretPosition(textArea.getDocument().getLength());
        }This is my return user thingy method
        public String returnLastUserEntry()
            return text;
        }This is how it works
        public void actionPerformed(ActionEvent evt)
            text = textField.getText();
            textArea.append("From User:" + text + newline);
            textField.selectAll();
            textArea.setCaretPosition(textArea.getDocument().getLength());
        }Is there any type of wait for this method to be called before continueing command? I raelly have no idea how to continue, i can paste more code if it would help anyone help me :)
    Thanks in advance.

    i have something working now, seems i just needed to
    write out the problem to realise a soloution.
            gui.addClientText("Please input an ip:
    do
    ip = gui.returnLastUserEntry();
    while(ip == null);
    gui.addClientText("Please wait for connection
    nnection to be established.");was my soloution, although not ideal itll work.That doesn't work. No one would write that style of code in Java GUI programming.
    Use convenience dialog like JOptionPane instead, or, write your custom modal dialog for
    getting user text input, IP or whatever.

  • How to address digital input & output, analogue input & output when communicate with mitsubishi fx1n plc

    dear all,
    i am new to labview, how to code or address digital input & output, analogue input & output when communicate with mitsubishi fx1n plc or crouzet plc.
    pls help.
    HM

    http://search.mywebsearch.com/mywebsearch/redirect.jhtml?searchfor=mitsubishi+fx1n&cb=ZO&p2=%5EZO%5E...
    Try the above link. I know it is a screen-full, but is a search result for Matrikon. They have a whole slew of OPC servers/clients you can try out. Personally, I would go with their OPC server for the Mitsubishi, and use Labview Datasockets. That would be the simplest with the lowest learning curve.
    Otherwise, if you wish to use Modbus, you would have to get the commands/syntax from Mitsubishi; might be in their user manual, but I wouldn't lay bets on it. With the Matrikon stuff, the syntax is all built in.
    Good luck which ever way you decide to go.
    Dave

  • WORKFLOW PROCESS IS NOT WAITING FOR USER INPUT LIKE RE-ASSIGN FUNCTION

    I am using Stand alone Workflow 2.6, In my workflow process
    which is an Issue tracking system which is working fine. On Enhancement I would like to create my own RE-ASSIGN function which will, Change the ownership of an issue totally to other user.
    For this I Created a package(CHANGE_OWNER.CREATE)which will show list of Users and Comment field(Just like Re-Assign).
    Here user can pick other user, and add comment,
    once submit for that Item key I am updating the workflow notification table so that paritcular issue ownership will be changed.
    In my workflow process I created a lookup code called "Change Owner". On click of Change Owner it will call the Function
    in workflow process which will call CHANGE_OWNER.CREATE, here
    the workflow process supposed to wait and get the User to be
    changed. BUT THE PROCESS IS NOT WAITING, IT JUST DISPLAYED THE
    SCREEN AND CONTINUED THE WORKFLOW PROCESS. I WANT THE MY
    WORKFLOW PROCESS TO BE ACT AS RE-ASSINGN BUTTON WHICH WILL WAIT
    FOR THE USER INPUT.
    HOW TO DO IT.
    Thanks
    Bala.

    Hi Bala
    What enhancements were you adding to the Workflow Reassign/Delegate feature, which included being able to add comments? A good idea is to look for any differences between how workflow implements the reassign feature, and your customization.
    Also, make sure you only use the Public documented PL/SQL APIs and do not update the tables directly to ensure no Support or Upgrade Issues.
    Cheers
    Mark
    I am using Stand alone Workflow 2.6, In my workflow process
    which is an Issue tracking system which is working fine. On Enhancement I would like to create my own RE-ASSIGN function which will, Change the ownership of an issue totally to other user.
    For this I Created a package(CHANGE_OWNER.CREATE)which will show list of Users and Comment field(Just like Re-Assign).
    Here user can pick other user, and add comment,
    once submit for that Item key I am updating the workflow notification table so that paritcular issue ownership will be changed.
    In my workflow process I created a lookup code called "Change Owner". On click of Change Owner it will call the Function
    in workflow process which will call CHANGE_OWNER.CREATE, here
    the workflow process supposed to wait and get the User to be
    changed. BUT THE PROCESS IS NOT WAITING, IT JUST DISPLAYED THE
    SCREEN AND CONTINUED THE WORKFLOW PROCESS. I WANT THE MY
    WORKFLOW PROCESS TO BE ACT AS RE-ASSINGN BUTTON WHICH WILL WAIT
    FOR THE USER INPUT.
    HOW TO DO IT.
    Thanks
    Bala.

  • How many channels have digital input?

    Hi, I want to know how many channels have the digital input of the intel mac mini. I have an digital input with six channels and I would like record in different tracks in garageband or other program. It's possible?
    Thanks and excuse me for my english.
    Mac Mini (Intel Core Solo)   Mac OS X (10.4.6)  

    Welcome to the Apple Discussions!
    I don't use GarageBand much, but I did a couple of searches. If you search the GarageBand forum, it is possible to import/record more than one or two tracks at a time. In fact, people have recorded six tracks with a USB/MIDI interface. HOWEVER, there is more to consider than just the ability of the software to do this. The processor and the hard drive will have to keep up. From what I found there, it seems the processor and hard drive of the Mac mini will not be able to keep up with six tracks. Apple uses some laptop components, like hard drives, to keep the Mac mini small. One sacrifice of smaller components is lower performance. If you're going to work on projects like that, the folks in the GarageBand forum might recommend an iMac. Your topic might be better suited for that forum, since digital optical audio for the Mac mini is brand new, there might not be many people here with much experience.
    -Doug

  • Can't change sample rate for digital input on Mac Pro

    Hello all,
    on my Mac Pro with 10.4.10 I can't change the sample rate for the digital input. Whenever I choose 48000 or 96000 Hz it returns to 44100 Hz after a few seconds. Feeding a 24 bit/96000 Hz signal from an external ADC into the optical input doesn't help. No input signal is available for digital recording software such as Sound Studio or Cubase. After changing the sample rate in audio midi configuration to 96000 Hz the sound can be heard for a few seconds but when the setup returns to 44100 automatically the signal is, of course, lost.
    I've deleted all relevant preferences and restarted with resetting paramter RAM. Still the same. With external hardware such as M-Audio Firewire equipment setting the sample rates works properly.
    Thanks to all for helpful clues.

    Hi,
    when E&M signaling is configured on digital interface like the VWIC is, 2 or 4 wires operation is not applicable because there are no wires at all, and reported only for compatibility with the analog E&M card.
    Consequently, you cannot configure that and it will not make any difference to effect of the connection.
    Please rate post if it helps!

  • How to measure RPM using digital I/O

    Please tell me how to measure RPM using Digital Input or please give me a code for this.

    You probably aren't going to find anyone to just give you code. Especially because you don't specify the hardware you're using. Doing this on FPGA is different than using DAQmx to do it. With FPGA you count pulses over a specified time. Using boolean logic from the digital DI node is a common way but there are others. (if you are using FPGA I can draw up an example, but I believe there is one on NIs website if you search google for it),. Then, if you want, you can run the data through an IIR filter, especially if you have a low resolution or slow moving encoder. Either of these conditions can result in very large difference of RPM even if the actual speed is not varying much (if you need an example why I can provide more detail, but some simple math calculating RPM should explain this. Obviously lower resolution will giv eyou less accurate results).
    If you use DAQmx you can set up a frequency task and it will return the number of pulses in a specified time frame; then you can convert this to RPM based on your encoder resolution and take the same steps of running it through a filter to smooth it out if need be.
    CLA, LabVIEW Versions 2010-2013

Maybe you are looking for

  • I'm trying to pause import to one step dvd so I can change 60 min tapes.

    Hi all I'm trying to archive mini dv to dvd as easily as possible, my tapes are 62 min long and if I put 2 tapes into imovie I already exceed buning limit. One step dvd only lets me import one tape and then decides to complete the task of burning. Sh

  • Alternative to BSEG

    HI Experts,                 I am making customer ledger report for FI module. I have used BSEG table to customer account details. As BSEG is big table so it takes lots of time to execute. Is there any alternative to BSEG table where I get the same da

  • Regarding logical system assigining to transport request

    hi, all, how to assign the transport request for logical system.,....because i transported the interfaces to quality system..please guided me in this

  • Restarting Coherence

    Dear Coherents, We have several application-level tasks running inside a single JVM. Each task is run in its own thread but tasks are run serially, so that only one task is running at any point in time (actually managed by DataSynapse). Each of the t

  • Share external hard drive with windows

    I have 2 pc's and a minimac.  I want to share them on my home network.  I have a new 3TB external hard drive that I want to store everything on.  I want to write to it from all computers.  I want some files to be shared such as photoshop illustrator