control of the while loop

Hello

I m, acquisition of data with the help of DAQ data and looping sound.

My problem is that I have not be able to control everything in timing loop Pulse like 200 ON 800 OFF time or continuous period as the second 100 m please give me some suggestions. How can I make such a system?

My second question is that I want to convert the voltage signal into a standard unit as BAR through fourth order equation. I try this thing with Mr. table is another method that I can use and one more thing the constant of the fourth equation of order I made the user set that is to say on the interface.

Please suggest me this is my first project.

Thanks and respect

Admiral Golf

Regarding your first question,.

You are eager to control data acquisition timers during data acquisition even acquires data based on your clock?

In my opinion, convert Wizard vi LabView code (right click on it) and learn to work with him in this way. I would like to keep it all in the execution of the loop at any time (unless you really want it still looks like the counter). State of the meter feed a case statement.

This may not apply to your situation, that I might have misunderstood. There are dozens of ways to handle this. Maybe you could post what you have so far?

For your second question, DAQmx drivers and MAX support scales. You can create information from data scaling to convert it to real-world units. I don't remember what exactly it is, but I think you can do what you want with it. This task that uses this scale data in real-world units as opposed to the electrical data. Check measurement and automation for it.

Tags: NI Software

Similar Questions

  • How to create a control of time for the while loop?

    Hi all

    I want to control my time running of the loop. In other words, I want to stop everything in the execution of the loop after a time (in ms) that is defined by the user. For example user defines Control Panel for 5 seconds before a while loop runs and stops after 5 seconds.

    I don't know is it possible with the while loop. I managed with the timed loop, but this must be wrong with my application. Y at - it of the other loops for timed control if it is not possible with while loop? There is also a simple loop with .vi random number (0-1) as an attachment.

    Best regards

    Jick

    Hi again,

    I managed to solve my problem right after I posted my first message. I did it with the passage of time and the register shift (for the elapsed time of reset).

    Thanks for your replies anyway!

    Best R

    Jick

  • To break out of the while loop (1)

    Hi all

    I have a simple question that if a callback to a command button function, I use a (bLoop) While
    loop, where bLoop is a boolean variable has the value TRUE, then how can I break up or out of this while loop by using a control on the façade, which released the while loop by setting bLoop = FALSE.

    I tried, but it didn't come out

    The problem here is that the CVI normally only runs a reminder at a time. While you are in snooze control, no treatment of GUI and subsequent calls to other reminders usually occurs.

    You can try the following approach-, but it's not really the best method:

    While (b_loop) {/ / within a reminder}

    ... / / Do your tight loop

    ProcessSystemEvents ();   Force the CVI to see if all the GUI needs maintenance controls

    }

    If you have a reminder of different control to erase the global b_loop, this packing approach might work for you.

    You must use this technique for very simple programs - it can quickly escape out of control and in the end upward in a mess if you're not careful. OR recommend that you use not ProcessSystemEvents() within a point of order.

    JR

  • delete 2d array in the while loop

    I have a table 2D being initialized outside of the loop executing a state machine, how would a clear table 2d in the while loop? I guess I'm not sure what to wire a constant matrix empty 2D too =)

    When you want to erase (regardless of this Boolean condition), wire just a constant matrix 2D of your shift register.  See attachment.

  • How the entry changes with each iteration of the while loop

    Hello

    can anyone explain (clarify) to know how or what contribution will be fed like the d block of adaptive filtering for the first, second entry (n) and remaining iterations of the while loop as shown in the picture as an attachment...

    As I need to feed the e (n) out of the while loop as input d (n) to the Adaptive block for the first iteration for the next iteration of the previous output e (n) of the block Adaptive must be fed back as input (n) d and other x (n) of entry form the DAQmx.

    Thank you.

    You have a shift register on the edge of the loop, so for the first iteration, the input (n) d will get everything that feeds the shift register on the left of the outside. After that the adaptive filtering performed, e (n) is injected in the shift to the right, register to be read from the shift register on the left on the next iteration. And so on. This seems pretty much what you want.

    PatanGova wrote:

    As I need to feed the e (n) out of the while loop as input d (n) to the Adaptive block for the first iteration for the next iteration of the previous output e (n) of the block Adaptive must be fed back as input (n) d and other x (n) of entry form the DAQmx.

    If you need retain the value in calls, use a node that is initialized in the world of feedback to feed out of the while loop at the entrance.

  • How to add the unique element (inside the while loop) to itself

    I have only digital output element that is in the while loop. Its value changes in each time the loop iteration. If lets say I want to adds the values of the ten first in iterations of the loop of this variable.  How can I do that.

    See attach image for more precision.

    Thank you

    JK

    Hi Joseph,.

    THINK THE STREAM!

    As the values are stored in the son and the shift registers (and NOT in any kind of variables), you must use these fundamentals of LabVIEW:

  • For results outside the while loop

    Dear friends,

    I have a while loop vi, which is attached to this mail. I want to update Boolean Boolean results, while the while loop runs. In fact this is not the case?

    Do I need to use it as a global variable or another simple method to do? Could you please guide me, or please alter the VI of the sample which is attached to this mail.

    Thank you

    Best regards

    Tom

    The Boolean value outside of the loop only will be updated, as wiring system, when the loop ends, it's how the LabVIEW data flow. The simplest method for updating the Boolean value outside of the loop is to unplug the wire, create a local variable (right click on the device, select 'create', 'Local Variable'), move the room inside the loop and hook it up to your function "equal." This is not necessarily the best method, just the easiest for this example.

  • store the value obtained in the while loop

    Hello

    I'm data acquisition (1,000 points every 0.1 s) in a while loop. I would like to calculate the average y of the first sample of 1000 points when I click on a Boolean 'calibrate', store that value somewhere (outside the while loop?) so that it can subtract from each new amplitude y. In the vi below, a new average value is calculated in each loop, although I would only use the first.

    You don't need to store the value outside the while loop. Keep the offset of the value when calibrate button is pressed and subtract the value with earned value. I modified your find VI the VI attached.

  • Table 1 d in the while loop problem

    Hello world

    I searched this problem in the forum, but seems only some positions quite didn't answer.

    I'm stuck by saving the data in a while loop.

    I have a while loop, within which there are two exits in each iteration, I want to add to a table, and then after the while loop is completed, I want to combine these two tables in a 2D array (since the release of them must be a pair in my case).

    I tried 'Build array' and 'transpose array' and 'write in spreadsheet' element set, which maintains concerns me is how simply to add the result in a 1 d table during each iteration, these 2 outputs are in digital format, which prevent to directly create a table for it.

    Any idea is appreciated,

    Thank you

    Chen Kunsheng

    Here are some other ways to insert.

    It may be useful

  • Force the While loop to exit when the delay is running

    Hello guys,.

    I have a While loop containing some jobs. One of them is delay for 10 seconds. When I push the stop button, the loop does not stop immediately. Instead, it stops after a few seconds (can be, pending other jobs is done).

    What can I do if I want to stop the loop immediately after I press the stop button?

    Thank you for sharing...

    Hello Yoppy,

    I don't know if I understand your problem completely, but here's the method I use to stop the while loop immediately (some ms delay will be there for you).

    I would like to know if the attachment helps.

    There are several ways to do it and you can get better solutions than this one on this community.

  • Control of the double loop for a positioning system. - movement ocntrol

    I am currently a control of the double loop for a positioning system, I use the speedometer to read the speed and the encoder for position on the position of the platform.

    the problem I'm meeting now, is that I'm not sure weather the computer have the PID toolkit, because I can't find them under the control design and simulation module.  so I did a PID using the basic features of labview, related information in the attached documents.

    I'm not sure of the part of the dt, the labview has this kind of service as of the timing of simpling?

    do I have to install the labview real_time potion? I'm just using the labview 8.5

    Another issue is that, how I'm going to let the system remember the position instead of back to 0 whenever I restarted the program? If not is there any other way I can control the motor to move the position of the target that is initially set?

    the last question is that is it possible for me to generate a profile about the current and desired position? to set a maximum speed and acceleration.

    I do not have a motion controller, so I have not installed the module version and motion.

    can someone suggest me a way to do it?

    Hey, 14 I never used TDMS files. but maybe this will help. [zip file]

    and if it isn't, I found this (which you can probably read into its equivalent in English)

    http://digital.NI.com/public.nsf/allkb/099731B9B31936B08625745A0076A610

    [don't forget to Congrats]

  • URGENT::opening multiple files - i have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    bbmChatDB of public database;

    public static FileConnection fconnRead = null;
    public static String fileReadData = "";
    public static InputStream is = null;
    data Byte [] = null;
    DataInputStream is = null;

    Here is my code...

    I have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    try {}

    FileConnection fc = Connector.open("file:///store/home/user/documents/BSM/") (FileConnection); "

    If (fc.exists ()) {}

    Enumeration e = fc.list ();

    While (e.hasMoreElements ()) {}

    System.out.println ("files are:" + (String) e.nextElement ());

    play this file
    StringBuffer stringBuff = new StringBuffer();
    try {}
    System.out.println ("opening file")-;
    System.out.println ("file name is:" + (String) e.nextElement ());
    fconnRead = Connector.open("file:///store/home/user/documents/BSM/(String)e.nextElement(),Connector.READ_WRITE) (FileConnection);
    System.out.println ("data length")-;
    If (fconnRead.exists ()) {}
    is = fconnRead.openDataInputStream ();
    data = IOUtilities.streamToBytes (is);
    Ddd = new String string (data);
    fileReadData = ddd.toString ();
    System.out.println ("length of data:" + fileReadData.length ());
    System.out.println ("read data :" + fileReadData);

    }

    } catch (IOException ee) {}
    ee.printStackTrace ();
    System.out.println ("Exception in the read data :")
    + ee.getMessage ());
    }

    }
    }

    } catch (IOException e) {}

    e.printStackTrace ();
    }

    {Finally

    try {}
    If (is! = null) {}
    is. Close();
    }
    System.out.println ("is closed...");
    } catch (IOException e1) {}

    E1. PrintStackTrace();
    }

    If (fconnRead! = null) {}
    try {}
    fconnRead.close ();
    } catch (Exception e) {}
    System.out.println (try ());
    }

    }

    }

    You can recode this treatment so that it uses only:

    e.nextElement ())

    Once a loop iteration.

    Directly at the start saying something like:

    String fileName = e.nextElement ());

    and use fileName everywhere in your loop.

    Also be aware that printStackTrace() will do nothing in your situation, it only works if you catch Throwable.  So make sure you something output all your catches exception and also have a catch (Throwable t) to catch the things you miss, as follows:

    {} catch (Throwable t)

    t.printStackTrace ();

    System.out.println ("Eception exception:" + t.toString ());

    }

    I think your code is thrown an exception and you don't see it.

  • How to stop the While loop in the Structure of the event with the same button?

    Hello

    I have a problem. I want to use a single control to activate an event in a structure of the event and the same control to end a while loop in this case.

    It is possible to use 2 controls to do this, but I need to be alone.

    Thank you

    You should NEVER place while loops inside the case of the event, and it is never necessary to do. Think about it: all you have to do is spin the code. You can easily use the outside while loop for everything. Simply place the code of the loop internal (without the inner loop) inside the case of delay and manipulate the time-out period between a pending finished and the infinite (-1), depending on the State of the Boolean value.

    A very simple example (LV 8.0)

  • When boolean is set to skip a step in the while loop

    Hey guys,.

    I have a program that controls a fan that pumps gas at a certain speed. This entire process is run in a while loop. When we move from the gas by a gimbal which is located on the front, we immediately jump in a cycle of breakdown and then goes back to the pumping of the gas at the rate previous, but we do not know how to achieve this. Can you guys give advice? Thank you!

    Sincerely,

    The Z.

    Hello,

    A shift in your loop register may be able to achieve this type of functionality. If wire you the switch in the shift register to the right and register in the structure in case of wire left shift, the loop must travel once more before moving on to the HP gas. Here is a link to a tutorial on shift registers:

    http://www.NI.com/gettingstarted/labviewbasics/shiftregisters.htm#shift records

    -Erik S

  • Strange behavior of the WHILE loop

    Dear experts LabVIEW

    I would ask you to give me an explanation of the behavior of the very simple VI as an attachment. This VI contains a WHILE loop with three parameters, input and STEP. The table of RESULTS shows the calculated values. Considering the input parameters OF = 0 TO = 1 LEVEL = 0.1, then the RESULTS table contains the values 0, 0.1, 0.2,..., 0.9, 1. Considering the input settings ON = 1, TO = 2, STEP = 0.1, then RESULT table contains values 1, 1.1, 1.2,..., 1.8, 1.9. The question is, why the number 2 is missing?  (I also tried to use different types of data, but without success). Thanks for your thoughts.

    Juraj

    Because you compare floating point numbers.

    For example, 0.1 cannot be represented in exactly in binary, cela repetitive additions probably will not end in an exact integer later.

    Since the three entries, you can calculate the number of values exactly and use a loop FOR. Do not use the convoluted code...

    Why not just use ramp model?

Maybe you are looking for

  • How to read old texts Iphone 5

    I would like to access older text messages. Have not deleted, just can not know how to reach them, in settings, choose "keep Messages forever" - may have been a mistake, because I can't see any 2 months ago. (lol)

  • Satellite A200 - how to get Vista back?

    Hi all Recently I bought used Satellite A200. The person who used it removed Vista and it seems, he removed also hidden HARD drive partition, I need. The only thing I have is the key product vista Home premium on the back side. Is it possible to go b

  • 15 - r110na: connected standby

    This laptop has moderator drivers installed as part of the Windows 8.1 desktop activity. These drivers allow standby connected.  I don't know if this model of laptop supports connected before.  Anyone know please? https://social.msdn.Microsoft.com/fo

  • video card, that you are running is not supported.

    I have tried running airbourne Medal of honor, on windows vista, nothing helps, even after having used troubleshooting on windows. my computer is acer aspire 5720, windows vista. the message I get is. (the video card is not supported)

  • Default application to open ZIP files?

    I guess there is none because ZIP is missing in the QNXApplication.supportedFileTypes. However, the preloaded file manager (developed by RIM) can handle ZIP files. I need to set up my own ZIP handling, if I want to open ZIP files?