Synchronization start/abort fetch by boolean control with postprocessing queue

Hello dear colleagues!
Thanks for your support, I ask you still to help to understand the following:
How correctly to supervise on/off of Fetch function? (An example of that what I did already, please see the enclosed file).
I.e. I explain conditions: it is necessary for me start/abort Fetch cycle on boolean control, i.e. then when it is necessary. 
And one more condition I wish to adhere Fetch cycle at least approximately by 1st second (in my example and it turns out).
Further, it agree my example, I consider quantity of second cycles and accordingly I understand, that Fetch have accepted so much that data for so much that seconds. Boolean control is in position true a certain interval, from 1st till 100 seconds.
The postprocessing cycle (detecting of peaks) lags behind a fetch cycle for 1 second approximately.
My example works, but it is not always correct (as it seems to me), i.e. sometimes fetch works once again than it is necessary, or on the contrary it is less.
I consider, that where that in a code I have broken sequence Fetch and Abort. 
I ask you to correct a code as consider it necessary (there it very little). 
In other words, I need somehow programmatically to distinguish, that postprocessing of a current interval of gathering (from 1st till 100 seconds) stopped and to make by this criterion some actions. 
I don't want to use any timers, there can be a turn/semaphores or new queue, etc. will help??
Sorry for my English. Please, advise me.
Message Edited by Current 93 on 11-17-2009 06:04 PM
Attachments:
8ch_I8_bool_control_reset_before_fetch.vi ‏43 KB

There are numerous issues with this code.  Here are the things you can do to make it much better:
The enqueue in the top loop needs to be inside the Waiting case.  It will feed empty packets to the analysis loop when waiting.  This is not good practice.
You have not implemented a way to stop either loop.  The previous suggestion for the top loop would probably work for both, since closing the queue will cause the bottom loop to error and exit.
Your code for "x+y" would be better handled with a shift register.  Better yet, simply wire it to the iteration terminal on one of the loops.  The bottom shift register on the top loop is a reimplementation of the iteration terminal output.
You could use an event structure for handling changes in things like the channel.  However, this would complicate your code quite a bit, since it would require a state machine wrapper on your analysis code and another loop for the event structure.
The implementation of "texp" makes the top while loop into a FOR loop.  If your LabVIEW version is new enough, consider using a FOR loop with a conditional terminal (abortable FOR loop).
See what you can do and post your results.  If you get stuck, let us know.
This account is no longer active. Contact ShadesOfGray for current posts and information.

Similar Messages

  • LabVIEW PDA customize boolean control with picture

    For a PDA application, I'm looking for a way to customize a boolean indicator. To do this I went in the customize option of the boolean and then import picture for the false and true state. in programming mode I see the correct picture for the different states but when I download this application on my PDA (TPC-2006 with winCE) in only see a blank picture on the boolean. Is this a limitation of the LabVIEW PDA or is there another way to do this ?  (see example in attachement)
    Thanks in advance for your help.
    Attachments:
    EC-103.vi ‏12 KB

    Hey Poussin,
    You bumped into a boundry of LabVIEW PDA. LabVIEW PDA did not support custom controls at all uptil very recently. Only since LV PDA 7.1 there are a few features which are possible like coloring and resizing, see the link below.
    http://digital.ni.com/public.nsf/websearch/08DD9CAACA1F64F586256E920061E4CD?OpenDocument
    Using pictures however is not possible. The control will have its functionality on the PDA but it will not show its decoration.
    Regards,
    Wouter
    National Instruments

  • Using an event structure to reset a boolean control with ring menu value change

    I am trying to get two boolean buttons to reset when the value of a ring menu changes.  For this I am using an event structure set to execute with a ring value change.  However I have other code that needs to be executing while the event structure waits for the value change.  I place my event structure inside the while loop the buttons reset as expected but my other code does not run (except at the moment of value change). If I place it outside the loop the rest of the code functions as expected but the buttons do not reset.  Any help you can offer is much appreciated.
    Solved!
    Go to Solution.
    Attachments:
    event structure reset.vi ‏11 KB

    try this
    Attachments:
    event structure reset_edit.vi ‏14 KB

  • Is there a way to start a VI using a boolean control in my front panel instead of clicking the White Right Arrow button?

    i'm trying to determine if there's a way to run a VI from the front panel without clicking the
    White Right Arrow button.
    All suggestions are welcome!
    Solved!
    Go to Solution.

    Yes.
    You set your VI to run when opened.  Then you put a Start button in a while loop with a small wait statement ahead of the real part of your code.  (You'll need a data dependency between that and you main code, either a wire or a flat sequence structure.)  That start button stops the while loop and allows the rest of the code to execute.
    Better solutions would call for an event structure and possibly a state machine architecture.

  • Save, edit boolean controlled stopwatch

    Hellow Fellow LabVIEW users
    The attached is a stopwacth corresponding to this earlier forum post.
    http://forums.ni.com/t5/LabVIEW/Reentrant-Boolean-​Array-Controlled-stopwatch-SubVI/m-p/1334916#M5427​...
    I want to add to the solution and make my VI do the following 
    a) With each iteration, I want the VI to save the values in each individual stopwatch, so even when the program closes and is reopened the values are intact.
    b) When I press the "Edit B4" boolean an "Edit Time" control and "Edit and Save" boolean control array comes up. I want to be able to change the values of the original indicator array when I press the "Edit and Save" Boolen as well as revert back to the original array with the new values. 
    c) I want these new Array values to be saved with the new iteration. 
    I believe I should use an event structure.I also plan on using the SubVI 12 different times. Please let me know how I shuld proceed in this regard. Your help as always is greatly appreciated and needed. Please let me know if you need further clarification.
    Thanks
    mhaque
    Attachments:
    timer snapshot arrayMODsubVI.vi ‏247 KB
    CallTimerSubVI.vi ‏247 KB

    Drew answered the question about saving between runs, but I think your problem is much simpler
    mhaque wrote:
    a) With each iteration, I want the VI to save the values in each individual stopwatch, so even when the program closes and is reopened the values are intact.
    What do you mean by "intact"? Should the program continue at the times where it stopped of or should it account for the time where the program did not run? For example if you close the program for one hour and start it again, should all active timers be one hour higher?
    In this case you simply want to write the current contents of the start ticks feedback node and the boolean states to a flat binary file whenever they change (probably not very often). Use a file with a fixed name right next to the executable. Open the file once, then use lowlevel file IO for the duration of the program run and close when the program ends.
    When the program starts, you can use the "first run?" primitive to reload the data into the shift registers as needed.
    Make the subVI a proper action engine with several modes (init, normal run, overwrite timers, end, etc.). Remember, to customize the timers, you need to overwrite the shift regsiter contents inside the subVI.
    Your use of property nodes is a bit clumsy. You don't need to write to all these property nodes with every iteration of the loop, they only need to be written when the boolean input changes (property nodes are relatively expensive because they force synchronous execution). Instead of the property nodes, you could just use a tab control with two tabs (e.g. run|edit) one containing the timers and one the edit time array. This eliminates the boolean switch and all property nodes.
    What's the maximum duration of a program run? If it exceeds 10^32ms, you probably need to switch to timestamps instead.
    Use a simple event structure in the toplevel program with the bulk of the code in a 1000ms timeout case. Add cases for "stop:value changed" and "edit time: value changed". 
    LabVIEW Champion . Do more with less code and in less time .

  • Jabber and deskphone control with video

    Hi all,
    one of our clients has IM and presence 9.1 and jabber on windows 9.1.X and is integrating with Active directory for user synchronization and authentication.
    Q.
    why when we use deskphone control with jaber users have an audio in hardware phones but video in Jabber clients not working ?
    Note that the media service interface file  is installed.
    Help needed.
    Thanks in advance.

    you might want to have a look at this post 
    https://supportforums.cisco.com/thread/2160363
    =============================
    Please remember to rate useful posts, by clicking on the stars below. 
    =============================

  • Creating a user prompt when a boolean control is first lached but not contiuousl​y showing while it is lached.

    Greetings,
    I need a boolean control that will write measured data to a text file while it is lached and do nothing while it is unlached (which is simple).  However, I also need it to display a dialog box when it is first lached to prompt the user to either append to an existing file or create a new file.  It should not contiously prompt the user to select new or append while it is lached.  It should only reprompt if the boolean has been unlached and relached.
    Any ideas?  I have tried several different approaches but everything that I have done has either not worked at all or contiuously prompts while lached.
    I know it will involve a shift register and at least one boolean comparison but I cannot figure out the arrangement.
    Thanks in advance.
    Solved!
    Go to Solution.

    Hi BB,
    looked at the Pt-by-Pt functions. There you will find a ready-to-use VI to detect edges of a boolean signal!
    Or use that boolean math: RisingEdge = signal[n] AND NOT(signal[n-1]). (Here you need the already mentioned boolean function with a shift register...)
    All you need is opening the dialog for rising edges of the boolean signal...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • "Source not found" Error creating URL Data control with query parameters

    Hi,
    I have a restful service for which i want to create a URL data control. I am able to create the URL data control successfully when i am not passing any parameters in the Source field. But if i am specifying the parameters in the source field like this Department=##ParamName##, something weird is happening. After giving the param string in the Source field, it asks for default param value to test the url. It tests the url successfully. After that i select XML as the data format in which i am mentioning the xsd like this . "file:///C:/..../something.xsd" . And this is when i am getting the error. "Invalid Connection. The source is not found". I am giving exactly same path for xsd which i gave while creating URL data control without query parameters. Infact i was able to create the URL data control with query parameters successfully till afternoon. after that it started giving me this error all of a sudden. Infact as soon as i was able to create a URL data contol with query parameter successfully, i took a backup of the application before moving further. But even that backup is not working now.
    As far as i understand, i dont think there will be any change in xsd if query params are passed to a web service. Please correct me if i am wrong.
    Just dont know what could be the issue. Please help
    Thanks

    Hi,
    xsd is used for the URL service to know what the returned data structure is so it can create the ADF DC metadata
    Frank

  • Why doesn't my boolean controls work?

    I'm building an user interface and I have a tab control with several options. In the tabs I have Boolean controls that are always in the false state. Why does this happen?
    I'm running LabVIEW 6.1 in Windows XP.

    Hi Marmelo
    The default state of a boolean control is "Faslse". If you want that "True" is the default state you have to change the value to true and than right click on the control, select Data operations and there select "make current value default". After that the default value of the boolean control is "True". Under Mechanical Action you can define different switch actions.
    Luca P.
    Applications Engineer
    National Instruments
    Regards,
    Luca

  • How can you create a local variable from a boolean control?

    I want to create a local variable from a boolean control, but it says that boolean latch actions are incompatible with local variables, but I need a way to check this boolean control in two differents loops, how can I do it?

    "Graci" schrieb im Newsbeitrag
    news:[email protected]..
    > I want to create a local variable from a boolean control, but it says
    > that boolean latch actions are incompatible with local variables, but
    > I need a way to check this boolean control in two differents loops,
    > how can I do it?
    Use global variables.
    Compare them with a constant Boolean like F or T.
    The result is true or false and then you can use it in a Cae-Loop.
    Martin

  • Import a column from an excel spreadshee​t, then enable/dis​able boolean controls in a cluster based on imported values

    Greetings all. I have an application I've been developing and refining for some time.  Part of it entails an interactive periodic table of elements where the user can select multiple elements to include in a multi-element chemical standard.  The part I'm having difficulty with now is disabling multiple elements within the periodic table.  Specifically, what the scientist wants is to be able to reference an excel inventory that they keep of available on-hand single-element standards.  I need to be able to read in column A of that spreadsheet, build a distinct array of those elements listed (some are listed more than once) and then disable the boolean controls in my periodic table for those elements not in the array (or enable those elements which are in the array, whichever makes themost sense).  This way, the analyst cannot select elements in the periodic table for which thay have no on-hand inventory.  I see how to enable or disable all controls in a boolean cluster, and I see how to enable/disable a single control, but I'm looking for an elegant way to import the excel column, build an array of thsoe values and then enable only those values.  Any help is always appreciated.  Thanks again.

    hi
    try this
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.
    Attachments:
    Excel column read.vi ‏29 KB

  • Can I use Swing controls with Forms 9i?

    Is there a way to use Java Swing controls with Forms 9i via a PJC or something? If so, is there a white paper on it? Thanks.

    Yes you can. There is a quick start about PJC here:
    http://otn-stage.us.oracle.com/products/forms/htdocs/upgrade/pjc/content.html
    And there is also a paper about Forms in the Java World that you should read.
    http://otn.oracle.com/products/forms/pdf/forms_in_java_world.pdf
    You might want to have a look at the Oracle9i Forms Demos for some code samples as well.

  • PC - Generating a 'Dashboard' report on the status of the controls already planned for the 1st quarter of 2014, shows the control with status Submitted.

    Hi;
        I have a problem in GRC-PC I can't solve. My User is generating a 'Dashboard' report on the status of planned for the 1st quarter of 2014 (compliance controls), this controls not planned, but presented the control with status Submitted.
    I appreciate any help...
    Thanks all....
    Regards....

    kaeandcolesmon,
    If you open the recovery drive (partition) it should only have a single folder (Recovery).
    To make sure that your not saving restore points to that drive.
    See:
    Start, Control Panel, System, System Protection tab. Make sure the D drive partition is set to OFF so that it does not save there.
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

  • How to implement a boolean control via network

    Hi,
    I am developing an application by using LabVIEW 8.2 and RealTime. There is a host PC connecting to a PXI
    through network cable. Application VIs are running at PXI and GUi is running at host PC. My problem is
    When I config a boolean control as "Latch when release" mechanism, pass it to a shared network variable
    and then to a boolean control at PXI. "Latch when release" mechanism seems not run very well. Most of the
    time, no action when I press the boolean control button in my GUI. It seems that shared network variable
    could not act as "Latch when release" mechanism. I checked some examples from NI. Most of examples set
    the boolean control button mechanism as "Switch when press" and manually switch it status later on. I have
    a bunch of such boolean control buttons in my GUI. It will be hard to handle every of them in this way.
    I'd like to know whether there is an easier solution for this.
    Thanks
    Jason

    Hi Jason,
    How are you passing the shared variable to the Boolean control in PXI VI?
    Here is something to try out.
    --Configure the Boolean controls on both systems to "latch until released".
    --Create the shared variable (network-published) on the host PC and wire the output of the Boolean control to it.
    --On the remote system, bind the Boolean control to the shared variable on the host PC. To bind to the shared variable, right click the Boolean control 
       and select properties. Then select the "Data Binding" tab in the property window. Set the "data Binding selection" option to "Shared Variable Engine
       (NI-PSP)" and browse for the path to the shared variable created on the host PC.
    --With this setting, whenever the Boolean control on the remote system (PXI) reads a true value, it stays true until the value is read by LabVIEW and
        goes back to the initial (false) state.
    Checkout the attached sample LabVIEW project.
    Tun
    Message Edited by Tunde A on 12-12-2006 05:27 PM
    Attachments:
    Boolean Shared Var.zip ‏18 KB

  • Event execution based on the changing direction of boolean control value

    Generally an even case is executed as long as the value of a boolean control changes, no matter the change is from true to false or false to true.
    However, if I want to event case1 to execute if false to true, and case2 to execute if true to false, how to implement this?
    Thanks in advance.

    Dejun wrote:
    NI forum support is much more efficient than tele support!
    And we don't play cheesy elevator music while you wait.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for