Reload sequence file when changes on disk

Hi,
I wrote a custom user interface based on the TestStand (TS) Operator Interface. When I run a sequence file on it and I edit it in the TS editor and I restart an execution, it seems to keep loading the first one when I launch the execution. The only way I can do this is by restarting the GUI.
I read a lot and tried many things and I can’t figure out what do I need to do to have the sequence file reload from disk on the 2nd execution after changes has been made.
I tried many thing and it seems to work when I release the seq file 2 times (!). But, as expected, the 2nd time it get released, I get an error that the file was unloaded from the TestStand Engine. And the weird thing is that I don’t get the error when I run the 1st time or I don’t make changes to the seq file.
Do you see anything wrong? Or have another suggestion how I could achieve that?
Can I see which seq files are in the internal cache? That could be useful to debug.
Thank you.
A code snippet in C# is in attachement.
Attachments:
C#-code.rtf ‏2 KB

A few more ideas:
1) Are you perhaps using this file path with an ApplicationMgr or SequenceFileViewMgr API? You need to make sure that this file is not open by the ApplicationMgr or assigned to a sequencefileviewmgr as well. The applicationmgr or sequencefileviewmgr likely have a strong reference to the sequence file if you have assigned it or opened it with one of their APIs. You might want to try switching entirely to the applicationmgr APIs instead of using the engine APIs as that's probably less likely to lead to conflicts between the two.You could try ApplicationMgr.OpenSequenceFile() and ApplicationMgr.CloseSequenceFile().
2) Have you tried this with a simple, empty sequence file and simple default Sequential process model to verify that it's not related to anything in the sequence file you are running or any code elsewhere in your application? It's possible for code in the sequence or process model itself to be calling GetSequenceFile or GetSequenceFileEx.
3) Have you tried adding a delay between WaitForEndEx() and ReleaseSequenceFileEx()? This is not that likely to be the cause, but perhaps there is additional code required to execute in the execution thread after WaitForEndEx returns before the sequence file can be unloaded. If you add a small delay (i.e. Thread.Sleep(1000) between those lines of code it might work. This would not explain why the file couldn't be reloaded when you use GetSequenceFileEx with the UpdateFromDisk flag though so probably is not the problem.
I tried to reproduce this problem in the sequence editor by running an
execution with a sequence file, closing the sequence file, overwriting
it with a different sequence file and reopening it and I was unable to
reproduce the problem. I got the new file opened as expected. This is
the equivalent situation since there is a completed execution still
open. The sequence editor does not use the Unload flag on
ReleaseSequenceFileEx, but it does use the UpdateFromDisk flag on
GetSequenceFileEx() and it seems to work, correctly loading the new
version of the file in this case. So there must still be something different in your case. I suspect that it's not the execution that has the extra reference in your case, but something else, perhaps the ApplicationMgr or SequenceFileViewmgr.
Also, as a side issue, if you are writing a custom UI, I'd recommend using UIMessages to determine when an execution completes rather than WaitForEndEx(). Basically handle the ApplicationMgr.UIMessageEvent and look for UIMsg_EndExecution and check that the execution associated with the UIMessage is the one you care about. Using the UIMessage like this has a couple of advantages:
1) It allows your UI to go back to executing in it's main message processing loop (Some things will not work correctly without this).
2) It gives you the potential to track and handle running multiple executions in parallel. Just look for and track the multiple UIMessages that such executions generate.
Please let us know if any of these ideas helps or if you are able to figure out the cause of the problem. If you are still unable to get it working and can't figure out the cause, please attach an example program and sequence files which reproduce the issue.
Hope this helps,
-Doug
Message Edited by dug9000 on 03-02-2010 10:03 AM
Message Edited by dug9000 on 03-02-2010 10:04 AM

Similar Messages

  • Change client sequence file when Ctrl F5

    I have a teststand 2010 and labview 2011 based test system. I have modified the 'Single Pass' sequential model so that when Ctrl+F5 is pressed, 'main sequence' from a self test sequence is run, not the 'main sequence' from the currently loaded test sequence. It all seems to work but when the test report is created it contains the name of the loaded test sequence, not the name of the self test sequence...
    Is there a way in teststand to say that the client sequence is the self test sequence not the test sequence loaded into teststand when Ctrl+F5 was pressed, therefor the report filename will contain the name of the self test sequence not the name of the current loaded test sequence ???
    Any help or pointers would be very helpful...
    Cheers
    Derren Price
    Solved!
    Go to Solution.

    Rather than modifying the model to change which sequence is called, you should modify it to change the client sequence file. Look at the DynamicClientSequenceFile example in the TestStand examples directory.
    Hope this helps,
    -Doug

  • How to reload the screen when changing languages in JavaFX 2?

    I'm beginner with javaFX and i need to change language of the screen. but i have no idea how to reload the screen when the language was changed. The application have a button where have the language available. I want just refresh screen when the user change language.
    Here is the start method to show the stage.
        @Override
        public void start(Stage stage) throws Exception
            this.stage = stage;
            Locale locale = Locale.getDefault();
            ResourceBundle rb = ResourceBundle.getBundle("resources/Label",locale);
            loader = new FXMLLoader(getClass().getResource("FXMLDocument.fxml"),rb);
            root = (Parent)loader.load();
            FXMLDocumentController controller = (FXMLDocumentController) loader.getController();
            controller.setMain(this);
            scene = new Scene(root);
            stage.setScene(scene);
            stage.show();
    here is the function to change the language(in the same class with start function),the rb is the new ResourceBundle:
        public void refresh(ResourceBundle rb)
              //change the language here
    1. I don't want to use the resourceBundle to get value in resource file and set label in scene one by one.like following:
    this.btnLabel.setText(rb.getString(key.test));
    2. I don't want to reload the scene,like following:
        public void refresh(ResourceBundle rb)
             try
                loader = new FXMLLoader(getClass().getResource("FXMLDocument.fxml"),rb);
                root = (Parent)loader.load();
                scene.setRoot(root);
                FXMLDocumentController controller = (FXMLDocumentController) loader.getController();
                controller.setMain(this);
            catch(Exception err)
                err.printStackTrace();
    So do we have a solution to just set the resourceBundle and reload the scene easier?
    Thanks and best regards!

    Your option 2 (reload the FXML for the scene using the new resource bundle as a parameter), is the way this would normally be done and what I would recommend.
    Failing that, you could use option 1 of individually resetting the label text of labeled items (I don't really recommend this).
    Why don't you want to use option 2?
    Perhaps it is because there is some internal state of the UI which differs from the initial state when the the UI is first loaded (e.g. user has typed text in a text field and you want to preserve that).  If that's the case you will need to either go with your option 1 of individually resetting the label text of labeled items, or implement something which preserves the UI state and user data by saving it in memory or to disk, reloading the UI via the FXMLLoader (essentially your option 2), then restoring the UI state and user data to what it was before the language change.  Preserving and restoring the modified state seems complicated to me if you have a lot of state, so I wouldn't really advise this approach unless you really needed it.

  • AirPort Disk Access Existing files when changing Secure Shared Disks with Accounts

    Hey, community;
    I have a 1TB Disk which I was using on my Mac, then upon aquisition of an AirPort Extreme Base Station, plugged it into there. File sharing was fine when set to "AirPort Password" for Security settings, but when I changed to "Accounts" and set up accounts, the existing paritions were there... they just couldn't be accessed.
    Tried finding the solution online, to no avail.
    Just writing to say I've solved this! Once you set the Security type to "Accounts," folders now appear on your USB Drive, one for each user you set up, as well as a "Shared" folder.
    I just dumped the existing contents of the drive into the "Shared" folder, and now everyone can access those original files.
    I hope this helps someone out.

    Restore the old files by removing the accounts.. ie press and hold reset.. once you go back to a reset all files are available again anyway so the security is illusionary.
    If you want to secure files encrypt them.
    BTW the old airport utility would have warned you that what you were doing will stop access to your files.
    Of course the latest toyland utility probably showed you nothing.
    Never start accounts with files on the TC.. you should offload them.. create accounts then load them back.. to the illusion of security at least.

  • New download of keynote files when changing wifi network with iPad

    When i change the Wifi Network with my ipad3 (without 3G) it always starts to download the keynote, numbers and pages files from the iCloud. You can't open any file until its downloaded again, you just see the Folder and the file as a placeholder.
    In my opinion this Akers totally no sense. I expect a synchronization between iPad and the iCloud like it woks with mail, kalender.  Even dropbox just downloads the file you select for use. In my case I have 64 files only in keynote, created on the iPad and eaven without changing something it will re download all files from the iCloud before I can use them.
    Anybodydid the same experience ?
    Is this a bug or a really shh.... Feature?

    No that's not my experience, it's clearly not working as it should. Perhaps you should restore your iPad.

  • Sequence moves when changing clip speed

    Whenever I edit an individual clip's speed, the sequence in front of it gets moved backwards or forwards. It even moves the sequence markers! How do I get rid of this, so only the clip grows and shrinks, without affecting the space around it?
    Thanks.

    Michael Patten1 wrote:
    this is a mediocre work around. I have cross dissolves and and filters attached to my clips. Either method, I have to do band-aid work to keep my sequence unaffected.
    You have been provided, promptly and free of charge, the only viable solution by a patient and knowledgable Final Cut user. I believe the proper English expression would be "Thanks, but..."
    Curiously, this change in FCP's speed adjustment—known as rippling—was changed sometime between FCP2 and FCP5, can't recall when exactly. It was apparently made at the behest of Those Who Decide Such Things. People like me howled in protest. IN FCP7, you have a choice in the speed dialog to ripple or not.
    bogiesan

  • Losing Preview files when changing start point

    The way I always like to work is to select raw clips from my footage, then applying all the effects I want to do on them, render and then fine tune the in and out points of the clips, to fit the music I set it to. In previous projects this worked and I could just slide the end and start points of the clips on my timeline without having to render again. But with my current project I can change the out point of my clip, but as soon as I slide the beginning of my clip I lose the preview file. This is a really ineffective way of working. I hope somebody knows a setting that will prevent this. My sequences are PAL 16:9 25 progressive and I use 50P (deinterlaced) PAL footage and some 25P After Effects compositions.
    Thanks for the help!

    The way I always like to work is to select raw clips from my footage, then applying all the effects I want to do on them, render and then fine tune the in and out points of the clips, to fit the music I set it to. In previous projects this worked and I could just slide the end and start points of the clips on my timeline without having to render again. But with my current project I can change the out point of my clip, but as soon as I slide the beginning of my clip I lose the preview file. This is a really ineffective way of working. I hope somebody knows a setting that will prevent this. My sequences are PAL 16:9 25 progressive and I use 50P (deinterlaced) PAL footage and some 25P After Effects compositions.
    Thanks for the help!

  • PS CS6 crashes when changing scratch disks!

    I have a MBP with 2 internal drives and I'm running PS CS6. As it set right now PS is using my sytem drive as the 1st sratch disk and I want to set it to use my other content drive, since it has more space as well as not being the system drive, as the 1st sratch disk. Problem is when I do that and restart PS I get a srcatch drive cannot be found error and PS won't open. I have to delete the preferences for it to open up again.
    Has anyone had this issue? Thanks.

    Thanks. Tried the first option and saved as IDML, and then opened the new file. Still it crashed when I am trying to alter the Document Setup.
    Then created new doc and moved the pages as described above. I lost the formatting on the basic paragraph style, but others came trhough well. Tried to alter the orientation - you guessed it - InDesign crashes.
    Next I created a whole new document and simply copied and pasted the content across and now the document works! This is not obviously an idea solution if I had a document with dozens of pages, but in this case it worked.

  • TestStand - Reload Sequence Files On Start

    I have a question. I am mantaining a OI and some of the users would like to set ApplicationMgr.ReloadSequenceFilesOnStart to ReloadFile_All but some of them strongly prefer the ReloadFile_None option, as this is harcoded on the OI I would not like to deal with two versions of the OI. Is there a way to access this by means of an .ini file or something like that. I have been trying to access this property using an Activex step that calls the TestStand API but I haven't been succesful so far.
    Thank you for your help,
    Iñaki

    Hi Inaki,
    As part of your OI code:
    1)  Prompt the user to ask which option he/she would like
    2)  Save the option in your own .ini file.
    Upon starting, your OI code can programmatically read this .ini file to determine which option to call.  One can also make a button that can change this setting whenever the user would like.
    Also, please note the response that AndyMc provided in the other discussion.
    If you would like further assistance, please let me know how you are accessing the TestStand API (i.e. CVI, LabVIEW).
    Cheers,
    David Goldberg
    Cheers,
    David Goldberg
    National Instruments
    Applications Engineer

  • What directory/area is needed to delete files when your startup disk is warning it's getting full?

    Have the message that the startup disk is near full and I need to delete files.  What area or directory will directly clear this issue.  I have cleared out trash and deleted files....is there a specific directory that causes this issue.  thanks much

    Freeing Up Space on The Hard Drive
      1. See Lion/Mountain Lion/Mavericks' Storage Display.
      2. You can remove data from your Home folder except for the /Home/Library/ folder.
      3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
      4. Also see Freeing space on your Mac OS X startup disk.
      5. See Where did my Disk Space go?.
      6. See The Storage Display.
    You must Empty the Trash in order to recover the space they occupied on the hard drive.
    You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
    Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.

  • "Building boot caches" error when changing startup disk

    Please,
    Does anyone knw why, or how to fix this error?  I have triedinstalling the 10.8.4 combo but keep getting "installation failed" error.
    This is on my wifes brand new iMac. Here's the profile:
    Hardware Overview:
      Model Name:          iMac
      Model Identifier:          iMac13,2
      Processor Name:          Intel Core i5
      Processor Speed:          3.2 GHz
      Number of Processors:          1
      Total Number of Cores:          4
      L2 Cache (per Core):          256 KB
      L3 Cache:          6 MB
      Memory:          16 GB
      Boot ROM Version:          IM131.010A.B05
      SMC Version (system):          2.11f16
    OS 10.8.4
    Would greatly appreciate any assistance!!
    Thank you,
    Gary

    Hello Mende1,
    I ran both verify and repair on the 3TB internal and 4TB external HDs . . . both passed with flying colors.
    I have used Techtoo Pro & DiskWarrior with no luck.  I've been searching the web and there doesn't seem to be an answer.  Bombich (Carbon Copy CLoner) said he felt it was a bug in startup disk selector in system preferences.
    Thanks for coming to my aid.

  • Type List Order Numbers (typelisto​rdernum) change when opening a sequence file in Test Stand

    Could you please shed light on the reasons a sequence file changes upon opening in the Test Stand development environment?  
    Comparing the file before and after, I see that the typelistordernum changed on a few custom types that we defined for the program. . 
    To clarify the environment, I am using two work stations running the same version of Test Stand. The workstations are kept in sync using Sugar Sync. One would expect that a file saved on one workstation could be loaded on the other work station with no change.
    This also happens on files that we pull from version control (GIT). Once opened, they change, which presents a serious problem in avoiding version conflicts and keeping track of real changes. 
    Test Stand Version: 4.5.1

    ATE Coder wrote:
    In fact it turns out that conflict resolution is fairly hard to resolve.
    For instance, changing a type (add a comment) changes its time stamp. As a result, all sequence files referring to this type are now in conflict.
    On testing, Test Stand does not seem to flag these. So, they could be pushed into the repositories as is.
    Opening the sequence files on another machine (after pulling to code from repositories), Test Stand detects a conflict that in fact is no conflict at all. Now all these files need to be checked in and pushed up and then pulled down.  This increases the chances of code conflicts many folds and seems to be totally superfluous.
    Turning off automatic conflict resolution does not seem to resolve this issue.
    It would seem that for some reason (inertia?), NI pulled into Test Stand the same tight versioning it uses in LabVIEW. While in LabVIEW, where, in fact, one is editing compiled code, thins might add some value, Test Stand sequences are actually XML file -- source code, which call for a much more relaxed code versioning or none at all as making sure the code works as part of the debugging process and cannot be handled properly by 'versioning'. 
    I think you might not be using automatic conflict resolution the way it is intended.
    Are you using type palette files? If not, I highly recommend you do so. If you put the highest version of your types in a type palette file, use the default automatic conflict resolution settings, and distribute or deploy the type palette file to everywhere where the type is being used, you do not have to resave all of your sequence files everytime the type changes. Sequence files with older versions of the type will be automatically updated when they are loaded on machines that have the latest version in a type palette. This is what automatic conflict resolution does, it automatically/silently updates the types in the sequence files when they are loaded. No need to resave everything before hand. If you have trouble getting this working, let me know exactly what you are doing and what problems you are having and I will hopefully be able to suggest an alternative way of managing types that will not have those problems.
    Hope this helps,
    -Doug

  • Questions about "Diff Sequence File With..." function

    Hello,
    I've started working on a project where I'm maintaining a piece of older code written by a since-departed employee of my company.  It's a TestStand 3.0 sequence file calling on Labview 7.0 code. The thing is, there were two of these installations done at different times and, somewhere in the woods between stations 1 & 2, the code base diverged.  Part of it was due to not being able to get exact duplicate hardware for the PXI chassis and part was, apparently, due to the fact the client used the 2 machines to test different UUT models.
    So, I'm looking at copies of the installed code base on the two machines using the diff feature in TestStand.  (If it makes a difference, I'm doing this viewing in TestStand 3.5 since TS3.0 has mysteriously gone corrupt on me at the moment on my main development computer and, if memory serves, you have to uninstall all the later version of TS to reinstall an older version.  An altogether fun process, no doubt, but a little time consuming.)
    Anyway, the first thing I notice is that very many of the sequence steps have different Step Properties.Step ID values that look something like this: "ID#:2vMTp0db002mQDXArddRSA".  Messing with the diff screen showed an option to "Ignore Unique Step Ids" which got rid of these.  Regarding these unique step ID's: When are they generated and do they remain constant on a particular machine?  Beyond mere curiosity, I wonder because another diff is in some of the "On Pass Target" or "On Custom Condition True Target" under certain Step Properties and the value under there looks suspiciously like those unique ID's (i.e. ""ID#randomstuff"").  Are these all dynamically updated at runtime or will I break something by changing those (say if I copy a sequence from one version overwriting it in the other)?
    So, I filtered the unique ID's out.  The next large area of difference is that many, but by no means all, Labview VI calls have a difference under Step Properties > Flexible Labview Adapter Properties > ViCall > Connector Pane Checksum > Value.  Also, in a few other instances, ViCall > error out > Connector Number is different as well.  Does this indicate a different underlying VI?
    There are a few other differences, but I can interpret those.  My goal is to get one sequence file for both machines so the code will be easier to maintain.  I do think that some of the VI's with different Connector Pane Checksums may be different between the two installations since one of the different hardware components required a different driver library.  This leads to a third question, what does it take to use identical sequence files when the underlying VI's might differ?  Is it just the interface needs to be the same?  Like the connector pane has the same geometry and data types for the exposed inputs and outputs?
    Thanks for any help,
    Mike
    Solved!
    Go to Solution.

    I just got off the phone with NI support, so no worries on the answers.
    Short versions:
    The unique ID's are regenerated when a sequence is copied.
    Teststand doesn't need higher versions uninstalled to reinstall an earlier copy.
     Connector Pane Checksum implies a different underlying VI, but having the same connector geometry/inputs/outputs/types should allow you to have a different VI for different installations without different sequence files.
    Still waiting to hear back from support on whether the goto pointers get updated properly when a sequence or portion of a sequence is copied.

  • Type conflict where type not found in sequence file

     Hi,
    from a central master sequence, I am starting several sequences from other sequence files in new executions. These sequences have individual types as input and output parameters, the types being defined within these sequence files.
    The master sequence only knows the names (as strings) of these types and when I do a "Find/Replace in files" in the master sequence file looking for those types, they are not found.
    However when I change one of the types in its respective sequence file while I have the master sequence file open, the master sequence file is shown with an asterisk and later I get a type conflict if the settings is to "Never allow automatic type conflict resolution". This is fairly awkward since the master sequence file is supposed to be password protected and no-one should have to touch it in a project.
    What can cause this behavior?
    Apparently, usage of these types spread around through all sequence files although they do not have any need for using the types from other files.
    Is it possible that it makes a difference whether the type was first defined in a type palette file or directly in a sequence file?
    Best regards,
    Peter

    Peter,
    using the data type as parameter in another sequence file will include the type definition in the calling sequence file, therefore changing it. I am not sure why the Find/Replace tool does not display it, but it shows up in the types palette of the file.
    When the data type is changed, it will result in a type conflict....
    So when trying to reproduce the issue with TS 2010, i receive an dialog for resolving type conflict when setting to never do an automatic resolve...
    Nevertheless, the calling sequence must be updated for sure if a used type is changed.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Automatically backup sequence file on open

    Is it possible to write a callback that saves a copy of a sequence file to a given location
    upon opening? Optionally, a second callback could check upon closing whether any changes
    were made to the original and, if not, delete the copy.
    I would like the callback to be general to the station, not just a single sequence file.
    What about the Sequence Editor Option, Backup Sequence Files when Resaving it in Older
    or Newer Format? I haven't figured it out. Please advice.
    Regards,
    Stefan
    Message Edited by Vedeja on 01-25-2006 11:45 PM

    For an individual sequence file, you can use the SequenceFileLoad and SequenceFileUnload callbacks to execute some code.  This code can make a copy of the file and return it to the original state if needed.
    Allen P.
    NI
    Message Edited by AllenP on 02-01-2006 05:28 PM

Maybe you are looking for

  • Issue with Payroll posting in FI

    Hello Friends,                      our company run a simulation run on payroll for the month of Jan 2008. things are perfect.. but after actual the posting of payroll, the posting is not correct. for example.. simulation run shows the total payroll

  • Can anyone explain BC Commissions????

    Hi All, I have been using BC for a few years but recently after looking at the Commissions section and talking to support I can not get my head round how they are working and no one seems to be able to give me a straight answer. So when I go to my pa

  • Revisiting the Right-click issue

    I know about the issue with right-click in Captivate, so I put all my files for the client to review on my own website, so right-clicking works fine, and I have verified this on multiple computers. However, my client is telling me that on her compute

  • FaceTime just Stopped

    FaceTime as working great.  Just stopped on my MAC and new IPAD.  Nothing changed.  Says connecting than cuts off before it picks up.  Any suggestions that doesn't include normal troubleshooting.  Network fine.  Tried it several places where worked b

  • Ios7.2 push notification balloon

    When opening an app this baloon appears asking to ok itunes for notifications/alerts etc. when I press the om the alert returns and a game of tag starts it won't go away. I start hitting the home button in between hitting this ok and thats my problem