Jump to content

tetrarch

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Posts posted by tetrarch

  1. Related topic/poll:

    What is your Desktop Icon and Shortcut philosophy? 

    6058[/snapback]

    F) other - the desktop is never visible long enough to see any icons

    And although it's not directly relevant, with coLinux and cygwin there's a free alternative to VMware if you want to get Windows / Linux LV sessions running side-by-side. Best of both worlds: all the ease-of-use that Linux provides, combined with the legendary stability of Windows!

  2. Hi Tom,

    Thanks for your prompt answer.

    Labview version is 7.1

    Linux distribution ---> Debian

    I used "make" command to make *.lsb file, and Makefile content is as follows:

    6040[/snapback]

    Okay, looks like you may be missing some of the development packages. Try this:

    dpkg-query -s libc6-dev

    and if you don't get something like this:

    Package: libc6-devStatus: install ok installed

    then you're missing the C library development package, which means you need to install it using this:

    apt-get install libc6-dev

    If that doesn't fix it, let me know.

  3. Hi all,

    I am a begineer to Labview and Linux. I would like to use external codes in Linux Labview. When I make *.lsb files, I encountered the following error:

    /usr/bin/ld: crti.o: No such file: No such file or directory

    collect2: ld returned 1 exit status

    make: *** [avgv1.lsb] Error 1

    Any one knows how to tackle this problem???

    Thanks in advance,

    "biorobot"

    6038[/snapback]

    That's usually caused by not having a dev package installed - ld (the linker) is being called without a path set correctly, or with a missing file (crti.o, one of the basic C runtime object files).

    To properly help, it'd be useful to know the following details:

    * Labview version

    * Linux distribution (Redhat, Debian, Slackware, etc)

    * Command you use to make the LSB file

    * The output of the "uname -a" command

    since Linux can come in many different shapes and forms.

    cheers,

    Tom

  4. This is probably an easy one.  But I'm not sure if I'm missing something.  :(

    One of the tools our company purchased recently was the State Diagram Toolkit.  For the type of programing we've been doing, this a nice, simple tool that I've found very useful.

    On most of my applications, I end up adding a "Wait" or "Wait Until Next Multiple" in my main loop.  Usually just 10ms or so. 

    I'm doing this with the intention of freeing up a little CPU time when operations aren't time critical.  But being fairly new to the whole LabView environment, I'm concerned I may be committing a faux pas or be guilty of employing bad technique.  (No point in developing bad habits if I can avoid it)

    There are some "States" in my current project where I'd like the code to process as quickly as possible.  (Re-sizing and saving images)  But I notice poor front panel performance (lagging mouse and keyboard etc.) when there is no "Wait" function in my main loop.

    My question is; Am I asking for trouble by doing this?  Is there a better way?

    Thanks.

    6009[/snapback]

    The wait function will normally happen in parallel with the rest of the code, so if you have something that takes more than the 10ms, there won't be a problem, and if it takes less than 10ms, it'll free up some time for the rest of the system to do its thing. Putting a wait in the main loop is generally a good idea.

  5. Hi

    C++ is just another dialect of C sometimes worse to read but essentially the same.

    The only problem for LabVIEW is the name mangling used is C++++ function calls to make overloading of names by the programmer possible.

    Export your externally needed functions in c-style and you can call from LabVIEW.

    But.. in fact the advise from Michael (writing in LabVIEw) is an even better response.

    6001[/snapback]

    Standard Linux distributions come with the GNU compiler, which can handle C, C++, Java and a few other options as well. Usually something like:

    g++ -Wall -olibrary.o -c library.cpp

    will create an object file from a C++ source file.

    C is a "subset" of C++, much of the basic syntax is similar however C has no support for classes, overloading or the OO side of the code, so rewriting good C++ code in C is usually very timeconsuming, and in this case, there's no need.

    Make sure any functions that need to be called from LabView are exported with:

    extern "C" {...function prototypes...}

    and you should then be able to use CINs to access C++ functions. The guide in the Labview bookshelf has more details on compiling - where it talks about C, C++ works just as well.

    As a last resort, you could consider copying and pasting the code into a formula node...

  6. I have got a disc of LabVIEW which could be installed in Windows, I wonder if I can also install LabVIEW with the same disc in Linux. If yes, can I just install it in Linux by just putting the disc into the CD-rom? Sorry for my ignorance, I am not that familiar with Linux. Thank you for your attention~

    5940[/snapback]

    No, the Linux and Windows versions are very different. You'd need to buy the Linux edition separately or contact NI directly about it.

    NI Linux page

    Installation under Linux is straightforward enough (run one of the programs on the CD).

  7. Slap an old style flat boolean on the top of your existing indicator, color it 'transparent' (both states) and use that control to trigger you additional displays.

    Sparc

    4875[/snapback]

    or if you have event support, create an event structure to handle "mouse down" or "mouse up" events for the existing LED.

  8. Very Interesting Jim,

    I definitely need to look into GOOP design.  Do you know of any good websites out there that explain GOOP and its functionality?  I downloaded the OpenG GOOP toolkit but a lot of it doesn't make sense to me.

    Thanks,

    Derek Lewis

    3439[/snapback]

    Plenty of links here. Some of them might even still work... you might want to read up about OO design methodologies and UML notation, if any of it is unfamiliar.

  9. Hi, I tried it, it works, but only if you have .NET installed. Not everyone has this, so I would rather have a way that works on all common configurations. Is there no API-call to kernel32.dll or something similar?

    3156[/snapback]

    NtQuerySystemInformation used to be the popular way of getting the right information. MS now recommend using other functions though (linked on the same page). Not sure how easier it's going to be to get LabView to handle the datatypes...

    This CodeProject page might also be of some assistance.

    Another approach which may or may not be better is to use the PDH.DLL (Performance Data Helper) functions. Can't remember what the general availability is (might need to distribute the DLL with your app?). They query the performance counters, which are sorta designed for this task, so they might be the best bet.

    cheers,

    Tom

  10. Here's an "all-round general" VI for CRC calculation. The polynomial needs to be translated from equation form into numeric representation - one bit per power of X. In your case:

    x^16 + x^15 + x^2 + 1

    so that's something like 1 1000 0000 0000 0101 in binary (or 18005 hex).

    No guarantees that this works (I put it together a while ago for a quick data check, and didn't need it to conform exactly to the CRC standards), but it should give you a starting point. Search for "CRC polynomial" and you should be able to get more information about how things are calculated.

    PS. Many CRC implementations also have a starting value (often 0xFFFF for 16-bit, or 0xFFFFFFFF for 32-bit) and a final XOR value (again, 0xFFFF is common).

    Download File:post-607-1103278851.vi

×
×
  • Create New...

Important Information

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