Jump to content

durnek60

Members
  • Posts

    50
  • Joined

  • Last visited

Posts posted by durnek60

  1. Hi!

    I'm wondering about the factory pattern. It is a very useful tool if the target has memory limitation, and I think it is modern-style plugin architecture. :) So I'm planning to redesign my plugin-based code to Factory pattern... BUT what about the code protection?

    Using source distribution with clear block diagram option is a very good way to protect the code, but what about the classes and their methods? Is there any way to remove remove class method block diagram?

    I think yesterday I was too tired to make this last trial. The way to create plugin.llbs for factory pattern, where every vi is protected by removing its block diagram is similar like anything else..

  2. Hi!

    I'm wondering about the factory pattern. It is a very useful tool if the target has memory limitation, and I think it is modern-style plugin architecture. :) So I'm planning to redesign my plugin-based code to Factory pattern... BUT what about the code protection?

    Using source distribution with clear block diagram option is a very good way to protect the code, but what about the classes and their methods? Is there any way to remove remove class method block diagram?

  3. Check out [LabVIEW]\help\_exfinder.llb\get NI shared folder path.vi. It's password-protected (makes a callback into LabVIEW.exe), but it does the job.

    Will this vi work if I don't have LV development? I mean, I wanna create an installer, LV09 RTE will be included. When I install this app, will this VI returns the Shared folder?

    Do you have any experience or shall I make a test on it?

    Thanks in advance!

  4. Hi!

    I would like to write a code, what is able to find the ProgramFiles\National Instruments\Shared - Folder. This folder is selectable during installation.

    This code will be placed into my exe, and Installer.

    So, When the user install my applicaton, and select a path where my application and National Instruments Runtime will be installed, my app will search for the National Instruments\Shared path.

    Is there any tricky way for that, or I have to seach whole computer, so I will have a lot of premission error.... :(

  5. I had issues using notifyicon on XP - I couldn't get it to work.

    Thanks!!!

    I'm very sad, because I have a demo tomorrow :) .

    I thought that, Notifyicon can be a great tool to inform the user about device removal/connection....

    I'll post it on NI Forum, I hope someone will find a solution!

    Thanks again!

    I had issues using notifyicon on XP - I couldn't get it to work.

    Did you check this link?

    http://zone.ni.com/devzone/cda/epd/p/id/3915

  6. Hi!

    I've just created an installer and exe on Win7. I've tested the exe and installer on win7. The application works fine, but when I start the application on XP, nothing happens. The icon of my app. appears on taskbar, so it starts to load, but nothing happens, and close without any error message.

    The app. was created on Win7 32 bit 2009 SP1 LV.

    I used some Windows.Forms, tools.

    - notifyicon

    - contextmenu

    - menuitem

    My first idea was the win components, but I read on MS forum, it is ok. (some problem occures when the notfyicon size is larger than 32x32.) I made the modification with the icon, but nothing happens.

    Please help!

  7. I can't claim it's common, but here's what I do:

    For development, my applications are designed as components, each component consisting of one or more libraries (.lvlib), and each library containing one or more classes. Each class has a unique file system directory that matches the name of the class. I put the .lvclass file and all methods in this directory. Since each class member must have a different name and I work through the project explorer window instead of the file system, I don't bother creating subdirectory to group class methods. It creates too much maintenance during development. I group them using virtual folders in the project explorer.

    I do the same thing with libraries. Each library gets its own directory of the same name. All classes that are members of the library go in the library directory.

    My directory trees often look like this:

    ProjA\ProjA.lvproj

    ProjA\src\MyLib\MyLib.lvlib

    ProjA\src\MyLib\ClassA\ClassA.lvclass

    ProjA\src\MyLib\ClassA\Method1.vi

    ProjA\src\MyLib\ClassA\Method2.vi

    ProjA\src\MyLib\ClassB\ClassB.lvclass

    ProjA\src\MyLib\ClassB\Method1.vi

    ProjA\src\MyOtherLib\ClassA\ClassA.lvclass

    etc.

    For distribution I just copy the library's directory, assuming it doesn't have any external dependencies.

    Thank you very much! I'll try this! :)

  8. Hi Experts!

    I'm wondering about, how to create my application file/folder structure.

    I've a top level VI, that contains and manage most of my classes but some methods (not all). First of all, I would like to know. if I create an application, and set my startup vi, that contains only an LVclass object its block diagram (only the object, no method exists on the top level vi). When I create my my app, all the methds will be loded into memory, by default or just the class? The reason why I would like to know, is the following. I have some plugin VIs that operate on the parameter Classes, which was created on the top level vi, and sent as a parameter to the plugin vi by (VI Server - Set Control property)

    Do I have to set my class and all methods to Source Distribution - Always included filed in orded to use and manage and handle the parameter object?

    My Second question is in connection with classes and source distribution. My opinion is, It is good, when I only have one source distribution as an llb. next to my application.exe.

    Creating this distribution The always included filed is full of my top level plugin vis and all the rest are included when referred. I have several override methods, of my classes, so I can not merge all of the reffered vis (methods) to one distribution.

    Could you tell me, how can you handle this situation? or could you suggest me a way to go?

    Thanks in advance!

  9. On an unrelated note, what is your end application? It appears to me that you are having trouble getting the ueye drivers to work in LabVIEW. I have done this for use with an Edmund Optics camera and there were a few subtleties I discovered. If this information would be relevant to you, just let me know and I'll explain here in the forum.

    Dear jkuehn

    My end application is to create an LV SW that handles uEye cameas. Thats all.! :) I've all the uEye drivers, and works very well, and ActiveX too. But my basic problem is, how to know how many and what kind of cameras are connected to my PC. Non of uEye - Labview vis, and ActiveX methods return this value for me, so I have 2 solution left.:

    When a EventonNewDevice - ActiveX event is generated, I have to init and exit all camera ID,s form 0 - 254 in order to get the valid camera. I think it is very bad and slow solution.... and if I already have an opened camera that causes any further problems. So my second method is how to get the cameras is reading keys from registry. I made a VI that reads the regisry H_Key_Local_machine\.....\uEye\Enum and Parameters to get how many cameras are available.

    Any more functions work well in LV, but this and I think one of the most important function is_GetCameraList does not! Thats why I need some help!

    If u have any suggestion, please!

    As you already discovered, you will not get the results you expect by embedding a LabVIEW array in a cluster and passing that to the DLL, because LabVIEW does not handle arrays the way that a DLL does.

    You will need to use the LabVIEW memory manager functions to allocate space for the array of UEYE_CAMERA_INFO, bundle the pointer into a cluster, pass that cluster to the DLL, copy the data from the pointer location into a LabVIEW array, and dispose of the pointer. Modify the attached code so that it calls your DLL correctly (I do not have your DLL so I could not fill in the name and path to it), then try it. I don't know if it will work, but if not it should be very close.

    post-3989-0-39811200-1310351125_thumb.pn

    Dear Ned!

    I've tried your VI! Replaced the missing parameter path from dll, but nothing happens. Anyway, As I set the Number of cameas not zero nothing happens. But, the Param result cluster (that u unwired) contains number of cameras output is valid. Because I set number of cameras input parameter 0, the result is 1, and I have 1 camera connected.

    Sadly, on the second or the third trial, my LV crashes all the time! :( but generates error log.

    lvlog2011-07-11-10-01-55.txt

  10. OK, according to the dll manual (as I read it) you have to change your cluster to an array of cluster which has the same

    number of elements, as the number of cameras at your system (1 element in your case).

    you can receive the number of cameras using the function "is_GetNumberOfCameras ()" of the dll

    (but for now the constant is much easier).

    If that does not solve the problem, try the following:

    Change the "number of cameras" value from U32 to I32 --> depends on how LONG values are represented in the dll.

    You might also try changing the data handle from "handle by value" to "pointer of handle"

    In the dll configuration dialog there is a tab named "Error checking", just set it's property to maximum to receive error messages from LabVIEW.

    LabVIEW might show an interesting message pointing to the particular problem.

    Note: It's recommend to change the error checking back to normal before finishing the project, maximum error checking might cause problems later.

    Hello!

    I can't belive it, what causes the LV crash. I've tired with LV8.6 without any result.... Same faulire, and no error log... :(

    I did what u suggested, but I dont know how to go on...

    Any ideas?

    post-16152-0-39549800-1310324874_thumb.j

  11. Hello, durnek60

    First of all, change the string constants (SerNo / Model) of your cluster to arrays of bytes (numeric U8 in LabVIEW), since

    chars are arrays of bytes. The arrays must be initialized (at least 16 elements for each) or the dll will write data in places which are

    already in use by LabVIEW -> might cause LabVIEW to crash!!!

    The DWORD values should be at least U32 values.

    The last DWORD value (dwResrved) should be at least U32 and must be initialized like the char values.

    I recommend initializing the arrays using the "initialize array" VI of the array palette in LabVIEW (just to be absolutely sure). :yes:

    Hope that will help you.

    Sorry, can't help you with the configuration dialog, since I don't have an LabVIEW installation on my current system. :unsure:

    If the problem does occur anymore you should also share the error messages and the configuration dialog of the your dll call.

    Greetings, LogMAN

    Hi LogMAN!

    Thanks for your reply!

    I've made the modifications but my LV crashes!

    When I Set the Number of Cameras parameter to 1 (only I is connected currently) my LV crashes. BTW, If I set it to zero, I've return value, in Param cluster - NumberOfCameras = 1, but the remaining fields are empty...

    But, as I read in the document, I have to Set the input parameter value - number of cameras

    Hi LogMAN!

    Thanks for your reply!

    I've made the modifications but my LV crashes!

    When I Set the Number of Cameras parameter to 1 (only I is connected currently) my LV crashes. BTW, If I set it to zero, I've return value, in Param cluster - NumberOfCameras = 1, but the remaining fields are empty...

    But, as I read in the document, I have to Set the input parameter value - number of cameras

    post-16152-0-09981300-1310313075_thumb.j

    post-16152-0-23283200-1310313233_thumb.j

  12. Hi!

    I've a Host to Target DMA, that transfers data to the Upper loop. I'm counting the data arrivals and sending the data from upper loop to the lower loop by INNER_FIFO.

    (After the specified data arrived in the upper loop more data will be transfered to OUTER_LOOP, but it can not be seen on picture.)

    Placing an INNER_FIFO -> Get Number of elements to Read method in the INNER_WINDOW, I see, the remaining elemens in the fifo is highly increased by the time...

    Maybe my calculation in the Inner_window loop takes so much time, so the fifo will be full?

    INNER_FIFO (Target Scoped, Flip-Flops , 10.000 elements)

    If it is, how can I reduce the calculation Time?

    Another question, If I have a Target Scoped FIFO with only one Read and Write, shall I set it artbitrate Never?

    Thank you!

    (I can not post to NI forum, I got an Unexpected Error all time... :( )

  13. Hi!

    I've attached a vi, and an Image. I would like to send this image from RT to FPGA with DMA FIFO. In order to reduce the transfer time, I've joined U8 values to U64. After rebuilding my Image, I've seen, there is an unexpected shift on the reconstructed Image.

    Could you give me some explanation about this?

    Test.zip

  14. I use methods and properties on the diagram all the time. However, I also use clusters or arrays of ctrl references passed into subVIs as well.

    I don't think it's a good idea to manipulate UI objects from within a class unless the main purpose of that class is to manipulate the UI. Like a UI class.

    In your example, I would create a method called Engine State. I would read that state, and if the engine was running, I would disable the button.

    So, I would create a UI Class, and all the methods could be a predefined UI States (ie. UI Class - Engine State.vi with a flag isRuning) ....yes, its ok!

    (last time I've used this technique and I would say it is ok, but I'm interested other developer's opinion)

    MFVI? I'm not familiar with all acronyms.... Could you tell me some words about this?

×
×
  • Create New...

Important Information

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