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 .

Similar Messages

  • 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

  • Aligning Boolean Control to Plot Legend

    Any ideas on how best to align an array of tick boxes against a plot legend?
    I have a 1D array of Boolean controls and I want to use them to enable/disable the plots on a XY graph but I'm having problems getting the controls to line up with the legend text.
    I've tried using element gaps in the array but there seems to be little control of the gap that is used. I've also tried creating a custom control and modifying the control height but I still can't get an exact alignment of the control to the legend text. I've also tried using different fonts for the legend text but it doesn't help.
    I don't really want to use individual controls and would prefer to continue using an array if possible but I can't help thinking I'm missing something obvious!?
    I've attached and example of the problem and would welcome any suggestions....

    Sorry, apparently the resize operation does not survive a save operation. Weird! It looks just fine until closed and reopened.
    Here's an approach that actually works: Just use a plain boolean button and import the appropriate checkbox graphics into the true and false cases, again using the control editor.
    See if this suits your needs!
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    LegendExampleMOD2.vi ‏29 KB

  • Why do my Boolean control get a different display when I the controls grayed out?

    I have some Boolean control in a cluster which I grayed out programmatically. If I do that this control's get grey as expected. But if I do that with Boolean which are grouped in a decoration field then the control become a blue style. How can I change the grayed out color?
    Solved!
    Go to Solution.

    Hi Gerd,
    attached a VI with this behavior. The Boolean are on page Battery Test and they are called Save Test and Load Test.
    Attachments:
    grayed out example.vi ‏34 KB

  • Photoshop will not save edits

    Photoshop CC 2014 will not save edits and has to be closed via Control alt delete and the edits are lost- hopin someone can help.
    thanks,John

    It still would not work and I was tearing out what little hair I had left. I phoned Adobe this afternoon and a very helpful chap took over my computer and did various things to Photoshop including using the CC tool again, uninstalling and reinstalling and removing some Photoshop files in Program files on the computer. I am very pleased to report that it now works perfectly.
    The only caveat is that all my plug-ins have disappeared. But having said that, I wonder if they caused the problems and Photoshop works much more quickly without them. I may not take the risk of reinstalling them as Photoshop does pretty well all you need anyway.
    Thank you very much indeed for your help and all the best,
    John

  • 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.

  • How to implement 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

  • 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

  • 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

  • I shoot .nef with a D800e and am learning to edit these in Photoshop Camera Raw.  How to save edits?

    I shoot .nef with a D800e and am learning to edit these in Photoshop Camera Raw.  What is the best way to save for viewing and printing and sending to friends on a DVD? (TV viewing)  If I save edits as a tiff or jpeg does Photoshop remember the edits if I open the .nef picture again?  Do i really need three versions of each picture?  jpg, nef and photoshop raw, or what??    I have several thousand .nef and to convert to a photoshop raw format would take much disk space and yes I have three external drives of 1 - 3 TB. 
    What is my best practice?

    For that Nikon model you need ACR 8.3 that means CS6 or CC.  Or you can download the DNG converter convert your Nikon RAW files to Adobe RAW files. And then process the Adobe RAW files with CS5 ACR version  6.7
    Camera Raw plug-in | Supported cameras

  • I transferred a pages file from ipad to mac (also pages) via email for editing. However received message that cannot save edited document to the mac because "trial period has expired for iwork"! I have purchased pages for both machines separately. Ideas?

    I transferred a pages file from ipad to mac (also pages) via email for editing. It opened normally. However, after editing, received message that cannot save edited document to the mac because "trial period has expired for iwork"! I have purchased pages for both machines separately and presumed they would work without a hitch. Am I missing something?

    It used to be that to update the trial to the licensed version with the box, you just inserted the DVD & ran the installer to convert the trial to licensed. This changed with Snow Leopard. You now need to delete the trial & then reinstall from the boxed DVD or the Mac App Store. The files to delete are the iWork ’09 folder from the main HD > Applications; the iWork ’09 folder in HD > Library > Application Support & the individual iWork application plist files found in HD > Users > (your account) > Library > Preferences for each user.
    Yvan Koenig has written an AppleScript that removes the files. You can find it on his iDisk in For_iWork > iWork '09 > uninstall iWork '09.zip.

  • How to enable and edit parental control in mac OS X programmatically

    I want to create an application for editing Parental Control settings. Application will be running in background and it will get the command from server. On receiving the commands it will change the setting of parental control. Can any one tell me how to achieve this. I want the information like, whether this is allowed by apple or not, if allowed which framework/API's to use. I want to do basically web content and app filtering.

    Up!
    I am very interesting in this case too!

  • 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 no longer save edited photos. get messages - "Nothing was imported" "The file or folders selected to import did not contain supported file type.

    Can someone help. I use Photoshop Elements 13. I can no longer save edited photos. get messages - "Nothing was imported" "The file or folders selected to import did not contain supported file type. It started this a couple of weeks ago and I had a friend come fix it just 2 days ago. It took him several hours and I lost all tags I had on over 10,000 pictures. Now it has done it again. I'm so upset. I lost a lot of stuff. I don't want to keep bothering him with this. Please Help.

    How did you import the files to your computer?
    What model  number camera?

Maybe you are looking for