Local variable initialization

How local variables initialized in CVI?
Are there any default values for local variables?

Following function is generated by IVI Scope driver generator.
If the vertical coupling is GND, variable simOffset is used in an equation without being initialised.
Is this a bug and it must be initialized?
* Function: TTTTT_FetchWaveformSafe
* Purpose: This function returns the data from the instrument. You must
* range-check all parameters and lock the session before calling
* this function.
static ViStatus TTTTT_FetchWaveformSafe (ViSession vi, ViConstString channelName,
ViInt32 waveformSize, ViReal64 waveform[],
ViInt32 *actualPoints, ViReal64 *initialX,
ViReal64 *xIncrement)
ViStatus error = VI_SUCCESS;
if (!Ivi_Simulating (vi)) /* call only when locked */
ViSession io = Ivi_IOSession (vi); /* call only when locked */
ViChar rdBuf[5000];
checkErr( Ivi_SetNeedToCheckStatus (vi, VI_TRUE));
/*=CHANGE: ==============================================================*
Do actual instrument I/O only if not simulating. Example:
viCheckErr( viPrintf (io, ":WAV %sATA?", channelName));
viCheckErr( viRead (io, rdBuf, 5000, VI_NULL));
Change the number of elements in the rdBuf array as appropriate for your
instrument's maximum record size.
Convert the rdBuf raw data here to a double precision floating point
numbers and store the data in the waveform array.
Read the waveform preamble from the instrument to get the initial X
and X increment values.
If the oscilloscope did not resolve all points in the waveform record,
replace such points with the IVI_VAL_NAN value. The function should
return the TTTTT__WARN_INVALID_WFM_ELEMENT
warning in this case.
*============================================================END=CHANGE=*/
else
ViInt32 x;
ViReal64 yRange, simOffset;
ViInt32 triggerSlope, vCoup;
ViReal64 k, level, theta, offset;
checkErr( Ivi_GetAttributeViInt32 (vi, VI_NULL,
TTTTT_ATTR_HORZ_RECORD_LENGTH,
0, actualPoints));
checkErr( Ivi_GetAttributeViReal64 (vi, channelName,
TTTTT_ATTR_VERTICAL_RANGE,
0, &yRange));
checkErr( Ivi_GetAttributeViInt32 (vi, channelName,
TTTTT_ATTR_VERTICAL_COUPLING,
0, &vCoup));
checkErr( Ivi_GetAttributeViReal64 (vi, channelName,
TTTTT_ATTR_VERTICAL_OFFSET,
0, &offset));
checkErr( Ivi_GetAttributeViInt32 (vi, VI_NULL,
TTTTT_ATTR_TRIGGER_SLOPE,
0, &triggerSlope));
checkErr( Ivi_GetAttributeViReal64 (vi, VI_NULL,
TTTTT_ATTR_TRIGGER_LEVEL,
0, &level));
checkErr( Ivi_GetAttributeViReal64 (vi, VI_NULL,
TTTTT_ATTR_HORZ_TIME_PER_RECORD,
0, xIncrement));
checkErr( Ivi_GetAttributeViReal64 (vi, VI_NULL,
TTTTT_ATTR_ACQUISITION_START_TIME,
0, initialX));
theta = asin (2*level/yRange);
if (triggerSlope == TTTTT_VAL_POSITIVE)
k = 1.0;
else
k = -1.0;
if( *actualPoints>waveformSize )
*actualPoints = waveformSize; /* Checking number of points to write */
*xIncrement /= *actualPoints;
if (vCoup == TTTTT_VAL_DC)
simOffset = 0.5;
if (vCoup == TTTTT_VAL_GND)
k = 0.0;
for (x = 0; x < *actualPoints; x++)
ViReal64 y = simOffset + k * 2.5 * sin (*xIncrement * 12560 * x + k * theta) + // ~2 periods of 1kHz sinewave
(!(x%20)) * (16384 - rand())/150000.0;
waveform[x] = (offset + yRange/2) > y ? ((offset - yRange/2) < y ? y : (offset - yRange/2)) : (offset + yRange/2);
Error:
return error;

Similar Messages

  • Default initialisation of member variables and local variables

    I don't understand why member variables are initialized with default values by Java.
    Objects are initialized with "null" and primitives with "0", except boolean, which is initialized with "false".
    If these variables are used locally they are not initialized. The compiler requires them to be initialized by the programer, for example "String s = null".
    Why? What is the use of that difference?
    And why are arrays always initialized with default values, no matter if they are member variables or local variables? For example String[] s = new String[10]; s[0] to s[9] are initialized with "null", no matter if "s" is a local or member variable.
    Can someone please explain that strange difference, why it is used? To me it has no sense.

    Most of the time I have to initialize a local variable
    with "String s = null" in order to use it because
    otherwise the compile would complain. This is a cheap
    little trick, but I think everyone uses it.
    I wouldn't agree with "most of the time". The only cases where it is almost necessary to do that is when the variable should be initialized in a loop or a try-catch statement, and that doesn't happen too often.
    If local variables were initiliazed automatically without a warning it would be a Bad Thing: the compiler could tell when there is a possibility that a variable hasn't been assigned to and prevent manymanymany NullPointerExceptions on run time.
    And you didn't answer me why this principle is not
    used with arrays if it is so useful as you think.
    Possibly it is much more difficult to analyse the situation in the case of arrays; what if values are assigned to the elements in an order that depends on run time properties such as values returned from a random number generator.
    The more special rules one has to remember, the more
    likely one makes errors.I agree, but what is the rule to remember in this case?

  • Problem using local variable in event loop

    I have a state machine from which I want to monitor various controls, including "Start" and "Stop" buttons.  Not every state needs to monitor the controls.  At present, most states run timed loops.  In the first state that reads the front panel, I have an Event structure (inside a While loop) that monitors the various controls' Change Value events.  For numeric controls, I update variables (in shift registers) as needed.  The "Start" button is used to end the While loop controlling the Event structure, allowing the State to exit to the next state.
    My problem comes in subsequent states that employ this same idea.  Here, I put a Local Variable bound to the Start button and use the same code, but it frequently happens that when I enter this particular state, I cannot "turn on" the control -- I push the button, but it stays off.  Curiously, if it was On when I enter, I can turn it off, but then I'm stuck not being able to turn it on.
    I mocked up a very simply routine that illustrates this.  There are two sequences (corresponding to the two states).  Both use an Event loop with a local variable bound to my Stop button (really this is an LED control with custom colors).  I've deliberately moved the "initialization" (the declaration of the control in the block diagram) out of the Event loops -- putting it inside the first loop modifies the behavior in another strange way.
    Here's my thinking on how I would expect this to work:  The code outside Event Loop 1 should have little effect.  Assume the Stop button is initially Off.  You will "sit" in Event Loop 1 until you push the Stop button, changing its value to True; this value will be passed out of the Event case and cause the first While loop to exit.  You now enter the second sequence.  As I understand the Exit tunnel, it defaults to "False", so I'd expect to stay in the second Event loop until I turn the Stop button from On to Off, which will pass out a False, and keep me in the While for one more button push.  However, this doesn't happen -- I immediately exit, as though the "True" value of the Stop local variable is being seen and recognized by the Event loop (even though it hasn't changed, at least not in the context of this second loop).
    An even more curious thing occurs if I start this routine with the Stop button turned on.  Now I start in my Event loop waiting for a change, but this time the change will be from On to Off, which won't cause an exit from the frame.  This will be reflected by having the While loop count increment.  We should now be in the state of the example above, i.e. in an Event loop waiting for the control to be pushed again, and turned On.  However, clicking the control has no effect -- I cannot get it to "turn on".
    Where am I going astray in my thinking?  What is it about this method of doing things that violates the Labview paradigm?  As far as I can tell, what I'm doing is "legal", and I don't see the flaw in my reasoning, above (of course not -- otherwise I'd have fixed it myself!).  Note that because I'm using local variables inside Event loops (and I'm doing this because there are two places in my code where I want to do such testing), the Stop control is not latching (as required).  Is there something that gets triggered/set when one reads a latched control?  Do I need to do this "manually" using my local variable?
    I'll try to attach the simple VI that illustrates this behavior.
    Bob Schor
    Attachments:
    Simple Stop Conundrum.vi ‏14 KB

    altenbach wrote:
    Ravens Fan wrote:
    NEVER have multiple event structures that share the same events. 
    Actually, that's OK.  NOT OK is having multiple event structures in the same sequence structure.
    See also: http://forums.ni.com/ni/board/message?board.id=170&message.id=278981#M278981
    That's interesting.  I had always thought I read more messages discouraging such a thing rather than saying it was okay.  Your link lead me to another thread with this message. http://forums.ni.com/ni/board/message?board.id=170&message.id=245793#M245793.  Now that thread was mainly concentrating on registered user events which would be a different, but related animal. 
    So if you have 2 event structures they each have their own event queue?  So if you have a common event, one structure pulls it off its event queue and it does not affect the other structure's event queue?  I guess the inherent problem with this particular VI was that the second event structure locked the front panel.  Since the code never got to that 2nd event structure because the  first loop never stopped because the change was from true to false.  After reading your post and the others, I did some experimentation and turned off the Lock front panel on the 2nd structure, and that prevented the lockup of the program.
    Overall, the example VI still shows problems with the architecture and I think your answer should put the original poster on the right track.  I think as a rule I would probably never put the same event in multiple structures, I feel there are better ways to communicate the same event between different parts of a program,  but I learned something by reading your reply and about how the event structures work in the background.  Thanks.

  • Variable initialization

    Hello guys,
    Is there anybody know how and when java checks for variable initialization?For example if we change a value, assume a without initializing it we get variable a might not have been initialized.I wish to know how java checks that the variable is already assigned or not.
    int a;
    a++;//How java checks this
    regards,
    Haddock

    Rules is:
    To variables of instance - It's default value attribute automatically if not initialize with value.
    To local variable (methods for example) - It's default value in initialization has been MUST attributed
    Instance variables has a folliwing default value:
    class A{
    int i; //default value is 0
    char c; //default value is '\u0000'
    byte b; //default value is 0
    short s; //default value is 0
    long l; //default value is 0
    float f; //default value is 0.0
    double d; //default value is 0.0
    boolean bl; //default value is false
    String str; //Object is always null
    int x[]; // null. It's Object's array
    int x[5]; // 5 times default value 0.
    void testInitializeValue(){
    int x; // Compiler error; This variable has been initialized
    if(x == 5){
    return;
    Ok..Thanks!!

  • Catch-22: need to assign a local variable within an anonymous class

    static boolean showMessage(Window parent, String button0, String button1)
        throws HeadlessException {
              final Window w = new Window(parent);
              Panel p = new Panel(new GridBagLayout());
              final Button b[] = new Button[]{new Button(button0), (button1 != null) ? new Button(button1) : (Button)null};
              boolean rval[]; //tristate: null, true, false
              w.setSize(100, 50);
              w.setVisible(true);
              //add b[0
              gbc.fill = GridBagConstraints.HORIZONTAL;
              gbc.gridx = 0;
              gbc.gridy = 3;
              p.add(b[0], gbc);
              //add b[1]
              if (button1 != null) {
                   gbc.fill = GridBagConstraints.HORIZONTAL;
                   gbc.gridx = 1;
                   gbc.gridy = 3;
                   p.add(b[1], gbc);
              w.add(p);
              w.pack();
            w.setVisible(true);
            //actionListener for button 0
              b[0].addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                             if (e.getSource() == b[0]) {
                                  w.setVisible(false);
                                  rval = new boolean[1];
                                  rval[0] = true;
              //actionListener for button 1
              if (button1 != null) {
                   b[1].addActionListener(new ActionListener() {
                             public void actionPerformed(ActionEvent e) {
                                  if (e.getSource() == b[1]) {
                                       w.setVisible(false);
                                       rval = new boolean[1];
                                       rval[0] = false;
            while (true) {
                 try {
                      if (rval[0] == true || rval[0] == false) //should trigger NullPointerException
                           return rval[0];
                 } catch (NullPointerException e) { }
         }catch-22 is at
    rval = new boolean[1];
    rval = false;javac whines: "local variable rval is accessed from within inner class; needs to be declared final"
    How do I assign to rval if it's declared final?
    Or at the very least, how do I get rid of this error (by all means, hack fixes are okay; this is not C/C++, I don't have to use sanity checks)?
    I'm trying to make a messagebox in java without using JOptionPane and I'm trying to encapsulate it in one method.
    And I'm far too lazy to make a JNI wrapper for GTK.

    dcminter wrote:
    How do I assign to rval if it's declared final?You don't and you can't. You're not allowed to assign to the local variable of the outer class for extremely good reasons, so forget about trying.
    Or at the very least, how do I get rid of this errorIf you don't want the side effect, then just use an inner class variable or a local variable.
    If you want the side effect then use a named class and provide it with a getter and setter.
    Finally, in this specific case because you're using an array object reference, you could probably just initialise the array object in the outer class. I.e.
    // Outer class
    final boolean[] rval = new boolean[1];
    // Anonymous Inner class
    rval[0] = true; // No need to intialize the array.
    I declared it as an array so that it would be a tristate boolean (null, true, false) such that accessing it before initialization from the actionPerformed would trigger a NullPointerException.
    Flowchart:
    is button pressed? <-> no
    |
    V
    Yes->set and return
    Is there a way to accomplish this without creating a tribool class?

  • How to avoid "The local variable ___ is never read" warnings

    If you create an instance of a class using something like:
    MyClass myClassInstance = new MyClass(param1, param2, ...);
    And everything you require this class to do is done from within it's constructor then you always get a warning saying "The local variable myClassInstance is never read" with the class you're making this initialization from.
    Is there a good practice technique to avoid these warnings?
    On a large project this type of warning can become numerous and it would be cleaner to avoid them.
    Thanks

    TimThe.., I disagree about the result of a bad design
    comment. In simple cases it can be beneficial to
    only require an object's constructor, then that
    object's actions are self contained and its methods
    can then be called from its own constructor. In the
    right situations this can help to loosen coupling
    between classes and increase encapsulation.I disagree with that. If your code depends on behaviour that is carried out by a constructor, you have a dependency on a concrete class, which is a nice quick way to tightly couple classes. You'd achieve looser coupling if the desired behaviour was inside a method, which was in turn declared on an interface

  • Local variable for an Array of fixed size

    Hello,
    I have a two multirate loops in a VI. 
    In one loop, I want to refer an fixed sized array initialized in the other loop.
    But I coudn't name the array, so I can't refer it.
    Is there any way to refer it?
    Thanks,
    Young.

    If you need a local variable, there is no other way than to create an indicator for it.
    In LabVIEW there is no "fixed length" array : you can always add or remove an array element, and you don't need to declare it as in other languages. They are intrinsic dynamic objcets. Of course, the memory manager has to cope with this, that's why it's often better to initialize an array, to give it its final size immediately, resulting in faster running programs. However, this is only noticeable with relatively large arrays (> 10000-100000 elements).
    May be you should explain in more details what you intend to do, because trying to reproduce a C approach in LV is probably not the best thing to do. For instance, you said that you are initializing your array in a first loop. You mean that you re-initialize the array at each iteration ? I suppose no, so may be you could put the initialize step out of the loop, and wire the array to your two parallel loops.
    Remember also that local variables are not always good programming solutions, since using them will generate copies of their content each time they are refered to. And that can low down your program very significantly...
    Message Edité par chilly charly le 11-05-2005 05:05 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to use local variables declared in b/t the methods in other views

    Hi
    i need to use the value of the local variables declared in b/w the views in one other view,as i have manipulated the value based on some condition & want to use it in 1 more view for my req.,but that variable is not global one just for once i need to use it,and i can't again write the whole for its conditions,as its there in initialization view,which if coded again,can hit the functionality there,so is it possible to use the value of such local variables thereafter or not,if yes pls let me know,or i need to declare the global variable for this.

    hi,
    1.Declare an Attribute in Component controller.
    2. Pass the value to this Attribute in View V1.
             using :
      wd_comp_controller->Att = 'Saurav'.
    3. Now in view2 , you can access this Attribute using:
      data lv type string.
         lv = wd_comp_controller->Att .
    Here Att is my attribute of type string declared in component controller.

  • Can you sort the "local variable" pick list?

    My program has a lot of local variables. If I right click on a variable and click on "select item", a loooong list of all my local variables appears. They appear to be in the order in which they were created in my program.
    Is there any way to modify the display to where the local variables appear in alphabetical order?
    Amateur programmer for over 10 years!

    The best solution is to not use a lot of local variables . Here is a neat trick to use local variables without having to use local variables . If you are using a state machine (case structure inside a while loop), create a cluster constant on the block diagram inside a state or case called "Local Defs". Inside the cluster, put constants for every local variable you will use. Label the constants like you would a local variable. Put a shift register on the loop border. Wire the cluster to the shift register on the right side. Do not initialize the shift register on the left side. In any case frame, you can wire from the left shift register into an unbundle or bundle to read or write to the Local. You never have to call the Local Defs state, the cluster will be defined because of the wiring. If using controls at many places, make a local constant for each control and have a state where the control is written to the local. Then you can read the local to use the value at any time. See attached vi for an example.
    - tbob
    Inventor of the WORM Global
    Attachments:
    StateMachineWithLocals.vi ‏45 KB

  • Create local variable by an expression

    Hi!
    I searched the discussion forum, but I couldn't find any information about how to create a local variable using an expression.
    The TestStand version I'm using is 4.0.
    lets say, if I wanted to create a variable called "foo" as integer. What will the expression be?
    The expression will be called from the step-type "Statement".
    Thanks
    Best regards
    Selvakumar

    Locals.SetValNumber("Foo", 1, 0) will create a variable named Locals.Foo, and initialize it with a value of 0.
    The variable will only exist for the lifetime of the execution.
    Allen P.
    NI

  • Local Variable Probelm

    public class Q275d {
        static int a;
        int b;
        public Q275d() {
            int c;
            c = a;
            a++;
            b += c;
        public static void main(String[] args) {
            new Q275d();
    }Since int c is not initialized . It shud give a compiilation error. But it does not. What is the reason behind this. I thought it was a local variable
    Regards,
    http://www.beginner-java-tutorial.com
    Hemanth

    Since int c is not initialized . It shud give a
    compiilation error. But it does not. What is the
    reason behind this. I thought it was a local
    variableYou're initializing it when you say c = a;Perhaps you thought you had to initialize it on the line where you declare it? As in int c = a;You don't need to do that. You just have to initialize it before you try to read its value. Of course, if you know what value you're going to give it at the point of declaration, it's generally considered good practice to do so.

  • Wire or local variable?

    The best method to pass data inside the same VI is wire or local variable? or the same? Which one is more effient? Thanks.

    Everything Dennis said above is true.
    Let's look at a seasoned text programmer suddenly forced to use LabVIEW: The first mental hurdle the new LabVIEW programmer might face is the fact that there are no visible "variables", something that is central to text based programming languages. Looking for "variables", he might stumble on local variables and suddenly he thinks he found the solution to keep programming the old-fashioned way.
    What you might see as a result, is a LabVIEW program that has all controls and indicators completely disconnected, all lined up on the top or left side of the diagram (Similar to the variable definitions section in classic text code ). Then, on the right side everything is done writing and reading from local variables. Each disconnected code segment duplicating a programming statement, e.g. [Length] x [Height] = [Area] (where [x] are now a local variables).
    This is NOT in the spirit of LabVIEW! In LabVIEW, the wire itself is the variable. Controls and indicators are just user interface access ports to the data, they contain their own data copies and are read or updated whenever dataflow might service them. Local variables are just secondary access points to the same controls or indicators.
    Lets look at a (slightly flawed) analogy: I need to give you a CD with my LabVIEW program. I can (1) hand it to you directly (=wire) or I can (2) drop it off at the front desk (=front panel ) and you can pick it up later (local variable). As you can see, case (1) is more efficient and easier to debug. We both immediately know if the transaction succeeded. Case (2) could have a race condition, e.g. what happens if you try to pick it up before I had a chance to drop it off?
    Local variables should be used sparingly. There are two main uses:
    (1) Sometimes, it is required to either read from indicators or write to controls programmatically. This could be to initialize controls with a set of default values or similar.
    (2) Exchanging data between two independent parallel processes in the same VI. For example to stop all while loops with a single control.
    Anything that can be done with a wire should be done with a wire. If a wire is not sufficient, a shift register might do the trick. Local variables should only be used as a last resort.
    Remember: Always go with the dataflow!

  • What is difference between local variable and property node ?

    What is difference between local variable and property node ?
    " 一天到晚游泳的鱼"
    [email protected]
    我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
    欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview

    To make things clear, here are two small examples that show how nasty locals and value properties can be to the naive programmer.
    - Open the diagram of the race condition.vi before running it and try to predict what will be the values of the two counters after the third run.
    - Use the Compare Locals Properties and Wires.vi to find out how slow locals and value properties can be (times 1000+).
    This being demonstrated, I must add that I use globals and value properties quite often, because they are often very convenient
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Race condition.vi ‏9 KB
    Compare Locals Properties and Wires.vi ‏18 KB

  • How to use local variable in member formula?

    Hi Expert,
    We would like to use a {local variable} in a member formula, so that it can pick up the prompt from webform upon save. Would like to know if it is possible to do? If so, what is the correct syntax?
    We attempted to use brace {scenario}, blacket [scenario], blacket with quote ["scenario"]. None of these work.
    We are using 11.1.2.1 version, EPMA, Hyperion Planning.
    Thanks in advance for your help!

    One other pointer. Where did you define your variable? Hopefully you went into Calc Manager and selected <Tools>, <Variables>. From there, navigate to your application or database. Right-click on your application or database and select "New". In the bottom panel, you'll need to select your Variable Type. Make sure you select "Member", and not "Members". You cannot pass "Members" (plural) to a web input form. Also, if you want to define a variable for a custom dimension, you'll need to do it at the database level. Standard dimension member variables can be defined at the app level. (Not sure why this is the case, especially when my custom dimension exists in all plan types . . . . )
    Anyway, hope this helps,
    - Jake

  • Data Acquisition - using local variables to write data to a file

    Hello,
    I am running a Data Acquisition vi (currently in LabVIEW 7.1 but soon to be updated to 8.2) that collects ~100 parameters of data from several sources contained in a while loop. The current configuration (which I did not write) uses very few subVIs and writes to ~100 local variables to store each parameter. It then reads all the local variables and builds an array of all the strings, converts then to a spreadsheet string, then uses the write characters to file function to append to a datafile. I am trying to clean things up and have came up with subVIs to collect the data from the following sources:
    8 serial port sources collecting btwn 8 and 20 parameters each
    ~15 thermocouple readings
    ~10 analog inputs
    ~20 parameters read off an ARINC 429 bus.
    I have come up with a subVI to read each of the sources and have placed the subVIs in the while loop. Each subVI outputs the data that it collects in array or cluster form. I was wondering how best to write each parameter to a CSV file at between 1 and 10 Hz. Should I write each subVI output to a LV and then read them off as was done before (the difference being that I have reduced the # of LVs to ~10 vs >100?
    I should add that precise timing is not that important, so if all the subVIs are not collecting simultaneously (which I understand that they won't be), it does not really matter.
    Thanks.

    Hi jilla,
    jilla wrote:
    What I think that you are saying is to turn the outputs of the 4 subVIs into inputs of a 5th subVI that writes to the data file. Correct?
    Yes.  It may sound like a fine-point, but I beileve it's better to create a VI specifically for formatting data - in your example, 4 arrays IN, a single string OUT.  Then write the string to file as a seperate operation.  GUI-displayed data can go through a similar transformation, the four arrays wired to a subVI which builds output-structures specifically for display.  It's a beginner's mistake to put lots of individual controls and indicators on the screen when groups of them are naturally related (in an object-oriented sense.)  Use clusters to group related controls - this will keep the diagram much cleaner.
    One more question: at what point (either # of data points or frequency of data collection) does it become necessary to use queues? Thanks.
    Well, there's not really a clearly definable "point".  I'd say if your update-rate climbs above 100Hz, or you witness poor program or system performance, then it's time.  The scenario you've described is a fairly simple acquire/display&log loop - and simple is good.   Then-again people can't see/react-to updates faster than about 10Hz - so it doesn't make sense to sacrifice performance - if performance becomes an issue.
    Re: queues:  Queues are sometimes used to buffer data that's "produced" in one place and "consumed" in another.
    Here, if/when logging data, you're logging with every DAQ.  I wouldn't recommend using a queue to transport data from a "DAQ loop" to a "Logging-loop" - those functions can be in the same loop.  Should/could a queue be used to get data from a "DAQ loop" to update the GUI at a lower frequency?  Sure, but a Notifier might be a better choice.   Further, in the (simple?) program you've described, you might use a case structure (True/False) to only update FP indicators every "X" iterations - a simple solution that doesn't require Queues or Notifiers.
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

Maybe you are looking for

  • Problem in my MacBook Pro Video Calling in Facebook

    I have problem when trying to start video calling in facebook, it always says "The video calling software encountered an error while starting." and it's very annoying because I can't use video call on facebook. I tried to follow instructions on how t

  • ITunes freezes while installing

    At first, there was a problem with my iPhone showing up in iTunes. I fixed that problem. I was then told to uninstall iTunes and re-install it. Now, every time I try downloading iTunes the installation gets stuck at 76% (50.2 MB). I've tried every so

  • Mail Account Freezing

    I have one of my IMAP accounts that is not downloading any new mail, all other accounts are functioning correctly. My best guess as to what caused the problem is that I tried to send an attachment that was too large. Ever since then, this account jus

  • SHD0 transaction-how to restrict the variant transaction to specified users

    I have created a variant transaction for MM02 wherein am disabling a field .I want this field to be disabled only for certain users.The variant transaction which I created affects all users.So,for everyone the field is grayed out.How to restrict this

  • IP30 Problem

    Hi, Requirement is :-  Client want to maintain the components in the task list for their preventive maintenance activities. All the materials/components in this plant are batch managed and we can not enter the batch number along with the components i