Jump to content

hfettig

Members
  • Posts

    109
  • Joined

  • Last visited

Posts posted by hfettig

  1. Hi,

    I will be in the same situation you are as soon as my hardware arrives but I can already tell you that the LabVIEW Profile VI tool is definitely not to be used for comparison between LV and VDSP++. The reason being is that the LabVIEW profile tool slows down the actual execution due to all the hooks it places into the code to do the profiling. It is very useful to figure out which of your SubVIs you spend the most time in but it is not useful for benchmarks.

    I quick look at the BlackFin palette showed me a VI called BF RTC Get DateTime which retrieves the current time from the BlackFin RTC. My first idea would be to put that before and after the code you are running, then subtracting one from the other to give you execution time. This should give you a clearer idea of the execution with LabVIEW.

    However, you have to remember that when you are running the code from LabVIEW with frontpanel open, you are runnin in a debug mode that will be inherently slower than the VDSP code running on the device with just a terminal window open. How exactly you would make the LV code runn on the blackfin without debug mode and retrieve the timing, that I do not know yet. If you find out, please post it here :yes:

    Good Luck,

    Heiko

  2. I was taught (and am teaching to my students) that in a Strict TypeDef the only things that are different from instance to instance are the Label, the Caption, the Description, and the TipStrip. Everything else is controlled by the typedef.

    Now in LV 8.5.1 to some degree and in LV 8.6 to a higher degree I am able to change the strings of a strict typedef ring control from instance to instance:

    In both LV 8.5.1 and 8.6 I can do the following:

    • Create a Strict Typedef Ring Control (STRC)
    • Drop a constant of that STRC onto a block diagram
    • Right click the constant and select Edit Items
    • You can now change the strings AND values if the items
    • Close the dialog
    • Right click on the STRC and select open typedef
    • The typedef is unchanged but the constant has the new values
    • If you change the constant to a control or indicator all the strings and values revert to the typedef settings

    In LV 8.6 there is another related bug:

    • Drop a control of that STRC onto a front panel
    • Right click the constant and select Properties
    • You get the full range of tabs displayed
    • Representation shows up as EXT and is settable, although none of the settings are accepted
    • Data Entry shows up with 0, 0, 0 limits which are settable, although none of the values are accepted
    • Display Format shows up in advance editing mode
    • Edit Items shows up with an empty list that is changable, although none of the new items are persistent
    • Those tabs do not exist in LV 8.5.1 (and probably should not exist in 8.6 either)

    Can anybody veryfy the constant bug earlier than 8.5?

  3. QUOTE (nhollenback @ Sep 23 2008, 09:59 AM)

    Does anyone have LabVIEW GUI: Essential Techniques? What is your take on the book? BTW - is available on Amazon for $234 :thumbup:

    I have the book. Bought it way back for less than $234 :yes:

    I haven't looked at it in a long time. But I remember it being quite useful.

  4. Hi Folks,

    Just wondering if anybody knew whether it was possible to put a static item into the root folder of a web service.

    Reason I am asking is that I would like to have my start page in the root of the webservice, i.e. http://webserver/webservice/index.html

    I have no problems getting the file to be installed into that location but I don't know how to get the web server to allow access to that file.

    When I try to set up a static URL mapping to "/" it does not allow it.

    Of course I could always put the file into a sub directory but IMHO it would look cleaner sitting in the root.

    Any ideas?

    Heiko

  5. QUOTE (Norm Kirchner @ Sep 16 2008, 08:22 PM)

    so the net effect is that in these and other situations, IT"S A ###### TO GET SHIT TO ALIGN.

    I couldn't agree more, Norm. Personally I think that LabVIEW is way behind with its IDE. Not much has changed since I started with LV 6.0. Back then it was still relatively difficult to get a UI together for a Windows application so LabVIEW was ahead of the curve.

    However, if you look at the form designer in Visual Studio 2008, it is now miles and miles ahead of LabVIEW 8.6 (with regards to designing a GUI).

    When you drop controls onto the GUI and move them around you get automatic alignment guides to the existing controls and it snaps to standard distances between controls as well as the edge of the window.

    I assume it is similar to the zoom function people have been requesting, NI will hold all non-trivial IDE changes back and integrate them into this brand new IDE they keep hinting at. But from comments at NI week that is at least two years away.

  6. QUOTE (crelf @ Sep 15 2008, 10:35 AM)

    I'm not sure if it was your intent, but your post kind-of sounds like you think that Skype using port 80 is a bad thing? I'm not sure it is. It's a chicken and egg problem: if you use Skype first then try to use something else that wants that port then it can be seen as a Skype problem...

    I completely agree that this is more of a Skype problem than a LabVIEW problem. I just wanted to point out that this default Skype behaviour can lead to problems with LabVIEW and that it can be turned off.

  7. Can somebody tell me why I get the the following warning when I try to save this code from 8.6 to 8.2?

    The object "Subtract" does not support output configuration in the previous version.

    The object "Subtract" does not support output configuration in the previous version.

    post-1022-1221306161.png?width=400

    No warnings when saving to 8.5

    QUOTE (hfettig @ Sep 13 2008, 07:41 AM)

    Never mind, I just figured it out. Apparently as of 8.5 you can use a Properties dialog to set the output of a mathematical function to a different representation than the inputs. That seems to apply especially to Fixed Point representation.

    post-1022-1221307502.png?width=400

    I don't know whether this is very useful for other representations since you still seem to get coercion dots on the inputs if you set the output to a bigger representation than the inputs (e.g. inputs I16, outputs U32). However, it could save you a conversion function if you are going to a smaller representation of the same type, i.e integer of floating point. If your inputs are integer and your outputs floating point you get coercion dots as well.

    post-1022-1221307508.png?width=400

    Is anybody using this functionality?

  8. Howdy Folks,

    Just thought I'd share this little experience that cost me a few hours today. :headbang:

    I wanted to try out the new web services in LabVIEW 8.6. So I started by turning on the LabVIEW web server.

    When I tried out my first deployed web service I just got a blank page in Firefox. Interestingly enough in Internet Explorer I got a file not found error.

    So after some searching I found the error.log file for the web server here: C:\Program Files\National Instruments\LabVIEW 8.6\resource\webserver\logs\error.log

    In here I found out that LabVIEW was unable to create a connection on port 80 and therefore could not start the service. Good to know but why did this take this long to find out? Why is there no status LED on the Web Server panel in the Options dialog?

    Next I tried to start the web server in LabVIEW 8.5.1. I thought that maybe there was a problem with the 8.6 web server (which is new) and VISTA. However, the 8.5.1 web server was unable to start as well, but at least I got a pop-up that told me this.

    As a work-around I was able to turn on the web server in 8.6 on port 8080 with no problems.

    Now the hard part was to find who was hogging port 80. After googling through a gazillion pages I found that in VISTA you can use the command NETSTAT -a -b -o -p TCP to find all active processes using TCP ports. And voila: Skype.exe was listed as listening on port 80.

    After exiting skype LabVIEW WebServer started without problems on port 80 in both LV 8.5.1 and 8.6

    Interestingly enough I was able to start skype after the LV WebServer was up and running. And I could thereafter shutdown and restart the LV WebServer without problems. However, if LV WebServer is not running and I restart Skype, then I run into the same problem all over again.

    Now I found a setting in Skype under Options -> Advanced -> Connection called 'Use port 80 and 443 as alternatives for incoming connections'. After unchecking this Skype does not seem to block port 80 anymore. And I still seem to be able to receive calls (Thanks to Jim :thumbup: the test caller). This way I seem to be able to run Skype and LV WebServer at the same time.

    So if you are having problems starting the LV web server, check your skype settings.

    Cheers,

    Heiko

  9. QUOTE (TobyD @ Sep 9 2008, 11:58 AM)

    I shudder to think what could become of LabVIEW style guidelines if people start to rely to heavily on the diagram cleanup tool. I will admit that I have seen some VIs that were so poorly written that the cleanup feature actually helped, but I have yet to see a VI that I would consider "clean" after running this tool. I think it can provide a better starting point for cleaning up messy code, but my experience so far has been that quite a bit of work is still required to make the code presentable.

    I agree with Tony on this. I like my code 'clean' in a specific way, which is not quite what the cleanup tool creates. However, I do find it extremely useful as a first step after using Edit -> Create SubVI.

  10. QUOTE (leivatron @ Sep 9 2008, 11:09 AM)

    I got some code from the Indian testo webpage, when I try to run the Vis, all the properties nodes and invoke nodes seems to be broken, becose the error list show me the items with the warnings.

    I`ve been trying to built them againg but I can`t.

    I am seeing the same thing. The reason seems to be a missing ActiveX class or control. Was there a dll file that came with the LabVIEW code? If so, try to register it with windows, restart LabVIEW, and see if it works.

    • Like 1
  11. As you can see from the screen shot, there is a way to use splitter bars on tab controls. However, it is not a direct way. In this case the tab control is displaying an XControl. The XControl has on its facade an XY-Graph and a Multicolumn list box, which are separated by a splitter bar. Works nicely but is probably not practical for most applications.

    post-1022-1220441275.png?width=400

    I do agree that a simpler support for this would be nice.

  12. QUOTE (Aaron L @ Sep 2 2008, 06:26 PM)

    Depending on how often you will need to access this 1024 item LUT I would not bother with creating it but rather work directly from the 33 item LUT:

    http://lavag.org/old_files/monthly_09_2008/post-1022-1220403372.png' target="_blank">post-1022-1220403372.png?width=400

    The code above allows you to specify a base 1024 index that interpolates the answer from the base 33 LUT.

    If you will be accessing the base 1024 LUT very often it might make sense to create an actual LUT. Just take the code above and run it through a for loop.

    Cheers,

    Heiko

  13. QUOTE

    I second this one. I'd love to have the ability to have 'DEBUG' and 'RELEASE' settings without having to remember to change the project settings before every build

    QUOTE

    1. There's still work needed on project stability: 2+ crashes a day are common for me, along with corrupted project files that are never quite the same again.

    This is my biggest problem with LV project. Personally I have the feeling it gets especially bad when you have multiple XControls and Libraries.

    I do like the cross-linking improvements that were made in 8.5 but they are still not perfect.

    Personally I would be satisfied if NI would invest all their time in increasing the stability of project, rather than adding new features.

    Hold off the new features for this supposed 'complete IDE overhaul' that they are working on for a couple of years down the road. Until then, give us more stability.

  14. 35 spots? 5 days?

    Wasn't the original course length 2 days and isn't there usually a 12 student limit?

    So my question is, do they take the 2 day content and spread it over 5 days because of the 36 student? I know that my LV Basic courses always take more time with more students. Or do they actually add more meat to the course?

    Would that be covered by the Training and Certification Membership?

    I hope not or they will have lots of LV novices just looking for a free cruise :P

  15. QUOTE (maybe @ Aug 23 2008, 01:33 AM)

    I have the similar way like what u posted, but where did u get the enum constant "page 2" ?

    Just right-click on the Tab Control terminal and select Create -> Constant

    If you plan on changing the names of the tabs in the future, I'd recommend making the tab control a typedef. That way the constants will update with the new values when you change page names.

  16. QUOTE (simplemaan @ Aug 22 2008, 02:34 PM)

    Is there any difference between a positive valued error and a negative valued error? i.e., if I am specifying a user error code, is it a best practice to use positive valued vs. negative valued errors in different situations?

    Well, the only thing I was able to find was that the user error codes are in the range of -8999 to -8000 and 5000 to 9999.

    I seem to remember somebody telling me that the negative error codes were for all things 'external' to LabVIEW, i.e. device drivers, DAQ, VISA, .NET, ActiveX

    But then of course there are the GPIB error codes, which are positive, and the Mathematics error codes that are negative. And then there are the Waveform Error Codes that have the same meaning as positive and negative error codes.

    You can look up the default error codes in the LabVIEW help under Contents -> Fundamentals -> Running and Debugging VIs -> How-To -> Error Codes and Messages -> Ranges of LabVIEW Error Codes

  17. QUOTE (Aristos Queue @ Aug 19 2008, 04:02 PM)

    No. *Classes* cannot be unloaded. *Objects* are freed up just fine.

    Ok, that makes sense.

    QUOTE

    Is "
    Open
    " a VI that you have written or are you meaning the Open Library Reference invoke node?

    Written myself: Takes an object constant, bundles a few setup values, parses my file and has the object reference as an output.

    QUOTE

    Is "
    Close
    " a VI that you have written or are you talking about the Close Reference primitive?

    How the heck do you "empty out the private data"? Are you talking about just writing default values to the fields using a Bundle node?

    Written myself: Takes the object reference and yes, writing default values to the fields using a Bundle node. ("Emptying out" as in emptying out my arrays, etc.)

    QUOTE

    What do you mean by "destroy the actual instance"? My answer depends upon what you mean by "destroy". Huh? Are you using
    LV
    classes or one of the reference toolkits?

    I think jdunham cleared that up for me in his reply. I forgot that this is ByValue we are talking about. So as soon as the wire ends, the content is gone, i.e. destroyed (or more likely garbage collected shortly thereafter). I got a little confused since inside this class I am using the OpenG dictionary type, which uses OpenGOOP, which is ByReference, where you actually have to destroy the instance, i.e. reference, when you are done with it.

  18. Ok, here is a followup question on something I heard at NI Week: "Once an LVOOP class is loaded into memory it cannot be unloaded".

    I am probably taking this completely out of context, but does that mean that every time you run code that has an object constant on the block diagram diagram a new instance is created, which then will be in memory until the program shuts down, regardless whether it is used or not?

    Basically what I am wondering is the following:

    I have a class called DataFile.

    When I call Open an instance of the class is created, the data is loaded and parsed.

    Once I am done working with the class I call Close, which empties out the private data.

    However, as far as I know there is know way to destroy the actual instance, is there?

    I am just wondering that although I empty the private data, every time I open a new file the instance of the old one(s) is (are) still in memory, slowly increasing my memory footprint.

    I guess a way around that would be to instantiate the class outside the Open function and re-using the instance for each file.

    I am used to .NET where the garbage collector comes around and frees up unused memory space. I guess there is nothing like that in LabVIEW, is there?

    Cheers,

    Heiko

  19. I know this question sounds strange and is probably not well phrased. So here is my problem:

    I have a parent class Setup.lvclass. From this I inherit multiple classes, e.g. LivSetup.lvclass, TlmSetup.lvclass, etc.

    The parent class has three dynamic dispatch functions: ReadFromIniFile.vi, WriteToIniFile.vi, WriteToConfigFile.vi

    All classes have as their private data a cluster called Setup Data and a string called Ini File Section.

    Now currently I have an override function in each child class for each of the three dynamic dispatch functions. This allows me to bundle up my child classes into an array and run a for loop on the dispatch functions.

    post-1022-1218727400.png?width=400

    This part works really well.

    Now I noticed that my ReadFromIniFile.vi and WriteFromIniFile.vi are identical for all child classes. The only difference being the contents of the Setup Data cluster.

    post-1022-1218727392.png?width=400

    So my thought was to implement the same code in the base class and remove the overrides. Now the problem is that in order to make the code work in the base class I have to give it the same controls in the private data. Therefor now the functions always save that data to the ini file regardless of what child class I wire to it.

    Is there any way around that? Can I cast the data dynamically to the data type of the child class that is wired to it? Or am I just completely misusing the inheritance here ;-)

    Any help is appreciated. For now I will continue with the identical overrides.

    Cheers,

    Heiko

  20. QUOTE (mballa @ Aug 13 2008, 01:48 PM)

    Here is a workaround:

    When this happens, you can click 'pause' on the main editor window, then the color picker pops up, you pick your color, and then you unpause the main editor and everything is working fine again.

    Not ideal, but at least it lets me continue to use the editor :-)

    Cheers,

    Heiko

  21. That reminds me of the guy I saw on TV while I was at NI week. He actually spent over half an hour lecturing about the fact that there is no real evidence supporting plate tectonics and that the earth is really hollow. His theory is even on WikiPedia so it has to be true :-)

    QUOTE

    Better than travelling on a Canadian Greyhound bus.

    For those folks who do not understand that reply, check this out.

×
×
  • Create New...

Important Information

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