Jump to content

Jim Kring

Members
  • Posts

    3,905
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by Jim Kring

  1. We are having problems with representing Strain outputs on our display.

    the strain input is a varing voltage which is to represent 5 volts = o strain,

    0 volts = -2500 micro-inches Strain , and 10 volts = +2500 Strain.

    basically we can't seem to get the math formula right which will give us the true

    neg and pos values in micro-inches.

    :headbang:

    2664[/snapback]

    In the units you specified, I think that the equation would be:

    Strain = (500 * Voltage) - 2500

  2. We are running a test on a circuit board. In order to test the unit we are required to use a .dll that the client wrote. The problem is if the board is bad the .dll hangs. Because the board is a security device we are not allowed to mess with the dll in any way and the source code is not available. The only way to fix the problem right now is to go into task manager and end the process.

    Does any one have code that will do this programmatically or know what the API call would be

    2429[/snapback]

    Here are some VIs that use system exec to execute the tasklist and taskkill commands.

    Download File:post-17-1098386155.zip

    -Jim

  3. :!: Today, I discovered a serious flaw in the following FlexMotion VIs:

    Wait for Blend Complete

    Wait for Move Complete

    Wait Reference

    The problem is that when an Error is passed into them they do not pass the "Board ID" or "Axis" values through, as one would expect. Here are some screenshots of the offenders:

    post-17-1097219935.png?width=400

    post-17-1097219942.png?width=400

    post-17-1097219948.png?width=400

    This can cause huge problems downstream. For example, here is some code that I wrote as part of a move command. If the move fails, I want to kill/abort the motion. But, since I no longer have valid "Board ID" or "Axis" values, the abort call fails (this is VERY bad :thumbdown:). You can see some code which is exposed to this flaw, below:

    post-17-1097219927.png?width=400

    :lightbulb: The only suitable workaround is to not, use the pass-through values, as shown in the work-around below:

    post-17-1097219954.png?width=400

    Lucky for me, I didn't crash a motion axis before I discovered the bug.

  4. Heck! I haven't even got XP to run the way I want yet. :blink:

    One of the things I have to get around to. The thing is, everyone test their pages on IE. A lot of people are recommending Opera.  ????

    Feel free to jump in everyone! (like you guys need an invitation

    :gathering: )  After all, this is the lounge.

    1985[/snapback]

    The only thing that I use IE for is running Windows Update. Get Firefox!

  5. I have seen and tried to use this before. Sometimes it worked fine and in other areas it did not let me run my code. I had a snippet of code that I wanted to comment out, and the coditional worked fine for that. When I commented out a non-executable VI, the diagram looked like it compiled (good run arrow) but I could not run the VI, it errored on execution.

    Too bad, since this would be a very good feature to have to share sections of the same VI that is being worked on by more than one person.

    Mike

    1935[/snapback]

    I have heard that the "Conditional Disable Structure" does not work for blocks of code that call subVIs. Maybe this is why you ran into problems, on occasion.

  6. Almost like having a LabVIEW Service that is invisible and a Monitor/UI (in System Tray or not) that is the only part we "see".  This is the method I am implementing at the moment on a project that spawns communication handlers. I had observed that occasionally the spawning would hang. Not good in a distributed Client-Server architecture.

    Mike

    1932[/snapback]

    This is exactly the problem that I am having. I am spawning communication handers and my application stops communicating when the root loop hangs -- For example: when the General Error Handler (or other dialog) is open. Talk about annoying!

  7. What is "xeyes"??

    1961[/snapback]

    xeyes is an application that has a window with two eyeballs that look at your mouse position, presumaby so that it is easy for you to know where your mouse pointer is located. It is available on almost any Xwindows system (used for Linux displays). I opened the xeyes app so that it would be obvious that it was a linux environment. If you want to try out xeyes, there is a Win32 version that you can download from here:

    http://www.shemesh.biz/code.html ==> Win32 Xeyes

    -Jim

    PS - your desktop picture is scary :o

  8. Ok, I'm starting another useless thread. :P

    Here are some screen captures of my desktop with the ultimate. Four versions of LabVIEW running at the same time. I challenge someone to beat that. :yes:

    I'm also showing my desktop... naked.

    post-2-1095988181.jpg?width=400

    post-2-1095987871.jpg?width=400

    Show us your desktop...

    1952[/snapback]

    I do Linux development on my Laptop using VMware Workstation (an x86 emulator), and I have 3 LabVIEW for Linux versions installed in addition to the four versions that I run on Windows XP.

    :rolleyes:

    post-17-1096006706.png?width=400

  9. I've found this remarkable counter intuitive piece of code today...

    What's wrong with it :question:

    Thanks for the lightbulb mode :lightbulb:

    1810[/snapback]

    After thinking about it, I thought that you had hidden a feedback node:

    post-17-1095533311.png?width=400

    But, after reading your hint about data sources, I realized that the code "makes sense":

    post-17-1095533322.png?width=400

    • Like 1
  10. Well that's a neat trick! :worship:

    This normally generates an error in LV (broken wire). You can't have the output of the array feeding into the equal function. Object is member of a cycle.

    "These wires form a cycle, making two parts of the diagram interdependent, so each must wait for an input from the other and neither can execute."

    I assume there is something else you're not showing us... :nono:

    1811[/snapback]

    I see the same thing!?

    post-17-1095488069.png?width=400

  11. Hi,

     

      Sorry for this new topic, I'm not able to find the old one in the forum.

      Thanks to Jim for his appropiate response. 

      Just one more thing, I've made the vi with the these subvi's:

      Init Server-Server Login-Send Data.

    I'm able to execute the first and the second but I have a problem in the third one because although I'm able to execute without problems I'm not able to send the e-mail because the SERVER answers this:

      "SERVER:  503 MAIL FROM command must precede DATA"

    Jim I suppose you know what is happening. Could you help me one more time, please?

    Thanks in advance.

    Kind regards.

    Jose.

    1709[/snapback]

    If you are referring the Dev Zone forum thread, it is located here.

    You need to send the following command, first:

    MAIL FROM:<you@email.com>

    Take a look at "OGIC_SMTP_Main.vi" which provides a working example.

    Regards,

    -Jim

  12. Hello everyone,

    Here's the puzzle :!: :

    I'm trying to obtain 2 functions from 2 different dll's with the same name and same interface at the same time.

    Is this possible in LabVIEW.

    Thanks

    Ruud.

    1684[/snapback]

    In my experience, LabVIEW cannot load two different DLLs with the same name at the same time.

  13. Hello,

    I'd like to send an e-mail from Labview, for this purpose I'm using a library call ogic-smtp from openG web site.

    My vi consists of three functions(subVIs):

      Init Server-Server Login-Send Data

    Everytime I run the VI this message pops up:

        "Error 1055 ocurred at Property Node in OGIC_SMTP_InitializeServer.vi --> SMTPAutentication.vi.

      Possible reasons:

      Labview: Object reference is invalid. "

    I'm new in Labview and I'm a little bit lost, could someone guide a little bit, please?

    Thanks in advance.

    Jose

    1663[/snapback]

    Wire a valid string control reference into "Server Response IN". This is used by the VI for sending status information to a user interface.

    post-17-1094567810.png?width=400

  14. Jim,

    I think I understand what you're saying however the problem that I'm running across is that basically I want to create a control once using it as a template to save typedefs off of.  From there I then can iterate creating and saving new typedefs off of that one template control but changing labels and stuff like that.  After that is complete, I made a VI that can make an old style global vi using each of those typedefs as the input and output.

    I hope that made sense  :)

    Derek Lewis

    1559[/snapback]

    I suggest that you work on an example, and let others help you along.

  15. Hi Everyone,

    :question:

    I've got another question.  Is it possible to create a typedef or strict typedef using the New VI object and New VI function.  I've been able to create a control vi but I haven't been able to change it to a typedef or strict typedef control. 

    Thanks for the help,

    Derek Lewis

    1557[/snapback]

    Hmmm, it might be possible, but what I think you want to do is create a CTL file (which is a VI of type custom control) and then set it to be a strict typedef. Then drop this item using the New VI Object function, using the typedef CTL file's path as the source of the new object.

  16. I didn't write LabVIEW and I don't know exactly how the guts of it works, but it appears that the Root Loop (a synchronous task handling loop at the very core of LabVIEW) hangs when the pull-down (or Run-Time) menu is in-use, a pop-up menu is in-use, or a dialog (such as the error dialog, file dialog, etc) is open.

    By "Instantiate New VIs", I mean:

    • Open a VI Reference to a VI on disk that is not already in memory
    • Open a VI Reference to a reentrant VI, thus creating a new instance
    • Open a VI Reference to a VI Template on disk, thus creating a new instance

    The implication of this fact is that one cannot:

    • Spawn a process using either the VI Template or Reentrant VI approach
    • Instantiate Instances of OpenGOOP objects (which use a reentrant VI instance as the data store)

    This is too, bad since spawning VIs is a very powerful technique. Is this a problem/bug for the majority of the power-users out there? IMO, process spawning and GOOP are very important design patterns that my applications cannot live without.

    Is there something that I missed and is it possible to get around this issue?

  17. Often you find the need two run an instance of the LabVIEW development environment on the host PC and the RT target simultaneously. This is useful for debugging a client-server applications where you need to debug the client and server simultaneously. This is very easy to do in Windows. Take a look at the following FAQ: How to run multiple instances of LabVIEW

    You can create two batch files that will each open a new instance of LabVIEW...

    L_Drive_LabVIEW.bat

    subst l: "C:\Program Files\National Instruments\LabVIEW 7.0"

    start l:\labview

    M_Drive_LabVIEW.bat

    subst m: "C:\Program Files\National Instruments\LabVIEW 7.0"

    start m:\labview

    When you reboot, the L:\ and M:\ drives will disappear. Or you can use the /d switch to delete the temporary drives. Use the /? switch for more info on the SUBST command.

  18. Norm,

    Set a session cookie with a unique session ID once the user successfully logs in. This cookie will be destroyed by the user's browser when they close their browser or there is inactivity (~20min). You can also destroy the session on the server side, by overwriting the cookie and destroying the session ID in your "active sessions" look-up table. On the server side will will need a map (lookup table) between session IDs and user/session information. PHP, for example, stores these in files located in the temp dir:

    /tmp/sess_{SESSION_ID}

    Best of luck,

    -Jim

  19. Michael, it is possible and much easier than I first thought.  Here (attached) is a working, and fairly complete solution -- it supports compound types including nested variants (variants containing variants).  It is currently sub-optimal for arrays, which can be improved... but that solution is also non-trivial  :laugh: 

    Jean-Pierre (et al.), I was thinking that we could use this VI as a replacement for "Remove Typedefs from Variant" in the lvdata package.  Maybe we could add a "Recursive?" boolean argument that defaults to FALSE so that the original behavior is preserved for existing users (but would they even want the original behavior?).

    Any thoughts?

     

    Cheers,

    -Jim

    1279[/snapback]

    I had a lapse of reason -- the VI that I wrote doesn't coerce variants, it strips typedefs. I solved a different, but related problem. I'll think about the original problem some more.

×
×
  • Create New...

Important Information

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