Jump to content

tushar

Members
  • Posts

    31
  • Joined

  • Last visited

Posts posted by tushar

  1. I have developed a small utility inspired by Quick drop and JKI RCF.

    The utility can make various common tasks very simple(e.g. adding cases to to case structure, finding a perticular case in case structure, changing VI properties etc. etc.)

    Also this utility supports plugins so new features can be added

    you can see the demo video below.

    I have submitted this utility as my entry in "Code Madness: Example Program Challenge 2011" If you like this concept i request all to provide a feedback as well as rating

    you can find my submission here: http://decibel.ni.co.../docs/DOC-15287

    Also more importantly, i want to know your ideas about which of the task can be added as plug ins in this to this utility.

    cross link on NI Forum

  2. Hello all

    Thank you very much for your replies. It is greatly appreciated.

    I am attempting to use the IMAQ magic wand tool . I understand what you are saying about the threshold levels when the light fades but my plan was to alter the treshold levels automatically using a LDR circuit.

    I have attached the vi I am working on. Just to let you know that there are some VI's missing because I do not have those modules downloaded on my laptop but they are on my PC at college. The image I posted ealier is representative of what I will be processing.

    I have been able to map the line in labview using the magic wand tool but am having difficulty interpreting the results.

    My plan was to take elements from a project that is a XY plotter that gets coordinates from the processed image and draws that image on paper, I know I am not drawing anything but the movement of the stepper motors is similar.

    Thanks again

    I think Eric has made one important point. the solution you are looking forward can give you better results if you CALCULATE the sun position instead of MEASURE the sun position.

    For calculating the position you will need to have GPS co-ordinates(you don't need to have GPS device, you can feed them as constants) of your location and time.

    Also consider following points when you consider vision based solutions Vs Time location based solution

    • Accuracy (~100% Vs 100%)
    • Cost of hardware
    • cost of software development
    • Cost of installation and commissioning
    • maintainance (need to clean camera lens/ enclosure glass, calibrations etc.)
    • etc.

    Also there is one more advantage of using time location based solution "It can even work in night";)

    see this: http://pvcdrom.pveducation.org/SUNLIGHT/SUNPOS.HTM

    also Google a bit and you will get all the required formulas.

  3. There is no way to script your way through decals. The buttons API is non-existent and has never been refactored by NI since, I might be wrong here, LabVIEW 2.0. You need to play with the PNG's encoded in the .ctl file to manipulate them programmatically. Below are links to the code that Jon was talking about.

    First, install UI Tools

    Then, the Control Class Add-on.

    Once you restart LV, you'll get "Control Generator" in the Tools menu. The rest is supposed to be intuitive from there.

    first of all thanks for providing such a great utility.

    How ever i am not looking at just a way to customize boolean controls.

    my aims are as follows(and in same order of priority)

    1. put image as decoration on front panel (same thing as if we drag a png file from explorer and drop it to empty area on front panel)
    2. customize all kinds of controls to add images to them, alter dimensions of its parts

    Also in CR the critical part is password protected can you email mw password (tushar@jambhekar.com)

  4. Tushar,

    I am very impressed with your example on UI customization on your blog!

    I'm sharing the image here to show everyone what a nice job you've done...

    Is your question related to extending this example?

    http://www.jambhekar.com/blogs/?p=19

    LabVIEWUI.png

    Thank you very much Phillip.

    In past we have developed lots of modbus dataloggers and now we have created fully configurable system(soon we are going to make it available free of cost to community). and i am thinking to add some typical SCADA features to it. so want to develop WYSIWYG editor.

    This editor will work as plugin vi creator and users can add their own mimic panels.

    I understand that people will need to have labVIEW and they need to run editor as source code and exe wont work.

    This question was related to development of that editor.

  5. use greater than function in comparison palette.

    for time measurement when the LED turns ON off you can record the tick count, and the difference between tick counts will give you desired result.

    you can post your code so that we can help you out. with implemetation

    • Like 1
  6. Hi all,

    Unfortunately have to use a USB camera in my application. I wish to set the image and video settings programmatically. It can be done by way of a pop-up dialog using the propertypage.vi (correct name?). However, I wish to set it without having the dialog open. Is there any way of doing this? I can set it in the first instance of using my particular vi and reuse the reference, but each time I start the vi I have to go through the dialog again. In IMAQdx one can set the attributes of the camera but not so in IMAQ_USB. Any thoughts, suggestions appreciated.

    How I wish I had insisted on another interface!

    Regards,

    LeeDoh

    unfortunately if you are using IMAQ USB there is no alternative. i have used videocapX activeX in past (http://www.fathsoft.com/videocapx.html)

    and i found it very useful. also i find it pretty useful. the power it gives is unmatched.

    Also if you need to grab images where other features of vdm are not required then run time lic. becomes an overkill. in such scenarios i found this solution is quite cost effective.

  7. There is not currently a method to know how many unprocessed events are in the "Event Queue" of the Event Handler Structure, here's the discussion. But there are a few Ideas (Discard Stale Entries, Event Queue Size Terminal, Register New Refs, Priority, Control Event Buffer) you can vote for to make the "Event Queue" behave more like an Event Queue.

    I have developed my own framework which help me in this scenario. Also it offers complete "loose coupling" making application extension very simple.

    see this post http://www.jambhekar.com/blogs/?p=48

    Also you can see the monitor app utility which allows you to see which messages are pending for processing

  8. Et al,

    I had an opportunity that required me to learn VS Silverlight, which in turn meant I had to learn C#. While I was learning good programming style I came across the Observable pattern and framework classes. Very interesting. For those that don't know it here is the wiki. Here is what I think is the most common use case:

    (1) You have a business model object. The business object is called Observable. The business object consolidates all data that makes up your application into a convenient location.

    (2) Other pieces of you application (typically other objects) will register/unregister with the business object to request updates when the business object gets updated. The objects that register are called Observers.

    (3) When the business object changes the Observers are notified and handed relevant information from the business object.

    (4) The observer takes the relevant info and manipulates it the way it wants.

    The most common use is for UI. Your business object changes and the UI object which has registered to it takes the new data and displays it in an original way outside the knowledge of the business object. The bonus is a very loosely coupled UI and Data.

    Just wondering if anyone has attempted?

    see this

    and this

    for downloading the framework see my response here

    http://lavag.org/top...h__1#entry81818

  9. when i talk about design patterns(so called architectures) almost every time people start talking about state machines. and i wonder that most people dont accept that state machine can introduce some problems as well.

    one of the problem of state machine is that it makes everything sequential, so if you are using LabVIEW because it is "Inherently parrallel" then your state machine is turning it into "inherently sequential" (However if you dont follow good design patttern then the problems are even bigger)

    we have developed our own framework for implementing publisher subscriber pattern. this is useful for large applications especially where layered architecture is used. we divide our application into layers and develop them as separately. then these layers communicate with each other through our framework.

    Due to loose coupling in layers we get unmatched flexibility and extending application is very simple. all the layer follows a modified QSM for the execution.

    here is a small demo of our pattern

    Also find attached code of our framework. the example demonstrated in video is also available inside zip file

    Also find attached code of our framework. the example demonstrated in video is also available inside zip file

    PubSub Architecture.zip

  10. may be its too late to comment on this post as you might have already finished coding

    but i think using multi-column list can be a good choice

    you still need to have one row for channel name and one for data, so that you can have different font sizes, but you can have altrenate background colors for rows and if you select channel rows background color exactly as grid color then you can have one cell with two row kind of effect.

    And i think looks wise it will be way superior to array of cluster approach

  11. just in case you don't need vision development module. then you can see this

    http://www.fathsoft.com/videocapx.html

    i have used this at one of our clients for capturing images from 4 cameras and we found it excellent

    also if you are using NI IMAQ USB then version does matter, previous versions of it does not support capturing from two cameras if they have identical name(i.e. two cameras of exactly same brand&model)

  12. I Use NSIS and I am very happy with it. Most importantly it adds very small overhead in size.

    I have used following features with excellent results

    • Copying Files to install directory and various other system directories
    • request admin rights
    • register dlls
    • Registry Entries
    • Complete GUI customization(Logo, Branding, Lic Page etc.)
    • selectable features (optional,Required etc. )
    • install other installers(silently)
    • Automatically Install unsigned USB drivers(Its really tough; most other installers support only signed drivers. I Spent more than a week to find solution)

  13. QUOTE (2and4 @ Jan 14 2009, 04:16 AM)

    We are trying to analyze images generated by a microscope using NI Vision software and LabVIEW. The microscope generates Composite Video. We want to send the images to a laptop using a Composite Vide to USB converter. The problem is there are SEVERAL of these Composite Video to USB converters available and we don't know which one has a driver with an API which we can call from LabVIEW relatively easily.

    I'm guessing most of these converters come with software that, when installed, registers ActiveX Type Libraries or .NET Assemblies on the OS. The problem I had once in the past is that the classes were not very well built and using the classes' methods was quite cumbersome.

    Anyone used any of these converters? Any suggestions which of the many we should try? Thanks in advance...

    In Past we have built a software which can capture images from Analog cameras and Web cams. we used a PCI card for capturing analog images. I think there is no need to go deep into details of driver. almost all drivers will be compatible with directshow. and i think it will be better if you design your software on top of directshow.

    Afterall it may not be a good experience if you need to scrap your entire code and start from scratch just because you are planning to change your capturing device

  14. QUOTE (2and4 @ Jan 14 2009, 04:16 AM)

    We are trying to analyze images generated by a microscope using NI Vision software and LabVIEW. The microscope generates Composite Video. We want to send the images to a laptop using a Composite Vide to USB converter. The problem is there are SEVERAL of these Composite Video to USB converters available and we don't know which one has a driver with an API which we can call from LabVIEW relatively easily.

    I'm guessing most of these converters come with software that, when installed, registers ActiveX Type Libraries or .NET Assemblies on the OS. The problem I had once in the past is that the classes were not very well built and using the classes' methods was quite cumbersome.

    Anyone used any of these converters? Any suggestions which of the many we should try? Thanks in advance...

    In Past we have built a software which can capture images from Analog cameras and Web cams. we used a PCI card for capturing analog images. I think there is no need to go deep into details of driver. almost all drivers will be compatible with directshow. and i think it will be better if you design your software on top of directshow.

    Afterall it may not be a good experience if you need to scrap your entire code and start from scratch just because you are planning to change your capturing device

  15. In my application I need to store various files into a zip file. To locate required file easily I am also including one file called lookup.txt in my zip file which will have MD5 lookup.

    I have attached my code and it is not functioning as expected

    When I create new zip file it already contains a blank text file named lookup.txt, hence input to this VI is never an invalid zip file.

    When I add first pattern it gets added properly with name 1.ptn, when I add 2nd pattern it gets created properly with name 2.ptn but 1.ptn gets erased. And after that if I try to add more patterns no pattern gets added. Zip file always shows 2 file viz. lookup.txt and 2.ptn

    I am not getting any error.

    Must be some silly mistake but I am not getting it.

  16. QUOTE (Variant @ Sep 27 2008, 09:18 PM)

    Can anyone tell me if there is any option of bringing multiple configuration windows as attached. I really need this feature. I tried having multiple front panel but it doesn't look great. Please suggest if you have any ideas

    Do you need Fix number of such windows or you need to dynamically change the numbers. If numbers are fix then using splitter bar can be a good alternative

  17. QUOTE (wan81 @ Apr 21 2008, 12:16 PM)

    Hi guys!!!

    I was wondering how I can store an image which is represented in 8/16 or 32 bits into a binary image?

    I know using IMAQ pallete, i can convert an image into an array using ImageToArray VI. However, the image will be represented in an 8 bit or 16 bit format. How can I achieve binary?

    Please help.

    Thanks

    Though readymade binary file saving is not available you can convert the U8 image into binary format.

    Please Find Attached Example

    In the example above i have shown image as 1D array, I hope Converting 2D image data to 1D array isnt big deal

  18. QUOTE (Justin Goeres @ Mar 18 2008, 06:55 PM)

    Sorry,

    the code needed a mass compile as the toolkits relative position is changed from my default directory. please find a mass compiled code here

    QUOTE (TobyD @ Mar 19 2008, 03:04 AM)

    I'm curious as to why you hide all of this code in a flat sequence structure. Why not use a SubVI? It really impedes readability.

    Actually its an OpenG VI, it is just for those people who do not have OpenG installed on their system

  19. Look at the attached Demo application. Please do let me know your comments on this architecture.

    Introduction

    There are many architectures called Event, Message handler, state machine, queued state machine etc. and I don't know what should I call this new architecture I have developed, so I will simply call it Tushar's event architecture

    Most of the architectures proposed by NI and other forums provide excellent data and flow management between single VI. But in real world big applications that is seldom the case; especially if your application utilizes layered design.

    Proposed architecture is suitable where a layer of an application needs to execute a process as per other layer's request (Along with sync issues).

    Architecture Details

    Core of this architecture is Event Client object. One can create N number of instances of this object in an application. Only constrain is each instant should have a distinct name.

    Every instance of Event Client can subscribe his own choice of events. Subscribed events can be added or removed in run time.

    As soon as the subscribed event is raised, it is made available to appropriate instance of event client instance.

    (Note: One event can be subscribed by more than one instance of event client. When such event is raised it will be made available to all the instances who have subscribed it)

    To get the actual event EventClient_GetEvent.vi should be used. This vi is very much similar to Dequeue element vi. Using this VI it is possible to wait for any subscribed event for specified timeout.

    Template

    The template provided is a variant of Queued message handler. In the state machine user can handle the events generated by event structure, Event client as well as he can insert his own states as per requirements.

    If you need Event Client Toolkit with you own logo for Server Startup, Please mail the request along with your logo to t_jambhekar@rediffmail.com. Toolkit will be mailed to you free of cost.

    Please mention form where you came to know about this toolkit

  20. i am also facing the similar problem with 8.2 and there is one more problem

    I have written a windows script that launches my custom application when i double click on perticular type of file (say files with extension .ext) now when i double click on file, my application gets launched and appears in taskbar, but it do not show up the front panel till i dont press a key on the keyboard.

    if i launch the exe file directly then everything works fine

    This problem is seen only in 8.2 and code works fine in 7.1

×
×
  • Create New...

Important Information

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