Jump to content

John Lokanis

Members
  • Posts

    797
  • Joined

  • Last visited

  • Days Won

    14

Posts posted by John Lokanis

  1. QUOTE (Pollux @ Aug 20 2008, 12:23 AM)

    I know it has nothing to do with the subject, but may I ask why did you ban sequence-structures? And since you have banned them how can them be avoided? (any article if possible)

    (I am asking since I sometimes use them in my code when I find no other solution.)

    At risk of being off topic, I will answer your question:

    Sequence structures (IMHO) exist to allow text based programmers who do not 'get' the idea of dataflow to explicitly control the sequence of execution. They are like the 'GOTO' statement of G programing! ;)

    I have yet to find a situation where they are required. We use the error wire to control execution where needed. We also modularize our code as much as possbile (lots of sub-VIs). And we limit our diagrams to one screen (99% of the time).

    The key things I do not like about sequence strucutures are:

    1. Violates dataflow within a single diagram.

    2. Stacked strucutures hide code and force the code to have wires that flow backwards to pass data between cases.

    3. Flat structures make for large diagrams that are messy.

    Don't get me started on Globals either... (that horse has been beat to death anyways on LAVA and InfoLabVIEW)

    -John

  2. QUOTE (Ton @ Aug 19 2008, 10:17 AM)

    In the first case there shouldn't be a difference between C# and LabVIEW

    Unfortunatly, this is not true. LabVIEW is wildly more inefficient when calling .NET functions than C#. This has to do with the method NI choose to perform the calls to the .NET interfaces. I don't know all the technical details (Brian Tyler, formerly of NI, once explained it to me in detail but it was over my head) but I do know to never make a large number of calls to .NET functions in a loop in LabVIEW. Instead, build a simple c# assembly to do the loop processing and then pass the data back to LabVIEW inside and ArrayList. Check out Brian's old BLOG for the details. If you can't find it, or don't understand how to do this let me know and I will post an example.

    -John

  3. I think you have all inspired me to come up with a new interview question:

    "Can you carry on an online conversation and stay on topic for more that 3 posts?" ;)

    I guess I should just give into the thread hijackers demands and move on...

    Thanks for the on-topic posts. I actually put some of them to use today. Unfortunatly, the person I interviewed ended up having only 3 weeks of LV exp and the code example they brought was a perfect example of what not to do. I politly suggested they invest in a copy of the "LabVIEW Style Guide" and left it at that.

    My favorite response was to the question "what is one of your favorite features of LabVIEW?". They said the 'film strip-looking box'... My co-worker almost cracked up when he said this, since I have banned the use of sequence structures in our company's LV code.

    Now back to the latest tangent...

    -John

  4. Thanks for all the good suggestions!

    This is a very interesting topic. I will be using some of these questions today!

    As for the tangent about asking about money, credit scores and marital status, all of that is strinctly illegal to ask in the USA. We have to be very careful about not violating anti-discrimination laws. My job is to evaluate tech skills and personality relating to their ability to work within my team. For me, a motivated person with good communication skills and ability to learn new things quickly can overcome any lack of current technical skills. You can't teach someone who does not want to learn!

    -John

  5. We are currently interviewing people for a few positions that either require LabVIEW experience or it would be a plus. I have been trying to think of some good questions to ask the applicatants and figured that other LAVA members might have some good ones to suggest. So, what is your favorite question(s) to ask a prospective employee to see what level of G skills they have?

    If you don't want to post the answers, that is fine. I would assume the questions are not so hard that the answer is obvious to anyone with decent LV experience.

    I suspose some people looking to get a LV coding job may read this so giving them the answers may not be the best idea, but I figure if they are smart enought to read LAVA, they should know a thing or two about LV already.

    thanks for your help.

    -John

  6. I have been reading all the info on the new web service feature in 8.6 but have not figured out a few things. I was hoping someone at NI or a beta tester here could answer these questions or point me to the right docs.

    1. Can a LV web service be deployed on a machine that does not have the full dev package installed? If so, how does this get done? What RTE components are required?

    2. Does the web service run as a system task (in the background and running always if the machine is booted) or does it run under a specific user who must be logged in? How does it get launched?

    3. Can a web service VI access information associated with the current user of a machine? (let's say I want to grab a screen shot of the current users session and return it as a MIME stream)

    4. What kinds of security setting need to be setup on a machine so the web server will be accessible from another machine on the network? (firewalls, permissions, etc).

    5. Do you know of any decent WYSIWYG web page dev tools that would work well with the output from a LV web service and don't require a lot of text code work? (Free would be best).

    6. How does a web service deal with multiple simultaneous requests? (with each caller passing different parameters) Can it run reentrantly? Do we have to code it that way?

    thanks,

    -John

  7. QUOTE (LV_FPGA_SE @ Aug 12 2008, 07:42 PM)

    That is a great idea! They could have a realtime display on the floor showing just how cold it is in each room so you know what to expect at your upcoming sessions...

    Maybe the promo item next year should be a fleese instead of a backback...

  8. I have been using Perforce for several years now with LabVIEW. I think it is the best SCC out there. I have tried VSS, CVS, PVCS and SVN. The thing I like best about Perforce is the ability to have a UI to manage my files. I do not like the 'itegration' of SVN into the windows explorer. Perforce does this too, but I almost never use it.

    I do like the integration of an SCC into the LV Project. Mainly because when I create a new VI, it prompts me to add it to Perforce. I use the Perforce GUI to do my checkins, however.

    There are some things about Perforce that I do not like, but overall IMHO it is the best in breed.

    As for using SCC with LabVIEW, I do find that I keep all the fiels in the project checked out to me when doing major work. This way, I can freely edit and recomiple VIs as needed. When I am ready to checkin the changes, Perforce will do a DIFF and give me a list of all changed files so I can add my comments to each and submit them.

    In our group, we usually only have one DEV working on a Project or sub-project at a time, so this method works well. YMMV.

    -John

  9. QUOTE (Darren @ Aug 8 2008, 12:50 PM)

    I have never programmed in a text-based language, and I'm the one who wrote Quick Drop!

    Whoa, you have *NEVER* programmed in a text based language? So, that must mean the quick drop function was written in pure G? Cool...

  10. What they really need to do is have everyone sign up for the session they are interested in and rank them in order of preference before they choose times or rooms. Then they can at least *try* to choose times that cause the least amount of people to have a conflict AND they can assign the bigger rooms to the sessions with the most interest.

    This being my first NI Week, I may be off the mark here, but it seems like the bigger rooms were given to the more 'marketing' related sessions while the truely useful sessions to hard core LV DEVs were just wedged in where they could fit! :angry:

    Tell me where to comaplin and I will send my thougths to NI. I plan to at least start with my local reps.

  11. Frozen blue, that is...

    I know I was warned by some posts before NI Week, but I was not prepared for how friggin cold it was in the convention center. Since NI was promoting green engineering, you would think they would try to walk the walk and ask the facility people to set the temp a bit higher! What a waste of power to keep us at 65deg while it was over 100 outside! :(

    I thought it was extra poignant that the USA Today outside my hotel room door on Thursday had this article in it:

    http://www.usatoday.com/money/workplace/20...nce-rooms_N.htm

    Made for an interesting read on the flight home.

    Anyhow, maybe we can start a petition to NI to have a reasonable temp setting next year. That would be a good first step toward real green engineering.

    (it was also funny that one of the keynotes included an HVAC expert who used LV to improve AC systems! Let's get this guy a contract to fix the Austin convention center's system.)

    Otherwise, it was a good first NI Week for me! Hope to see many of you there next year.

    -John

  12. My only potential problem with Quick Drop is my left hand is busy changing tools with the tab key! (I just can't use the auto tool selection. old dog. no new tricks..)

    Plus, it is getting dangerously close to having to type again to write software!

    Seriously though, it looks like a cool feature. Now if we could just eliminate the keyboard and use one of these to call up the function we want:

    http://www.msnbc.msn.com/id/23261794/

    :D

    -John

  13. QUOTE (PeterB @ Jul 24 2008, 04:39 PM)

    Thanks John, I figured as much too.

    I think the concept of a shadow data structure that only propagates data to the FP on a less regular basis is a valuable idea which BTW has already been implemented in LabVIEW by disabling the Advanced>Synchronous Update option. Presumably that option is still too taxing for the speeds we/you are after otherwise you would be using it rather than the shadow structure. So perhaps if NI allowed us to adjust the priority of the asynchronous updates to a FP control/indicator so we could tune them for our particular application's speed needs. What do you think ? Then all the penalties associated with GUI refnums would be greatly diminished.

    regards

    Peter

    I would agree with you in most cases, but the tree control is an exception. It is notoriously slow to update but a very powerful GUI display for hierarchical data.

  14. This will be my first NI Week. I am staying at the Hilton. Still need to sign up for the LAVA party...

    I just did my schedule on the NI web site. I am really bummed that Michael and Stephen's presentations overlap. Who are the schedule wizards that messed that up! I really want to learn some new UI tricks but also want to hear from the GURU of LVOOP! :(

    I will only be able to attend Tues-Thurs. That is all the time my boss would agree to. At least the company is picking up the tab...

  15. QUOTE (Gary Rubin @ Jul 24 2008, 10:09 AM)

    I seem to have found what I was looking for. Since I'm not looking for a project, $20 (or free for 30 days) is a pretty good deal.

    FWIW, you could use the report generation toolkit functions along with the example I created to automatically create a word doc and insert the image into it. You could then build all this into a small app and distrubute it to whomever needed this functionality. All you need is the LV8.5 Full Dev Suite on your machine to do this. Don;t we all have that? ;)

  16. QUOTE (PeterB @ Jul 24 2008, 12:28 AM)

    Does writing to a top level FP control/indicator using a WORM cause a switch to the UI thread in exactly the same manner as it would have if using the traditional approach ? (i.e. by wiring to the reference passed via a terminal on a sub-vi's FP).

    If you are writing to the FP control, I suppose this always causes a UI thread hit since it is 'updating' the UI. The thing that is particularly bad is to write to the value property of a FP control using VI Server.

    I have a general rule of thumb: Only write to FP controls when you *really* need to. For example, I have some UIs that use a tree control to display data. The temptation is to write to the tree all the time and let it 'store' the data. Unfortunately this is very slow. So, instead I have created a set of VIs that implement a 'shadow' data structure that stores all writes to the tree (including state changes, like cell colors). IF the FP is currently displayed, then the writes are also passed to the tree itself. If not, then they are only written to the shadow structure and when the FP is opened, I grey the tree, defer updates, update all the data from the shadow and then un-grey, un-defer and let the display refresh.

    When you have over 50 instances of a VI each with two trees on their FPs, this helps a lot.

    Sorry for the long winded description. I'm glad you like the WORM. It is particularly useful in multi-dev situations to ensure 'static' variables are not messed with by someone in some sub-vi.

    -John

  17. QUOTE (TobyD @ Jul 11 2008, 03:23 PM)

    That is nice, but it requires access to scripting and uses the clipboard, clearing anything that might be in there already. Unfortunately, I don't have 'scripting' capability in LV8.5.

    I like how you added the feature to grab either the whole screen or active window. If it is a LV window, there is already a function in LV to grab the FP as an image, bit if the window is some other app, then that could be useful. My code could be modified to grab the active window, but that would mean detecting the active window and then getting it's coordinates.

    My goal is to create a web page that will serve the most recent image and will allow me to 'take a snap' of the screen on demand. I think there is a way to do this in ASP.NET using shared variables but I have a lot to learn in this area...

    -John

  18. Here is a quick VI using .NET that will take a screenshot of the primary workspace and save it to a file.

    This is setup to save the file as a png, but you can easily change it to whatever you want.

    The VI will hide itself if it is open so it does not appear in the screenshot.

    Let me know if you find this useful or if I have any bugs.

    My purpose for this VI was to be able to prgrammatically grab a screenshot of apps I distrubute so I can see what is going on if a user has a question or there is an error. I'm sure there are many other uses.

    -John

    (written in LV8.5)

×
×
  • Create New...

Important Information

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