Why does this loop used to write values to the parallel port keep going forever?

Have a look at this VI guys. I'm trying to send a sequence of bits (used to trigger an IC). I'm interested in the last bit of the data port (D0). so I'm sending either 0 or 1 to that pin to trigger the IC. it works, but the problem is that the loop keeps going forever and i cant control it. if i send 3 to the loop count, I'm expecting to get: 1 0 1 0 1 0, but it doesnt stop and keeps going forever.
It seems that the problem is not with the loop. because i deleted the loop and just left the flat sequence so that it executes only once, but still it keeps repeating. How can i make the flat sequence execute only once?
I'm using a parallel port monitor (parmon.exe) and a LED connected to D0 of the parallel port to check.
If anybody has an alternative or better method to send the bits to the parallel port, I'd be very thankful.Message Edited by krayzie on 05-14-2005 04:33 PM
Attachments:
pport.vi ‏24 KB

It works just fine here. Place an indicator to the iteration terminal [i] to watch how things progress. Do the number ever increase above N-1 to what you wire to N? I don't think so!
Also make sure you don't run the VI with the "Continuous run" button. In this case the VI would immediately restart whenever it is finished. use the "Run" button.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • When I have installed updates in the past, I have always lost my bookmarks. Why does this happen? I want to install the new update but I am afraid of losing my bookmarks again. What can I do about this?

    When I have installed updates for Firefox in the past, I have always lost my bookmarks. Why does this happen and is there a way to avoid it? I want to install the new update for Firefox but I am afraid of losing my bookmarks again. What can I do about this?

    Welcome to Apple Support Communities
    Do not worry. Hold Sleep (the button you have at the top of the phone) and Home buttons at the same time until your phone restarts, and then try installing the iOS update again.

  • Why does this loop create a 3D array instead of a 2D?

    Hi,
    This should be a relatively simple question. I am feeding a 1-D array (1 x 801) in a loop into a build array function and looping it back on itself to build the array. I am rather confused as to why this is producing a 3D array, can someone explain why?
    Thank you,
    Michael
    Attachments:
    QCM.vi ‏113 KB

    Where are you seeing the 3D array? If it is at the far right of the diagram, at the edge of the FOR loop, it is because you have the autoindexing set, which is going to make a 1D array of your 2D array data, a 3D array. As the two sub-vi's didn't come with your vi I don't know what the one with the "17" as an input does, nor what the other one does either, other than apparently produce two 1D arrays.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • I updated yesterday so why does this verison (9.0.1) freeze in the middle of typing, or basically doing anything when NOTHING I am doing requires Adobe Flash Player?

    I updated yesterday to version 9.0.1. Each version has progressively gotten worse since updating from approx. version 5. This is the worst. Every minute, there is a lag where Firefox does not type if I am typing; videos freeze if I am watching something and the cursor does not click if I want to click on something. This happens regardless of what I am doing, even if I am just typing with nothing else playing or going on in the background.

    Calvin W.:
    Your extensions list shows an enabled "Torbutton 1.2.5" extension, so it is possible that that extension is responsible for that change.

  • Why does this forum open in a window without the menu bar ?

    When coming to this forum trough the " Access the Java Studio Creator Community Forum" link on the "Java Studio Creator Forums" page, it opens a browser window without the menu bar. I understand that Sun thinks it's better for me not to have the menu bar, but I personally prefer to have it. What I prefer over everything else is to have the choice.
    By the way, one of the reason I prefer Sun products over Microsoft products is that I generally can choose what is better for me. Like to have or have not a menu bar, or to have my IDE in english rather that in french. (By the way, this last issue has been solved ;-))

    Use this direct URL, you can have the menu bar still --
    http://swforum.sun.com/jive/forum.jspa?forumID=123
    Thanks,
    Sakthi

  • Why does this bar show up when I press the tilde key?

    Hey all, I have this mysterious bar that shows up when i press the tilde key in AE. It's distracting. 
    https://www.flickr.com/photos/jeffbriant/14040981723/
    (Adobe wouldn't let me upload a picture so I used flickr)
    EDIT: I'm using a Mac desktop.

    Try quitting After Effects, deleting the entire preferences directory, and restarting After Effects:
    DRIVE/Users/USERNAME/Library/Preferences/Adobe/After Effects/

  • Why can't i log into my accounts on the internet it keeps going back to the log in page

    my internet works fine and i like the phone but there has to be a setting or something that i am missing because any time i try to sign into any website that has a log in it just goes right back to the log in page over and over.  it looks like i put the wrong password in but i used it on my computer at home and it worked fine   any help is appreciated.

    Yes I have the same problem, so how can I fix it?

  • Why does this little program crash sometimes?

    I don't know if the code of the program is the most important here, I'm guessing I have to learn some extra things to help the program not crash anymore. But what?
    My question remains, still: Why does this little program crash sometimes?, because I might guess wrong.
    The program is a small application that let's you introduce two numbers in 2 text fields (or if you want, there is also a button that generates some random int numbers to complete the text fields for you), let's you introduces the result of the division of those numbers in another text field, and the result of the multiplication of those numbers in another text field. Then you have another 2 buttons that after being pushed, tell you if you resolved the operations right.
    The application runs fine most of the times, but sometimes it just freezes when I push the button that generates new random numbers.
    Why does this happen? Why does this happen only sometimes and not all the time?

    package my.NumberAddition;
    * @author  zi02
    public class NumberAdditionUI extends javax.swing.JFrame {
        /** Creates new form NumberAdditionUI */
        public NumberAdditionUI() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            buttonGroup1 = new javax.swing.ButtonGroup();
            jPanel1 = new javax.swing.JPanel();
            jLabel1 = new javax.swing.JLabel();
            jLabel2 = new javax.swing.JLabel();
            jLabel3 = new javax.swing.JLabel();
            jTextField1 = new javax.swing.JTextField();
            jTextField2 = new javax.swing.JTextField();
            jTextField3 = new javax.swing.JTextField();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            jTextField4 = new javax.swing.JTextField();
            jButton4 = new javax.swing.JButton();
            jTextField5 = new javax.swing.JTextField();
            jLabel4 = new javax.swing.JLabel();
            jTextField6 = new javax.swing.JTextField();
            jButton5 = new javax.swing.JButton();
            jButton3 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED), "Number Addition", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 153, 204))); // NOI18N
            jLabel1.setText("First Number:");
            jLabel2.setText("Second Number:");
            jLabel3.setText("Multiply:");
            jTextField3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jTextField3ActionPerformed(evt);
            jButton1.setText("Clear");
            jButton1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
            buttonGroup1.add(jButton1);
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jButton2.setText("Result");
            jButton2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
            buttonGroup1.add(jButton2);
            jButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton2ActionPerformed(evt);
            jButton4.setText("Result");
            jButton4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
            buttonGroup1.add(jButton4);
            jButton4.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton4ActionPerformed(evt);
            jLabel4.setText("Divide:");
            jTextField6.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jTextField6ActionPerformed(evt);
            jButton5.setText("New Numbers");
            jButton5.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
            jButton5.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton5ActionPerformed(evt);
            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jTextField6, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jTextField3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jButton4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButton2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE)
                                .addComponent(jTextField5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 65, Short.MAX_VALUE)))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addGap(84, 84, 84)
                            .addComponent(jButton5)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jButton1))
                        .addComponent(jTextField2)
                        .addComponent(jTextField1))
                    .addContainerGap())
            jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jButton1, jButton2, jButton4});
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel1)
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel2)
                        .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel3)
                        .addComponent(jButton2)
                        .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButton4)
                        .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel4)
                        .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButton1)
                        .addComponent(jButton5))
                    .addContainerGap(15, Short.MAX_VALUE))
            jButton3.setText("Exit");
            jButton3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
            jButton3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton3ActionPerformed(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE)
                        .addComponent(jButton3, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jButton3)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            pack();
        }// </editor-fold>                       
    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        System.exit(0);
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        jTextField1.setText("");
        jTextField2.setText("");
        jTextField3.setText("");
        jTextField4.setText("");
        jTextField5.setText("");
        jTextField6.setText("");
        @SuppressWarnings("empty-statement")
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // First we define float variables.
        float num1, num2, num3,  result;
        // We have to parse the text to a type float.
        num1 = Float.parseFloat(jTextField1.getText());
        num2 = Float.parseFloat(jTextField2.getText());
        // Now we can perform the addition.
        num3 = Float.parseFloat(jTextField3.getText());
        // We will now pass the value of result to jTextField3.
        // At the same time, we are going to
        // change the value of result from a float to a string.
        result = num1*num2;
        if (num3==result)
        jTextField5.setText("Correct");
        else jTextField5.setText("Wrong");
    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // First we define float variables.
        float num1, num2, num4, result;
        // We have to parse the text to a type float.
        num1 = Float.parseFloat(jTextField1.getText());
        num2 = Float.parseFloat(jTextField2.getText());
        // Now we can perform the addition.
        num4 = Float.parseFloat(jTextField6.getText());
        // We will now pass the value of result to jTextField3.
        // At the same time, we are going to
        // change the value of result from a float to a string.
        result = num1/num2;
        if (num4==result)
        jTextField4.setText("Correct");
        else jTextField4.setText("Wrong");
    private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {                                           
    // TODO add your handling code here:
    private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {                                           
    // TODO add your handling code here:
    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        int number1,number2;
        number1 = (int)(Math.random()*100);
        number2 = (int)(Math.random()*100);
        while ((number1 < number2) || (number2 == 0) ||(number2==1)
                || (number1 % number2 !=0))
            number2 = (int)(Math.random()*10);       
        jTextField1.setText(String.valueOf(number1));
        jTextField2.setText(String.valueOf(number2));
        jTextField3.setText("");
        jTextField4.setText("");
        jTextField5.setText("");
        jTextField6.setText("");
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NumberAdditionUI().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.ButtonGroup buttonGroup1;
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JButton jButton3;
        private javax.swing.JButton jButton4;
        private javax.swing.JButton jButton5;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel jLabel4;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JTextField jTextField1;
        private javax.swing.JTextField jTextField2;
        private javax.swing.JTextField jTextField3;
        private javax.swing.JTextField jTextField4;
        private javax.swing.JTextField jTextField5;
        private javax.swing.JTextField jTextField6;
        // End of variables declaration                  
    }

  • HT201317 Someother contacts and photostreams were uploaded to my iphone and mine were lost why does this happen to my apple id?

    Someother contacts and photostreams were uploaded to my iphone and mine were lost why does this happen to my apple id?

    The "system" performed as designed. All devices syncing to one iCloud account are kept in common sync. The idea is that all such devices belong to one user. Different users should have different iCloud accounts.  Once your contacts were edited, all devices were updated as well and subsequent backups (from yours and her device) reflected the changed contacts (and any other data that may have been edited like calendars). Your first task is to change your daughter over to a new account before she makes other changes.
    The only way I see for getting back contacts is to restore them from a time machine backup, assuming you also have a Mac included in the account which syncs the contacts. However, I'm not sure whether time machine includes contacts from iCloud along with those that are local, "on my Mac".
    Otherwise the deleted contacts are gone.

  • HT201209 iTunes will not use the redeemed gift cards on my account, I have a $30 credit and when I try to purchase a song it goes right to my credit card on file. Why does this keep happening

    iTunes will not use the redeemed gift cards on my account, I have a $30 credit and when I try to purchase a song it goes right to my credit card on file. Why does this keep happening???

    Any time you've changed anything in your billing, it does this once to very things.

  • HT2499 I have a new MacBook Pro with OS X Lion 10.7.4. The DVD player does not have a feature to store film clips. Why? This is useful for my work and I had it on my older computer? Why the loss of capacity?

    I have a new MacBook Pro with OS X Lion 10.7.4. The DVD player does not have a feature to store film clips. Why? This is useful for my work and I had it on my older computer? Why the loss of capacity?

    I cannot recall the DVD player ever being a place to "store" videos - it is simply an app to play videos.
    If your machine is new, then iMovie should be included as the "shrunk" version of iLife is included with Lion (iMovie, Garageband, and iPhoto). However, iMovie is not a place to store videos either - it is a video editor. You import your clips and edit them in order to then burn to a DVD or share via a social media site.
    Have you considered simply dragging the clips to your folder "Movies"? That would be a great place to just store them (please be aware that videos are usually large files, so keep your hard drive space in mind so you keep a minimum free and available for the OS to operate properly):

  • I use Firefox 6.0.2. When I shut the browser and try to reopen it I get a message saying that Firefox is still running and that I should reboot. This happens constantly. Why does this happen and is there a way around it?

    I use Firefox 6.0.2. When I shut the browser and try to reopen it I get a message saying that Firefox is still running and that I should reboot. This happens constantly. Why does this happen and is there a way around it?

    There are a few possible causes for that error, for details see [[Firefox is already running but is not responding]].

  • When I use Siri with Voiceover on my iPHONE 4S. Voiceover will not respond to any finger jestures. Why does this happen?

    When I use Siri with Voiceover on my iPHONE 4S. Voiceover will not respond to any finger jestures. Why does this happen?                                           

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • N Mail, when using "reply all" why does Mail automatically include my email address in the cc line? Whey would I want to include my email address in an email I am sending.  Anybody have any idea how to stop this?

    In Mail, when using "reply all" why does Mail automatically include my email address in the cc line? Whey would I want to include my email address in an email I am sending.? Anybody have any idea how to stop Mail from including my email address in the cc line when using "reply all"?

    Automatically cc myself is not checked.  I did find out that if you have multiple email address that all of them need to be associated with "My Contact" tab.  Thanks

  • Why does while loop pause during operation

    Hi everyone,
    I have written the attached code which will eventually be a part of a bigger program. The program is intended to log some test value, in this case just the date and time  to a csv file  when a button is pressed (log in WHITE, loop1).  Loop2 is intended to read a test value from a line in the first csv file and then add an extra test value to the end of that line when the serial number matches and then saves that line to a new csv file. This all works well but loop2 seems to pause a few times before continuing when either of the log button is pressed. I tried putting the code in 1 while loop with no success. Can anybody see what I am doing wrong?
    Attachments:
    ResinV10_csv.vi ‏25 KB

    Maiz wrote:
    Can anybody see what I am doing wrong?
    In addition to waht has been said already, your code is extremely convoluted.
    How often does the "read" file change? Do you really need to read the entire file with thousands of rows every ms just to look at one row?. If the file never changes, you could read it once before the loop.
    The way do do array opearions is mind boggling. You take one row, Index out the first element twice in parallel (once is enough!), then you index out the first element, built it into an array of one element, and compare that array with a scalar. Would't comparing the orignal element with the scalar be equivalent?
    Index array is resizable, you only need one instance.
    Getting five elements in a row just to build them back into a 1D array seems rather pointless. If the array has only five elements, there is nothing to do, and if it has more elements, you cold use "array subset", and if it has fewer elements, use "reshape array" to size 5.
    The correct format for reading strings is %s (not %.10f).
    Since you want both loops to run at the same speed, why don't you put it all in one loop? (this even eliminates the local variable) Then you could use a parallel loop for the file saving, using queues in order not to slow down the main loop. In the parallel loop, open the files before the loop, use lowlevel writes inside the loop, and close the files once the program stops.
    Can you explain your setup and what the program is supposed to do? I am sure it could be done with 20% of the current code.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • CHANGE-UP

    This movie came out a little over a week ago and after paying to watch it through my cable company on the release date, I had to go out and buy a copy the next day (Change-Up).   It is really funny, especially if you are a parent, and I definitely re

  • Can we trigger a workflow from e-mail create event?

    Hi Experts, My scenario is very simple-Whenever a mail is send for approval to the approver,two workitems-Approve or Reject should be created in the Appover's inbox.On clicking on any one workitem, corresponding mail for approval/reject should be sen

  • Help, how to make a program type in a command in command prompt?

    I've got a small code that only works if you type in something like this (assume that the .java file is smallcode.java): c:\>java smallcode filename.dcm on the other hand, in my main program I have a if else ladder that I want to fit in this code, wh

  • Question for the experts on Video problem

    We are away on holidays but didn't want to miss this opportunity to ask for help from the experts. I'm not sure if I have a problem with my motherboard or video card or both. I posted the problem previously but here it is again. I have an HPE-250f HP

  • Is there a reference of the ActiveX LabVIEW 8.2?

    Hi, I would like to write a tool which allow to show all my VIs in a tree and edit the properties of these VIs (for example 'documentation'). Then I want to generate an HTML and .CHM documentation from this set of VIs. I found an ActiveX for LabVIEW8