Jump to content

ShaunR

Members
  • Posts

    4,942
  • Joined

  • Days Won

    308

Posts posted by ShaunR

  1. Greetings,

    I recently purchased a DigitalPersona U.are.U 4500 fingerprint scanner and would like to integrate it into labview for various purposes. Using the free SDK that DP provides I was able to quickly create some test code (attached here) but thus far I am unable to get it to work. Specifically I am using their ActiveX external code but I am not necessarily tied into that as they also provide .NET and few others in their SDK for interop.

    Can anyone shed some light on what I am doing wrong? I am guessing it has something to do with the event handler.

    Just some background

    Fingerprint scanner

    SDK download

    Any help is greatly appreciated.

    Well. Theres a lengthy form for downloading the sdk and you didn't include the call-back vi (was that supplied by the sdk?) so my input is probably going to be limited......but.

    What are you expecting it to do?

    Your while loop is just going to go round until you press the button, thats all you have really asked it to do. Unless there is communication from the call-back event to your VI (via a queue, event or something similar), you aren't going to be able to get any info back from it when it is actioned. A callback is called asynchronously and is a separate process to your VI

    The first thing I would check is that the call-back is actually being called. You can do that easily just by putting a dialogue prompt in it so that if it is called a dialogue will appear. If that works, then you can uses an event or queue to send whatever information is received (in the callback) back to your main VI.

  2. Hi,

    I have been trying to catch up on interesting topics I have put to one side in the past and have spent a fun day reading about state machines and different architectures, I still have a great deal more to read and learn.

    I keep coming across the term Macros / Marco state in a number of the topics and I am not fully sure I understand this term.

    With regards to the JKI state machine, I think the Marco states are states where no work is actually done but new state transitions are push on the existing queue of states so that can easily find them. I have searched on Lava for this term and though it has lead me to reading a lot more threads about QSM & SM I still have not found out what people mean when using this term.

    Any explanation would be appreciated.

    regards

    Dannyt

    A macro state is just a single sate that represents other multiple states (an alias if you like). Commonly, this would be things like initialisation/finalisation where (for example) the Init state could be an alias for Load Settings, Clear Display and then Set Window Position etc. But the term isn't limited to SMs , Excel has "Macro recording", for example, which will assign a single command to a number of operations that you do and will"replay" them back when executed (either by hitting a hot-key or explicitly running the macro)

    • Like 1
  3. I. regarding threads, when is the thread released? Usually a thread gets resources and thus, when it is inactive those resources are wasted and that might slow down the design.

    Just to clarify this a bit which might make thing a bit clearer for you.

    Labview allocates a fixed number of threads when it starts the environment. As such, you (the programmer) neither create nor destroy threads and labview uses this "pool' to schedule tasks from your program. Again, which tasks are scheduled are up to Labview although you have a small amount of control with the "Execution Subsystem".

    If you are really worried about the mechanics of threading LV then I would suggest reading Multi-threading In LabVIEW. But for most Labview programmers, it's not a consideration any more than indexing past the end of an array is (you can't wink.gif ).

  4. I seem to be having some problems with the search function when searching for two or more words (for example <unit test>) - the first page comes up correctly, but when clicking for the second page, the number of results increases, and the listings are no longer in order, and no longer necessarily contain both words. If the two words are in quotes (e.g. "unit test") then it seems to work ok.

    I've never had any success with the search either. I use Google to find stuff in here rolleyes.gif

  5. Any clue how I can use this in LabVIEW? This call is in the .NET 4 framework. I installed that version of .NET but I don't see it as an option when configuring the Invoke Node in LabVIEW. I don't see any of the .NET 4 calls at all. And yes, I rebooted the computer.

    Try importing this to a diagram.

    Ooops. REalised you're using 8.x

    Here's the vi saved to previous

  6. The intermediary DLL is not so much a seperate DLL as the combination of the original zlib source code with the additional zip support that is now official part of the contribution directory but used to be just an optional component by someone else, and on top of that some utility functions to help support with LabVIEW integration. I could have left that all in separate DLLs but since I had to modify some zlib header files anyhow (to make the functions cdecl instead of stdcall as they used to be in older versions on Windows, and later on to decorate the exported functions with my own prefix to workaround naming clashes in the cRIO systems with empty stubs included in the system image) I decided to derive from the concept of providing fully original DLLs. And since the entire build process already was required anyhow for the additional LabVIEW specific part it wasn't really much extra work. In fact it makes building the shared library easier and also the packaging and distribution since only one shared library is required. The drawback is that merging in new zlib/zip versions is a little bit more complicated but last time when I added the new zlib version to it, the actual merging was done in less than an hour since I still only have to manually check and adapt two of the header files.

    I didn't mean for you to defend the decision (apologies if it came across that way). I as just commenting on the fact that many people use an intermediary DLL which makes it difficult for me to just plop the latest version, pre-compiled library, when there's an update.

    But I think it's great that you are investigating the x64 since it's prevented me from using the library in the past. LV now comes shipped with zip file support, but it doesn't enable in memory compression which I believe yours does supportthumbup1.gif

  7. Well changing only the offsets into 64 bit integers won't work. You also need to change the calls to use the 64 bit versions of the functions. If they simply changed the offsets to just support 64 bits, backwards compatibility would be broken. A 64 bit integer is passed to a function in two 32 Bit addresses on the stack so changing all 32 Bit offsets into 64 Bits only, it would seem strange that you could even run an entire chain of VIs as this mismatch should mess up the stack alignment. Although thinking about it, the functions are all cdecl and that means the caller cleans up the stack afterward so it may work ok anyhow, if there are no other parameters after the offset in the parameter list.

    Like all OpenG libraries it's all on SourceForge.

    I did download and create the zlib from here a while ago (has x32 & x64 object assemblies). Not sure if it will do over 2GB (don't see why it shouldn't). But the issue here is that you use an intermediary DLL lvzip.dll so it's not a simple replace as I assumed originally.l Although I'm not sure why (maybe speed?); I have seen it a lot with labview interfaces to dll's.

  8. Actually 64Bit and support for >2GB ZIP archives are two distinct issue. I have in the current HEAD integrated a new version of zlib which would support 64Bit offsets internally which is what is required to support archives containing more than 2GB components. The same version also SHOULD be compilable as 64Bit code. While these two things happen to be incorporated in a working way in the current ZLIB library, they are not equivalent and even not really related.

    I have come across some snatch in compiling the LVZIP DLL for 64 Bit and haven't really spent much more time on this until now. Well I can compile the code but it crashes and since I don't have a 64 Bit system at hand with a compatible source level debugger and LabVIEW installation (they both also need to be 64Bits) I can't at the moment debug it. The code as it is in the repository would apart from that crash be fully 64 bit capable and should also be able to handle >2GB components although that is nothing I have ever tested nor have thought to test so far.

    So the OpenG library as it is in the repository SHOULD be able to handle >2GB files but that will also need re-factoring of some VIs to allow for 64 bit integers wherever offsets are passed to and from the DLL functions (those 64 bit capable functions have a special 64 postfix.

    Indeed they are different issues .But LV x64 cannot load x32 dll's so even if the 32 bit dll is compiled with u64 pointers; it won't work in LV64 (which I think is why the OP was asking for an x64 dll). Anything that relies on dll's needs to be supplied with both and detect the bitness to work on both platforms (either on install or on the fly).

    But I did play with the 32bit one when the OP asked, and by replacing all the I32 controls and coercions for u64 (in the write) actually got it to write a 4.3 GB file without complaining (quite surprised, although I can't see how the content would be valid.). The LV file functions are u64 so the coercions were causing it to throw the file error. But then it failed on the finalisation. The result was I could write a 4.3GB invalid file laugh.gif. Since finalisation was a direct call, there wasn't much further I could go without delving into the C source and thought I'd leave it to the expert wink.gif.

    Which repository?

    It's great to hear your looking into x64 worshippy.gif

  9. Just to clarify the interim fix for this:

    1. Locate and open SQLite_Query-Transaction.VI (It is in the "Query" Virtual folder under "Core".
    2. Right-click on the case structure (there is only one)
    3. Select "Make This Case True" from the popup menu
    4. Save the VI

    It should now work as intended.

    Correction of this bug will also have a knock-on effect on SQLite Delete Column.vi and SQLite_Rename Column.vi causing them to fail.

    In each of these VIs there is a boolean (True) wired to the SQLite_Query-Transaction.vi. This boolean needs to be deleted.

    The VIS will then work correctly.

  10. Confirmed.

    I'll leave it a week or two so to see if anything else crops up then release a bug fix.

    Just to clarify the interim fix for this:

    1. Locate and open SQLite_Query-Transaction.VI (It is in the "Query" Virtual folder under "Core".
    2. Right-click on the case structure (there is only one)
    3. Select "Make This Case True" from the popup menu
    4. Save the VI

    It should now work as intended.

  11. Just wanted to point out a small bug I found in Query Transaction.vi in 1.3.0. You have the cases switched in the case structure that includes the rowid. It's probably something leftover from when you switched the logic of the boolean.

    Also, since this is my first time commenting on this, thank you. This has been a lifesaver for me.

    Confirmed.

    I'll leave it a week or two so to see if anything else crops up then release a bug fix.

    • Like 1
  12. So you could use something like a "tagging" RCF plugins with options like "tag as unclean / buggy / need doc".

    How about something similar to vugie's "Label Manager", you'd have possibility to apply different tags (editable list) and when you launch the manager, it would search the project you are in to find all the tag.

    Thats pretty much what mine does. Tags are very flexible and you can add more and more as the need arises. Although I found it easier just to define a tag rather than have a fancy interface for managing them.

    • Like 1
  13. Update: Have been using InnoSetup for a while now, and love it! It's got most of the features that I want, and those it doesn't I have been able to work around. InnoIDE, on the other hand, is pretty buggy - I'm using it, but mostly for the syntax highlighting of my innoscripts. Thanks everyone :)

    ISTool is the GUI I use.I haven''t come across any bugs (not saying there aren't any) and it's been around a lot longer than the Inno one (5 years+).

  14. If your thinking about password protecting some or all of your code........I seem to remember reading at one point (it's disappeared since the super-new download section....fantastic by the way thumbup1.gif) that uploads to LAVA must include source and must not be protected with a password. Perhaps an admin can carify that?

  15. No. It's probably because I was beginning to play around with them and thought they were fun. (I still do. :) )

    Bonus link.

    They are fun until you see things like this:

    ^(?((Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)\ 31)|((Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sept|Nov|Dec)(ember)?)\ (0?[1-9]|([12]\d)|30))|(Feb(ruary)?\ (0?[1-9]|1\d|2[0-8]|(29(?=,\ ((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))))\,\ ((1[6-9]|[2-9]\d)\d{2}))

    blink.gif

    Regexlib.com is a great place for 'em. And each one has a test button so you can try it out on your own strings

    • Like 1
  16. No, so here... jcarm-ReqHatch.zip

    Run jcarm-ReqHatch/Code/ReqHatch.vi to see it work.

    Let me know if y'all think that it can be extended into something useful. There's a lot of work left for me to do, and I hope to work on soon it with my next ATE project.

    Sweet.thumbup1.gif

    Can't try it because of all the jki stuff. But I get the jist of it.

    I notice you use a regex to find the labels. Is that because they can be buried in text paragraphs on the BD?

  17. You're right, but an underling is should be able to do "CTRL+F" wink.gif

    To be fair, this solution is quite simple and have some lacks but it is also quite easy to use and to maintain.

    Of course. I was just being pedantic.rolleyes.gif But that does mean that all the VIs have to be in memory and therefore you have to load the whole application which I don't often do until near the end and especially if I'm not working on it at that time.

    But I'm a great fan of check-lists and its nice to give someone a list and for them to come back with all the boxes ticked which can then go in the system to prove they have been covered (especially for progress meetings). I even print them for myself and pin it to the wall so tat I have a list of stuff I can cross-off. It's more tracking than anything else (like JCarmodys requirements thingy) and it's super easy to do.

  18. I thought of this old post of mine when I read your post; you responded with this, (from July 2009) Would it help with what you're doing now?

    Oooh. I've not seen that (or forgotten it). worshippy.gif

    Mine is a bit simpler and targets todos only. But I love the idea for requirements tracking using comments and it's not a great leap (method is the same maybe just need a tag.wink.gif). I've recently updated mine with a database so you can do queries on different todos so that would make requirements tracking and reporting a breeze.

    Did you ever upload it?

  19. I opted for "Todo" comments with some simple keywords (like <ICON>* and <DOC>. I then wrote a VI that would scan the diagrams in a project, directory or memory and extract the ToDo comments giving me a nice categorised check-list of all the outstanding things to do.

  20. I'm working on an OS project (soon coming into the CR) and thinking about the licensing options.

    I would prefer a 'strong', 'viral' OS license for the App itself, such as GPL.

    But there are some reuse candidates, which I'd like to be able to use in other projects as well (non-GPL, propretarian). So preferable those VIs would be licensed under BSD.

    Anyone has suggestions how to correctly deal with this?

    Felix

    It's a mine-field wacko.gif It's difficult enough with so many licenses let alone sub-dividing within your software.

    If you distribute an app with a particular license, people will assume that it covers all aspects of that software. If you have different components within that software that have a different licenses you're (IMHO) setting them up to breach some of your licensing. Sure they "should" read all the conditions but do you if you see a product that says it's released under the BSD in the CR? Or do you already know the BSD and not bother reading the licensing?

    You could release it under "other", then have a detailed document provided with the download that explicitly states what parts/modules have what licenses and summarise what they can ad can't do to make it absolutely clear and hope that they read it and the other licenses. However the user has to download and read everything before deciding whether the licensing is appropriate for their use rather than just looking at the software page.

    Alternatively, you could release them as separate distributions, with their own licensing, and make your app dependent on those "modules". This makes things much clearer to the end user but requires the user to download sub-components to use your app. This isn't a problem with the JKI package manager, but a real bugbear for those that don't use it and might mean they don't download at all.

    The third alternative, of course, is that you only have 1 license to cover all the software and it's components and not complicate matters. It's only really an issue if you want to sell your software or components. After all, how "FREE" is your software if you have to buy the dependencies?

×
×
  • Create New...

Important Information

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