Jump to content

Jim Kring

JKI Team
  • Content Count

    1,359
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by Jim Kring


  1. Hi @Naoki. Yes, you can just put the call to "Idle" inside of your sequence of calls, and then the JKI SM will handle the subsequent states after checking for user interface events. There are some considerations, but it's totally possible and works well. Remember to set a Timeout greater than zero (but NOT zero, due to CPU usage concerns!) so that if there are no events, the Timeout frame will execute and your sequence will resume.


  2. 1 minute ago, Bhargavi said:

    I have moved to the approach of creating the DOM reference in setUp.vi of Test Suite. I will let you know if I face any problem.

    OK, I think that's the best approach. I think that we may still need to fix some of the flattening/unflattening issues inside of TestSuite.lvclass:WaitOnTestComplete.vi (and the TestSuite runner), in order for the reference to be valid.


  3. Hi @Bhargavi,

    Thank you for posting this example project. The breakpoints do a great job of showing the problem you're seeing.

    I did find that some of the deprecated control value methods are being used and the typecasting issue is present (and those should probably be replaced with the variant counterparts). However, that's not the only/main problem at hand.

    Another big issue I see is that the TestSuite's New.vi method is being called when VI Tester first loads the Test Suites, and then the New.vi goes idle, which means that any references created inside of New.vi will get disposed of automatically by LabVIEW (when the VI goes idle).  VI Tester works around this with the TestCase and TestSuite setUp.vi using the TestCase.lvclass:WaitOnTestComplete and TestCase.lvclass:WaitOnTestComplete VIs, which keep setUp.vi running until the test case/suite completes.

    However, that's not exactly what you're after -- you're trying to initialize the data of the TestCase inside the TestSuite New.vi.

    I'll need to think about this some more, to see if there's a good solution.

     


  4. 45 minutes ago, jamesmc86 said:

    Same issue still in 2018 f2. 

    Appears to be related to a vim in a class. Removing the vim from the class solves the problem. I got that work around from Tom and another at https://forums.ni.com/t5/LabVIEW/VI-Package-Manager-Fails-to-Build-with-Malleable-VIs-VIMs/td-p/3871468

    Hi @jamesmc86. Thanks for letting us know. I'd like to get this fixed, if possible. Would you be willing to put a very small/simple example .vipb project together and share it, so that we can easily reproduce and investigate? Thanks.


  5. On 1/11/2019 at 12:54 PM, Croohcifer said:

    @Jim Kring  I realize that this comment is almost 8 years later, but I can confirm that the UI does not appear to find any tests in classes contained in auto-populating folders.

    @Croohcifer Thanks for reporting this. I've filed a bug in the issue tracker, here: https://github.com/JKISoftware/JKI-VI-Tester/issues/33


  6. On 1/11/2019 at 12:52 PM, Croohcifer said:

    @Robert Smith I know this is four years later and probably not very helpful, but I just used VI Tester for the first time and found that my tests would not appear in the UI if the test classes were in auto-populating folders.  This may have been your problem.  Hopefully this helps someone else who might come across this thread.

    Thanks for reporting this. I've filed a bug in the issue tracker, here: https://github.com/JKISoftware/JKI-VI-Tester/issues/33


  7. 3 hours ago, Ruslan said:

    Hello! 
    Where can I download the latest versions of the state machine and the state machine editor as a vip file (there is no Internet access on that computer)?
    Or maybe you can get out of any directory when installing via vipm?
    https://github.com/JKISoftware/JKI-State-Machine/releases? here?

    Somehow the VIP file didn't get uploaded/attached to that github release. I fixed it -- you'll find the VIP file located here:

    https://github.com/JKISoftware/JKI-State-Machine/releases/tag/2018.0.5.41


  8. We figured it out -- it was getting an error during Macro Exit (shutdown), that was causing it to go into the error handler, which was going into Macro Exit (an infinite loop). You can work around this issue by tweaking the code inside the JKI SM Explorer window to look like the following. (You can open the JKI SM Explorer then press Ctrl+Space to stop the VI, then Ctrl+M to go into Edit mode).

    image.png

    Update: This has been fixed in version 2018.0.1.36 of the JKI State Machine package, which has been published and is available for download and installation using VIPM.

    • Like 1

  9. We figured it out -- it was getting an error during Macro Exit (shutdown), that was causing it to go into the error handler, which was going into Macro Exit (an infinite loop). You can work around this issue by tweaking the code inside the JKI SM Explorer window to look like the following. (You can open the JKI SM Explorer then press Ctrl+Space to stop the VI, then Ctrl+M to go into Edit mode).

    image.png


  10. Hello @wyzromek.

    Do you notice that the CPU usage goes down after a minute?

    Do you have Mass Compile (in VIPM options dialog) enabled or disabled?

    I did a little testing and see that if I do not have JKI State Machine Editor mass compiled during installation, then I have this increased CPU issue (but that it goes away after a minute).  However, if I I let VIPM Mass Compile the JKI State Machine Editor on installation, then I do not see the CPU increase after closing the VI that was using it.

    I'm curious if you see a similar behavior to what I'm observing. 


  11. Hi @kevin.j.r.ross, @Sam Taggart,

    We can reproduce the issue and it's a bit tricky, due to limitations in the scripting APIs associated with project libraries and the fact that these project items are not LabVIEW file types. There's no scripting API function to move a project item on disk that is a non-labview file type (and the build process used by VIPM loads the lvlibs and VIs into memory and moves them on disk, causing the links to those lvlib/project items to change). The work-around to this would be to do a lot of fancy, custom relinking on disk, which involves parsing and modifying the raw XML files for the lvlibs. This could work for unlocked lvlibs, but won't work for a password-protected lvlib. Now, it's possible to do these changes in memory, but I think it would involve removing items from the lvlib and then re-adding them to the lvlib after they are moved on disk.

    I looked to see if anyone has solved this problem and there's a discussion on LAVA about it -- I checked out these resources (GOOP Developer and Darren's Hidden Gems) and these don't deal with non-labview file types, from what I can tell.

    Now, you could work-around this LabVIEW limitation with a post-build custom action (requires VIPM Pro) that temporarily unpacks (unzips) the package, modifies the lvlib's (and lvproj's) xml files to link to the correct paths, and then re-packs (zips) the package.

    image.png

    I've created a sample project that shows this technique and it works for the Simple Example that Sam posted earlier.

    Here is that work-around in action:

    >>> Simple Example - Post Build Fix.zip <<<

    Some notes about this example work-around:

    • Requires VIPM Pro
    • Uses OpenG Zip Tools to unpack/repack (I've included a VIPC file you can apply to quickly install this)
    • Has a very brittle XML parser/fixer (you can see the code, below) -- you'll want to put some of your own love into this (e.g. depending on the actual relative paths to the items inside the lvlib) 🙂

    image.png

     

    Hope that offers some possibilities for you...

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.