Can I program 6013 to give periodic timer events in VB

Using Visual Basic 6, can I program the NI6013 to give me an interrupt (VB event) on a periodic basis - say once every 100 microseconds. I'd use the VB timer control, but it doesn't provide either the resolution or accuracy I need. I need to sample some digital inputs that I'll use to control analog acquisition.

Hi,
Thanks for contacting National Instruments. Are you wanting to trigger an acquisition or output every 100ms or cause a VB Event to occur?
If you want to trigger an acquisition or output every 100ms you can use the counter/timers to generate a pulse every 100ms. This can then be used as a trigger. To do this you will need to change the terminal count of the counter to a lower number, then it will roll over faster. You can configure it to roll over every 100ms.
If you are doing software events then there may not be a more exact way than using the VB timer. In our CVI software package we have something called an asynchronous timer which is basically a software timer just as you are using, but it runs in a different windows thread. Therefore it is not a
ffected or changed when your program runs, it stays very exact (to milliseconds). We don't have any information on this in Visual Basic but it's something you could do some research on if it seems helpful.
If you are still stuck, send me some more info on your application and we can go from there.
Erick D.
NI Applications Engineer

Similar Messages

  • Utility which can run at periodic time for retrieving table vales.

    I have a table letsSay Employee which have single column "Name". This table is continuously updating,I want to write an utility which can retrieve table values at a periodic time and write into file. This file will contain new values which are inserted in table in this last periodic time.
    any help is much appreciated.

    user10988248 wrote:
    Now trying to explain
    I have students table which has three column(Student_SSN,Student_Name,Advisor_ID)
    Stage 1:which has 2 rows values are(Bill Bob,1234,1 & Jane Doe,456,2)
    Stage 2:(After 2 hrs)Now Number of rows in table are 3 and values are(Bill Bob,1234,1 & Jane Doe,456,2 & Jimmy Joe,789,3)
    Stage 3:(After 4 hrs)Now Number of rows in table are 4 and values are(Bill Bob,1234,1 & Jane Doe,456,2 & Jimmy Joe,789,3 & Bobby,245,4)
    This table is continuouly updating by some other module.
    If i run utility at stage 1 it should gives me (Bill Bob and Jane Doe) in text file.
    If i run utility at stage 2 it should gives me (Jimmy Joe) in text file.
    If i run utility at stage 2 it should gives me (Bobby) in text file.You're still explaining technically what you want to do .. NOT what the business advantage (or reasoning) is to this process.
    I can't imagine a business user coming to you and asking you to do this.
    So again .... what BUSINESS problem are you trying to solve?

  • Having program wait for a period of time

    I have a program that I am creating that will need to paint something to the panel every few seconds. I have some code like so:
    public void paintBar(Graphics g, Graphics2D g2)
              for(int i = 0; i < 325; i++)
                   //draw a rectangle
                   double leftX = 36;
                   double topY = 76;
                   double width = i;
                   double height = 48;
                   double test = 100;
                   Rectangle2D rect = new Rectangle2D.Double(leftX, topY, width, height);
                   g2.setPaint(Color.yellow);
                   g2.fill(rect); //fill rectangle with color
                   g2.setPaint(new Color(204, 204, 153)); //change paint to background color for erase
                   eraseMessage(g);
                   calculatePercentage(i);
                   g2.setPaint(Color.black); //change paint color back to black for message
                   printMessage(g);
    //NEED TO WAIT HERE FOR A PERIOD OF TIME
    //THEN CONTINUE WITH LOOP.
    The problem that I am having is that I tried to use different wait() meathods and it seems to get to the wait meathod and just freeze. The painting is never done until the wait command is complete and then the all of the painting is totally finished. I never see it progressing.
    Any ideas?
    Thanks

    You could use a scheduled event...
    public void run() {
         Timer timer = new Timer(false);          // Create Timer
         class Refresh extends java.util.TimerTask {     
              // Create repaint event
              public void run(){repaint();}
         timer.schedule(new Refresh(),0,10);     // Schedule repaint
    }Call this when you run your program, and place all your paint and update methods into a paint(graphics g) method.
    Then, the timer will continuously run repaint repeatedly.
    You can then insert a single event timer (i don't know how off hand, but they are in the API under Timer events), that kills the origional event timer after X ammount of time.

  • My mac can't find the volume" Data" on Time Capsule. Also Ican't find with the disk utility program the hard disk in the Time Capule; so I can't format the disk again. What can I do?

    My Mac can't find the volume " Data" on Time Capsule, Also I can't find with the disk-utility program the hard disk in the Time Capusule.
    So I can't format the disk in the Time Capsule
    Deconnevt and then connecting the power tp the Time Capsule gives also no solution.
    What can I do?
    Joe

    I listed the commands.. that is how you manually mount the disk.. follow exactly the commands I gave you.
    In finder use top menu, go, connect to server.
    Type in the following.
    AFP://TCname or AFP://TCIpaddress (obviously you replace with the actual name or the actual IP address).
    If that fails..
    try
    SMB://TCname
    Here is the screenshot.
    tardis4 being the name of my TC.
    It should then ask you for your credentials.
    And it should remember them in the keychain and be able to then get TM to connect.

  • Is it possible to tell me how i can make program in labview that take pixels of black and withe image and give coordinate of black or white pixels back to me.

    hello everybody
    is it possible to tell me how i can make program in labview that take pixels of black and withe image and give coordinate of black or white pixels back to me.
    Solved!
    Go to Solution.

    Here's a slightly simpler version.
    (Depending how you want to process the output, you might not need to traspose and/or reverse. Boolean to 0,1 works directly on the 2D array if needed )
    amkamyab wrote:
    it is good. i could enter 1bit image in and show it in array. now i want to take pixels coordinates. i meen i want to have (x,y) of each pixel to send it pixel coordinate to another program i wrote for steppers motor.
    Can you be a bit more specific on how the output is supposed to look like? Initially you wrote "black or white", and since all pixels are either black or white, do you want to send all pixels? In what format? In what order? Please clarify?
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    BW-Pix.png ‏8 KB

  • How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)

    How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)

    How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)

  • Can't instal firefox 4, Gives error that my comupter needs to reboot to uninstall an older vesion. But I have uninstalled the other version and have rebooted 4 times now.

    Can't instal firefox 4, Gives error that my comupter needs to reboot to uninstall an older vesion. But I have uninstalled the other version and have rebooted 4 times now.

    I have a similar problem installed firefox 4.0 update (x86 en-us) am told to reboot all the time. I cannot uninstall and it has also messed up my email attachments which I cannot now open except if they are microsot office.

  • I have accidentally deleted off my Mac a preferences file for Adobe photoshop and now the program cannot initialize. I have talked to Apple and then say that if Adobe can isolate the file they can help me restore it from my time machine. How do I isolate

    I have accidentally deleted off my Mac a preferences file for Adobe photoshop and now the program cannot initialize. I have talked to Apple and then say that if Adobe can isolate the file they can help me restore it from my time machine. How do I isolate the file ?

    Do you have the path to this file and name of this file?

  • Hi! I have PC/Windows 8.1. I have tried InDesign SWEDISH version, trial period, time now expired. I want to pay it now. Impossible, I am asked for a serial number that I NEVER have received. Please help me. Just a website where I can pay. Thanks

    Hi! I have PC/Windows 8.1. I have tried InDesign SWEDISH version, trial period, time now expired. I want to pay it now. Impossible, I am asked for a serial number that I NEVER have received. Please help me. Just a website where I can pay. Thanks

    Please try the following link and select Single Application Subscription if you only wish to use Indesign. Do not forget to check out more subscription options as well.
    Creative Cloud pricing and membership plans | Adobe Creative Cloud

  • Running a java program a set number of times

    This is a general question. Is it possible to make a java program run only 5 times for the sake of arguement.
    Basically I want to write a program that will give the user some flexibility when it will actually run another Java program, but I only want them to be able to say "not now' for a set number of times. When the last time comes the other program will launch. I was initially thinking of the Do Whilw loop, but this needs to work when the program is restarted.
    Program starts, it has 5 times it will run before it does something else(doesn't really matter now I think). User takes option "Not Now" and the program ends, but warns the user this will run 4 more times before you will need to do something.
    This process will repeat until the user takes the option "Ok install now" or the time limit expires and the install occurs anyway. Can someone point me in the right direction.

    ok I see so it's like one those programs that you download for free on the internet and they give you a set amount times to use it before you have to pay for it. but in this case when the number of times you use it equals 5 (or when the user clicks ok) a different java app will open automatically.
    My first thought would be to Write a Serialized object to disk using objectOutputStream that stores the number of times the application has been opened. and each time the program runs it checks for the serialized object and then you can do something like what I posted before. of course if were worried about security the user could always look for the object and erase it, if so then I guess we would have to come up with another plan of attack
    Hope this helps

  • HT1449 Can I move my iTunes library onto Time Capsule and share it across my devices (similar to a NAS drive)?

    Hi
    Would anyone know if I can I move my iTunes library onto Time Capsule and share it across my devices (similar to a NAS drive)?
    This would give me some hard drive space on my iMac and more importantly mean my iTunes library is available all the time. Although I have Home sharing I need my iMac on and if not I use iTunes on iCloud I always seem to be downloading the tracks I need.
    Current configuration / devices:
    iMac 20-inch, Mid 2007 - nearly full!
    Processor  2.4 GHz Intel Core 2 Duo
    Memory  4 GB 667 MHz DDR2 SDRAM
    OSX Mavericks
    Time Capsule (1TB)
    iPad
    iPod Touch
    Apple TV
    iTunes 11.1.5 (5)
    Many thanks

    What "devices" are these?  By devices I normally understand i-devices and not computers.  How many computers?
    If you put the whole library on the Time Capsule (TC) you can only use it with one computer at a time because the iTunes library file can only be opened by one copy of iTunes at a time.  If you put only media on the TC but have a copy of the library files on each computer you can use media by multiple computers but you then have the headache of trying to make sure that any changes done to the collection by one computer are mirrored by the libraries on the other computers which will be more or less independent.
    I hope this TC isn't also your backup drive.  When the TC drive fails (and it will someday) then your whole collection is gone.  Don't rely upon Apple to always have copies for you to download.  For one, if a distributor puylls an item then it is gone period.  Additionally, Apple only keeps media, not the actual organization that is your set of library files.  If you do this, buy another backup drive.

  • Save the file and give date & time stamp

    1. Reading the Excel file from the selection screen as a parameter.
    2. Using F.M. ALSM_EXCEL_TO_INTERNAL_TABLE reading Excel file into
        Internal table.
    3. Implementing the Business Logic.
    4. Move output to Final Internal table.
    5. Final internal table should generate a Flat file. By using GUI_DOWNLOAD.
    6. That flat file should be saved with the name and location given in the Excel.
    7. When ever I run the program output file will generate in the same location but with date and time stamp. Because I’m running the program for range of employees say initially I run for 1 – 10,000 employees next 10,001- 20,000 like that.
    Whenever I run for 2nd time it will overwrite the previous output, that’s the reason I’m using date and time stamp.
    Eg:
    PERSONAL Numbers              Name                                         Location
    00000001                 xxxxx-24.04.2007-10.30          C:\        
    00000002                 xxxxx-24.04.2007-10.35
    00000003                 xxxxx-25.04.2007-10.40
    00000004                                  xxxxx-25.04.2007-10.30
    Can any one help me how to save the file and give date & time stamp through hardcode?
    please help me in this issue.

    I am not clear with your problem. Based on the understanding of your question,
    there  can be two cases.
    1- U want to insert time stamp in the output file.
    2- Time stamp is already there, u just have to solve the overwriting issue.
    If your question goes with option 2, You can make use of import parameters
    <b>CONFIRM_OVERWRITE</b> : Which will ask for confirmation before overwriting.
    <b>APPEND</b> : which you can choose either to append the data to the existing file or overwrite it.
    Please inform if the issue is not resolved.
    Message was edited by:
            BINU RAJ BINU

  • Execute a program for specified amount of time

    Hi, I was wondering if anyone knows if it is possible to have a program run for a maximum time and, if it hasnt terminated on its own, stop it?
    I've read about java.util.Timer and java.util.TimerTask but they seem to be for scheduling not counting and ending?
    Can anyone give any suggestions please :)
    Chris

    when you execute an external program (with Runtime's exec method) a Process object is returned. This Process object has a destroy method that kills the external program... so yes, you can create a new class that extends TimerTask and overload the run method to call that Process's destroy method.

  • I can't print an item,and each time I attempt to do so a message reads that the item is either spam

    I can't print an item,and each time I attempt to do so a message reads that the item is either spam or contains a virus.
    What gives?

    What is the format of the item you are attempting to print (via ePrint?)?  Is it a supported format?  See an updated list here.
    Although I am an HP employee, I am speaking for myself and not for HP

  • How can I generate a single timer event in a loop?

    I have a simple PID script running inside of a timed loop to control a heating process.  It works perfectly except that I cannot find a clean way to start the timer when it reaches the setpoint.
    Right now, the loop just runs for a set amount of time (e.g., thirty minutes).  I want it to run for a set amount of time after the heating reaches the setpoint.  I can think of several ways to fudge this, for example with a couple of shift registers and a case structure or with a second loop, but these options seem very clunky.
    I am sure there is a better way.  Can I somehow create an event within the loop that only happens once, for example, to give a timer value one time when a boolean value changes and never rewrite it?
    Thanks in advance for your help.

    You could keep the boolean value in a shift register or a feedback node.  You then need a little bit of logic to check to see if the boolean changed from false to true.  From there, you can put in your get timer inside of a case structure.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for

  • How to delete a table of contents?

    It sounds like a stupid question, but I cannot delete my table of contents again? I only used the TOC in the draft, but don't need it in the final version of my document anymore. But - it sounds stupid - I cannot delete it. I marked it and hit the de

  • Matching an "Edit Text" in a form with a Field in a Table

    Hi Every Body, I've succeed to add a new "Edit Text" in the invoice Form (133) with c# : oItem = oInvoiceForm.Items.Item("103");                     oNewItem = oInvoiceForm.Items.Add("EditText1", SAPbouiCOM.BoFormItemTypes.it_EDIT);                  

  • Help in new debuger

    hi, i use the new debugger (in ecc5) and i have internal table with 10,000 employee and the employee that i wont to check in loop is place in 4200 , there is way to put the number of employee and jump into it ? Regards

  • Excise Problem

    Hi guru's i have one problem after the process of ME21N,MIGO,MIRO,Extraction of Register iam trying to do Post the excise invoice but the system giving the error is company code is not defined, Till the extraction  and print priview part is fine, iam

  • Scratch Disk Error for no reason

    Recently I have been receiving the notification stating that my scratch disk is full on Photoshop Elements 11 and I can no longer save any of the images I have been working on. Currently on my Mac Book i have 384.99GB free of a 499GB hard drive. Read