Jump to content

Grampa_of_Oliva_n_Eden

Members
  • Posts

    2,767
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by Grampa_of_Oliva_n_Eden

  1. QUOTE (crossrulz @ Apr 15 2009, 02:55 PM)

    According to http://books.google.com/books?id=hWSnSi7kI_kC&pg=PA179&lpg=PA179&dq=LabVIEW+with+Style%22+--+A+Guide+to+Better+LabVIEW+Applications+for+Experienced+LabVIEW+Users%22&source=bl&ots=PSHSJVEHNi&sig=XA8s40OB3lveVJIE4hZxjW9nILs&hl=en&ei=7DPmSdL7DYvsnQf-55WiCQ&sa=X&oi=book_result&ct=result&resnum=3' rel='nofollow' target="_blank">the bibliogrophy of "LabVIEW Advanced Programming Techniques" by Richard Bitter the article "LabVIEW with Style -- A Guide to Better LabVIEW Applications for Experienced LabVIEW Users" was originally published in 1997. So give that book a little time to catch on and let the LTR spread, then tens years ago we just starting to settle on what good style was.

    But even before reading the style guide I was already show my anal-retentive side. My first LV program was kind of pretty since I didn't know how to create clusters or arrays but did figure out how to grab a lot of code and do a create sub-VI. Since the resulting sub-VI used the worse case icon pattern to handle my 16 booleans in/out, it looked like a spider.

    Ben

  2. QUOTE (twinsemi @ Apr 14 2009, 08:34 PM)

    My vi needs two more inputs. I have it currently working with six Modbus connected oxygen analyzers (4 channels each) and when I do a Duplicate Case on the sixth analyzer monitor in my stacked sequence, I can't save the vi. The message is not very helpful. "LAbVIEW.exe has encountered a problem and needs to close. We are sorry for the inconvenience." Below that it reads, "If you were in the middle of something, the information you were working on might be lost." When this happenned the first time, I moved development over to an XP machine from my Vista OS computer. (which had 8 GB RAM) I did a bunch of other cleanup tasks, got back to adding the seventh and eighth analyzer monitor sequences and got stomped by the crash again.

    LabView 8.0

    60 GB HD, 42 GB available

    Windows XP Pro, Service Pack 3

    Intel 1.83 GHz

    1 GB RAM

    vi size = 2.8 MB

    The communication setup is common for all of the Modbus devices. Inside the stacked sequence there is a MB Serial Master Query.vi for each analyzer, a whole bunch of indicators (27 for each analyzer) and a few case structures.

    Anybody seen this before?

    THe only thing close to that should not hit you LV 8. In pre-LV 7 you were limited to less than 550 controls on the FP. Do you have any idea how many you have now (both hidden and shown) ?

    Ben

  3. QUOTE (Mark Yedinak @ Apr 14 2009, 04:05 PM)

    There are several advantages to using X-controls. First, you can do just about anything you want with them (yes, there is coding involved) and your custom control is now a nice and self contained unit that is easy to reuse. I doubt there would be significantly more coding than what you would be doing using your sub-panel approach. However, when implemented as an X-control you can trigger off events using the event structure just like any other normal control. You can save the state of the control if you want so state information can be preserved. Most of the changes you have mentioned could easily be achieved using custom properties for the X-control. One thing that I have found very useful about X-Controls is that for complex controls that I ended up reusing often I was constantly copying and pasting code from one application to another or passing references to subVIs. With the X-Control I simply drop the control on the FP and I am good to go. It makes reusing complex custom controls much easier. It simplifies the UI for complex controls. If I was only going to do it once I probably wouldn't create a X-control but for things I reuse they are quite nice.

    Agreed.

    A custom control is probalbly what you really want. With an XControl you have to code a bunch of stuff including (if you want it) how the control reacts to is facade being re-sized.

    Ben

  4. QUOTE (PJM_labview @ Apr 14 2009, 01:34 PM)

    Another possibility (convoluted but it should work):

    Create a SubVI that does the following:

    • Create a batch file in windows temp folder (reuse the same name every time so you don't end up creating many batch files ) that will wait a bit (1-2s) before deleting your ini file.
    • Execute this batch file using system exe (non blocking).

    Note: you should run this SubVI as the last operation you do before exiting your app.

    PJM

    Turn that idea inside out.

    Sub-VI writes then invoke bat file that runs the app and the after the app is done the next line in the bat file deletes the ini.

    On second thought will not work since LV will wait for the bat to complete...???

    Ben

  5. QUOTE (scls19fr @ Apr 14 2009, 12:49 PM)

    I'm running LV 8.5.

    Do you have a LV 8.5 sample that use this kind of wrapper around the enqueue ?

    but I can get 8.6 because we own it at work...

    maybe you have some samples to demonstrate this.

    I never use queue in LabVIEW before... what is, in your mind, the first document I should read first.

    I also wonder if a queue can contain a cluster

    But in my mind queue and circular buffer are a little bit different

    because in a queue each element in a sort of structure that contain 3 things :

    value

    pointer to the next value

    pointer to the previous value

    so a circular buffer made with queue is not in a contiguous memory area...

    I wonder if it doesn't decrease performances.

    A "real" circular buffer is a contiguous memory area for storing values and

    an integer area storing the position where the next value will be stored.

    Kind regards

    Sebastien

    I used to use circular buffers regularly but since the introduction of the polymorphic queue (which means the queeu can be of any data type you want... including clusters). Here is a screen shot of what may have been my last circular buffer from LV 6.0 (judging by the use of string for my actions since they were all the rage back then along with my use of red comments whcih I have since discontinued).

    http://lavag.org/old_files/monthly_04_2009/post-29-1239728948.png' target="_blank">post-29-1239728948.png?width=400

    The reason I don't use circlular buffers is because Queues are faster (under most circumstances).

    So leave teh circular buffer for those cases where you want to be able to survive a power failure (data written to disk) and get comfortable with Queues.

    Ben

  6. QUOTE (crossrulz @ Apr 13 2009, 03:23 PM)

    Yeah, have you ever noticed how NI folks don't have to follow the same style guidelines as us? For the CLD, we have to keep everything easy to read, wires straight, etc. I open up an NI VI and there's wires going everywhere and you can't tell what wire is connected to what terminal. If they expect us to write a certain way, they should be showing it at least in the CLAD exam. :P

    :thumbup:

    Ben

  7. QUOTE (ejensen @ Apr 9 2009, 09:51 AM)

    8.6

    Thanks again for the suggestions. It's not a major concern since I got it working with your earlier advice. I was just hoping someone might be able to clear up why my fix didn't work. ;)

    I just stumbled across (what to me is new) a property for graphs called "AutoscaleDelay". Is controls how often a grph will Auto-scale.

    I have no idea in whcich version this was introduced.

    Ben

  8. QUOTE (shoneill @ Apr 13 2009, 08:45 AM)

    Well a totally different question is what is the "output" of the loop? I would normally tend towards the value in the shift register, but the indicator is clearly the object in question here.

    I mean, the Indicator is not actually an output of the loop at all.... The only actual output would be the last single measurement contained within the shift register...

    Shane.

    So the correct answer is D, none of the above.

    Ben

  9. QUOTE (scls19fr @ Apr 9 2009, 09:23 AM)

    Hello,

    I've made a VI for my students.

    This VI contains data, graph and calculate some values.

    I'd like to hide the calculated values but when I click on a button a modal window

    would appear in which I could enter a password to make the whole user interface available.

    Is there an easy way to do this.

    I've ever user property node (to hide some part of the user interface)

    an other idea could be to have two forms (a limited form and a full form)

    does anyone here has ever try to do something like the two ideas above ?

    How can I open a modal window ?

    Kind regards

    I'll leave the modal window" for other to answer but hiding groups of control can be accomplished by using a tab control with a tab page that is hidden until the password is entered. I find the tab control approach to be an easy way to control the visablity of a collection of objects.

    Ben

  10. QUOTE (ejensen @ Apr 9 2009, 09:32 AM)

    I suppose I could use this, but shouldn't have to. The graph is set to autoscale and I shouldn't have to change that.

    One of the graphs was functioning properly as I had it, but the other was not. I tried moving the indicators inside my case structure thinking the data would be written to the indicator before data flow left the case structure. I got the same result as when they were outside the case structure, which is still a bit confusing unless I'm misunderstanding something with data flow. Shouldn't everything in the active case finish before leaving the case? I was able to use a sequence structure as Ben suggested, and it works as it should. Any ideas what I'm missing here?

    ? Set the graph/cahart as "syncronous" ?

    You did not mention which version of LV.

    I think it was LV 8.2 where I had a hell of a time trying to get the graphs to update properly. If I remeber correctly, NOT using defer FP update helped. In other version of LV if the chart/graph where on a non-selected tab page, I had to "jiggle the handle" (invoke node Get image) to get the image to update.

    Ben

  11. Re: ethics of developing

    I carry a Swiss Champ Swiss Army knife. One of the widgets on the flip side is a hook type thingy that many people don't have any idea how to use it. The rest of the knife retians it usefulness dispite the fact that it has an "un-documented feature"*.

    Now if popping out that hook gizmo resulted in the knife blades going dull or the sharp edge switched to the other edge, then I would question if including that hook thingy without documenting it was a good idea. Going farther, if the knife was sold as a self defence device I would feel that I should clearly document the possible negative effects of extending the hook when the knife was being used for self defence.

    If I was the developer of virtual instrument panels for air craft and I thought I could expand my customer base by allowing the pilots to choose their own color scheme I may experiment with adding this feature. Provided I did not expose this feature to the customer and stayed with the original color scheme in the sipping code, I do not see how I would be casuing harm to them. Later if I exposed the color options WITHOUT putting in place logic to ensure they never choose black-Text-on-black-background and I knew about this issue, then I would feel that I am neglegent.

    In NI's case their code falls into at least two catagories, code used to develop code and code used by end user. The former is LV and the latter is NSV etc.

    Since the LV development environment is intended to develop code as long as it allows us to do that, it could have an easter egg that gave step by step instruction to build a bomb and I would still concider it ethical. But if LV produced exe's with that easter-egg bult in, then I would question the wisdom of using LV since I would not be able to look my customer in the eye knowing that the easter egg could be there.

    Another thought:

    Are any of you out there old enough to remember people asking "Hmmm... I wonder what that asterisk and pound sign thing are for?" when phones switched from rotary dial to push-button dialing. In that case new undocumented features were introduced and few people question the ethic of adding the asterisk and octothorpe.

    As engineer and scientist society is constantly looking to us to answer these technology questions (someone has to interpret the entrails) and I am glad this Q is being discussed.

    Here is an example of what I discounted as a mis-use of my engineering skills. I drive thru Yuppy-town on the way to work and home every day. Durring this short drive I can encounter up to a dozen people driving stupid with a cell phone to their ear. The ispiration hit me (shotly after one of them almost hit me) to build a "Cell Phone Zapper" that I could carry in my car and use to blow-out the reciever circuits of any cell phone I point it at within range. Sure I could get my jollies and possibly make some money selling them BUT, it just ain't right! "Just because we could do something does not mean we should." (paraphrasing Jurasic Park).

    Excuse me please if any of the was offensive.

    Ben

    * The hook on the back side of the Swiss Army knife is intended to make carrying heavy parcels bound with string easier as per the official documentation.

  12. QUOTE (Aristos Queue @ Apr 8 2009, 06:01 PM)

    None of the XControls events will fire unless the FP is loaded into memory. If this is a subVI, it won't be normally -- but if you use any local variables in your diagram (for the XControl or for anything else), that will cause the FP to load into memory. Once the FP is in memory, then writing the value -- using the terminal or the Value property -- will fire the update functions of the XControl.

    Thanks for that idea. I asked if it behaved differently when he had the FP of the sub-VI open and he sias it still did not fire.

    I am going to have to sit down with him and do some more digging.

    Thank you,

    Ben

  13. One of my co-workers has this crazy scheme that he is trying te realize in an XControl.

    To work the way he wants, he wants to get an event to fire whenever the sub-VI that has his XControl on the icon connector recieve the data from the caller of the sub-VI.

    I have shown him examples of writting to the XControl using the terminal or via property node >>> Value and all is fine.

    Has anyone done somthing like that?

    I'm thinking that because it a sub-VI LV is passing the data through the icon connector but becasue it is a sub-VI the proxy for it is ignoring the update.

    Got an idea what is happening and how we can get an event to fire when the data gets updated?

    Thank you,

    Ben

  14. QUOTE (hma @ Jun 8 2007, 08:02 AM)

    Just to play what if.... that was the program requirement.

    Is something like that possible without resorting to an Picture control?

    Each "layer" of tabs could be a normal LV tab control.

    Mouse down on the tab would re-arrange the the tabs positions and front to back order (?).

    Tab names can be define at run time but new tabs to stack on top of each and the controls and indicators ON the tab pages... Sub-panels that load when tab name is shown...

    Turn the whole thing into an X-Control with methods to define number of layers, page name/sub-panel Sub-VI etc.

    I guess it could be done, ...

    BUT

    SHOULD IT BE DONE?

    Over lapping tabs with sub-panels in an X-Control is unchartered teritory in my book (anybody wander in those hollows?) and I'd plan for unstable ground (bugs with updates etc) and the perfromance would probalably vary with the number and complexities of rendering screen updates (how would even go about characterizing and testing the performance of a critter like that?).

    I think I'd go with a pitcutre control to render the background tabs and use a tab control with Sub-Panels to render the foreground. That way it is a rather static background picture over a normal ... or even better! Two picture controls next too (one above one alaong side) the tab. THat would be a no over-lap approach.

    Did I miss something? Done with my Sunday morning coffee. ;)

    Ben

  15. QUOTE (shoneill @ Mar 25 2009, 02:43 PM)

    With 1000 resumes sent you can't have spent much time personalising each one before sending....

    I always take time to highlight the parts of my capabilities which fit any given job I wish to apply for. This can take up to half a day until the wording is right. Having said that I never had to send more than, say, 10 resumes before getting a new job. If you're not even getting called for interviews, then there must be something clearly wrong with your resumes.

    Maybe you should post an example with personal details deleted (name and age and so on). Do you include a personal cover-letter? That can be really important.

    Shane.

    Its been a while for myself but my wife re-writes her resume for each job she is applying for. She looks at the job description and updates the resume to show that "she is the perfect person" for that job.

    Ben

  16. QUOTE (AnalogKid2DigitalMan @ Mar 25 2009, 11:44 AM)

    You got that right!

    I did not have a chance to read al of that but I saw no mention of LabVIEW. HOw can it be "Ultimate" without LV?

    Mine is a bit smaller but is controlled by a LV application (see laptop).

    post-29-1238005783.jpg?width=400

    It uses a hand built I/O sub-system (Bruce Chubb design) and the original code was written in BasicA under DOS. I converted to LV to explore the power of the Picture control and judging by how quickly people get used to the interface, I call it a success. Prior to the LV version even my partner in the project was hesitant to touch anything.

    More info about my layout can be found here.

    Ben

×
×
  • Create New...

Important Information

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