Jump to content

lvb

Members
  • Posts

    209
  • Joined

  • Days Won

    7

Posts posted by lvb

  1. After installing a bit of NI software and going through a few upgrades, I feel that there is too much un-necessary NI software continuously running in the background and at startup. This thread is to discuss what software and services can be set to launch in manual mode when necessary along with what is absolutely required.

    The ideal situation would be to create a batch file that can launch and kill the necessary applications and services. For instance, a batch file for using MAX, LabVIEW, TestStand, and so on.

    I have attached my current task list and startup service list for reference. A few things to note:

    1. There are 101,632KB of programs running after I start my PC!

    2. There are 14 services that are launching during startup (automatic mode)

    3. The following services are under the nipalsm.exe process:

    • NI-488.2 Enumeration Service [ni488enumsvc] - 3,312KB
    • NI Device Loader [nidevldu] - 15,772KB
    • NI-Motion Device Manager [nimcdldu] - 6,208KB
    • NI PXI Resource Manager [nipxirmu] - 6,012KB

    4. I am using sysinternals process explorer (http://download.sysinternals.com/Files/ProcessExplorer.zip)

    Let's discuss how to reduce the footprint of the NI software and how we can selectively launch the required applications when we want to use NI products.

    Thanks!

    post-4274-1235573202.png?width=400

    post-4274-1235573225.png?width=400

  2. QUOTE

    You seem to have two questions, one is about <1ms timing, which is hard but not impossible. How are you going to measure that time? That should dictate at least part of your design. I don't think either of your use cases bear any relation to sub-millisecond timing.

    The use case is a simple example that I created, not a real-world implementation. The main design question is how to obtain an accurate sub-msec timing in a sequencer where events may be scheduled at varying times without an extremely resource-intensive polling loop.

    QUOTE

    The other question is whether a stopwatch-like app should use relative time or absolute time. I would vote for absolute time because your timing code may have bugs (which you will eventually fix, of course) whereas the OS time is generally correct already.

    As far as the relative vs absolute time, I was attempting to implement a "pause" condition which meant the alarms could be delayed. This would mean the alarm times could be delayed while the sequencer is active.

  3. QUOTE (ASTDan)

    I like using change detection events

    You can incorporate this into an event loop. I usually use a producer/consumer archtecture with the events being the producer and a queued state machine as the consumer.

    You could set up a counter timer channel to send out a pulse every millisecond and wire that into a change detection digital input.

    Thanks for the reply Dan. That would be a great solution for hardware triggering, but the use case I was considering would not involve DAQ hardware. Any ideas for this?

  4. I I have recently been reviewing design patterns. During this, I came up with a use case that requires high precision (< 1 msec) event triggering.

    A sample use case would be to create an alarm application that would show a user on-screen messages or log messages to file at a specific relative time. Instead using absolute time as a time base, I thought that relative time should be used, as in a stopwatch. Alarm times could be entered by a user programatically. Furthermore, the user should be able to pause and resume the stopwatch.

    Is there any type of architecture beyond a while loop running every 1 msec that would be appropriate? Is there a way to code this without polling?

    Just pondering, please share your thoughts!

  5. I have been working on creating a VI that I can place in the startup folder of a computer. I would like this VI to launch a specific LabVIEW project and the main VI. Attached is the block diagram that will properly launch the project, but I am having issues launching an instance of the main vi that resides within the project.

    If I use a "static VI reference", when opened, the main VI is not in the namespace of the project (the VI's active project is null). This behavior is similar to opening the VI from windows explorer.

    I would like the main VI to launch as if I opened it from the NI project explorer for the specified project. This would result in the VI's namespace/active project valid.

    Any hints? I have attached my current block diagram below:

    post-4274-1228832454.png?width=400

  6. Dan,

    I have run into this issue also. One example: my office network has a very deep path for active projects, by the time you get to the LabVIEW folder the path is already 100 characters!

    Anyways, you can use a "junction" for folders or a "hard link" for files on Windows using the Link Shell Extension

    Install the link shell extension, select your root labview project folder, then drop the junction at a shorter location. I like to drop all my junctions in C:\LabVIEW\ for my active projects.

    You now have a working path and did not have to move any files!

  7. QUOTE

    Does it mean I will have to get the reference of all the items in my project and use the "callers" properties to find those with no callers ? :o

    I'm not being lazy... I just wouldn't like to re-invent the wheel :shifty: .. plus the help for "Find Item With No Callers" says it might not be private forever...

    You need to obtain a reference to the Root of the Project and then read the ProjectItem "Find Items with No Callers"

    See below:

    post-4274-1225166861.png?width=400

    • Like 1
  8. The FIRST robotics season is coming up shortly. Given that most high school students are very web-centric, I could see LAVA with an influx of questions related to the cRIO and the FIRST specific toolkit. Would it be wise to create a FIRST robotics sub-forum on LAVA?

  9. A few great things about this package:

    1. Maintenance Electricians understand ladder logic (coils/contacts/...). Most electricians don't like variables and programs (anything else running on a computer).

    2. The production world thinks "stability" when they think of ladder logic. They think "instability" when they think of computer programs (i.e. Windows). This can bridge the gap for NI in the production world.

    3. Under the hood, the user can run custom VIs. Both worlds win!

    One mega-disadvantage compared to PLCs:

    Programmable logic controllers have the ability to make program modifications online (while running a program). There are limitations of online edits, such that the user variable storage is fixed. However, changes in logic are possible without disrupting a production line. If NI could develop a way to allow for online edits and with the ability to program in a familar language, I could see the real-time/cRIO market become a viable option.

    -Brian

  10. I have run into this decision a few times. My final solution was to create a functional global with the following actions: Init, Write, Write Line, Read Status, and Close. A boolean array or single line was used for the input and a global virtual channel was used to specify multiple individual channels.

    One "trick" that a few don't realize is that DAQmx Read can be used on output analog channels, digital ports, and digital lines! Note: This doesn't work on some devices or on simulated devices.

  11. After using Vista for 6 months, I am downgrading to Windows XP.

    1st issue: I have to buy a new scanner and webcam that was "compatible" with Vista

    2nd issue: General stability. Vista would seem to crash and "lock-up" when doing simple tasks like using Outlook and Firefox. I have become intolerant of the "spinning circle" (the new hourglass)

    3rd issue: Performance. I really don't see any performance improvements in Vista. You need a ridiculous amount of RAM and HD space to run the operating system.

    On my laptop, I actually switched from Vista Home to Ubuntu and find it easier. Ehem, LabVIEW runs on Linux also!

    Just my 2 cents...

  12. QUOTE (jgcode @ May 12 2008, 12:02 AM)

    What about trying this?

    You can access the element's reference thru the cluster's reference by right clicking

    ASTDan, thanks for the reply. I have been currently using the methods you demonstrated (using a enum typedef for the array index). The limitation to this is that if you re-order the controls of the cluster your refnum index is no longer valid.

    jgcode, this is exactly what I was looking for! Sometimes you just have to dig a little deeper within LabVIEW because there are so many features.

  13. I recently ran into an issue that I thought I would bring up on the LAVA forums.

    When dealing with clusters, I have had situations where I would like to access property nodes on specific controls within the cluster. In the past, I have used the Label.Text to identify the desired control and eventually migrated to a enum typedef representing the "order" of the control. This would allow me to rename the labels without breaking my code and upon re-ordering the cluster, I could just update the typedef which would apply all changes on a global basis.

    Are there any other ways of obtaining a strict reference to a control of a cluster that is "absolute" (I don't have to search for the Label.Text in a for loop or use my enum method)? I find it interesting that I can create an implicit reference, yet I cannot obtain a refunum from this property node.

    Image:Implicitexplicit.png

    Thanks!

  14. QUOTE (Michael_Aivaliotis @ Apr 29 2008, 01:12 AM)

    Not sure why it's a good thing to prevent ctrl+V. This is a very useful UI capability and crippling it is bad I think. Of course it depends on the application. I guess you don't want it here.

    I'm not sure why you don't use the "value change" event. It traps everything if "Update Value While Typing" is on. However I must admit I learned something new today. Shift+Insert does not fire a value change but Ctrl+V does. Is this a LV bug? Who the hell, besides probably Ben, uses "Shift+Insert"?

    Michael, thanks for the response.

    Point #1

    I am trying to limit a text box to the following constraints:

    • 1st character must be a letter.
    • 12 characters maximum
    • Valid characters are: a-z, A-Z, 0-9, _

    I started this filtering with the mouse down and was more interested in learning about the "quirks" of this approach than the value change. Using the value change, and the string subset commands, I could extract the last character and filter the control.

    However, with this approach, there is one issue that I have not solved yet: when pasting a large line of text and filtering (via overwriting the local variable), the pasted text is sometimes displayed for a few msec, which makes it appear to "flash". Do you have a solution to this?

    Point #2

    QUOTE

    Who the hell, besides probably Ben, uses "Shift+Insert"?

    Linux users unite!

  15. This thread is solved!!! With a little elbow grease, and credit to Ben here, I have a VI that will prevent the user from pasting into a string control.

    A few "tricks"

    1. The paste command (CTRL+V) is detected by the Menu Selection? (App) event.

    post-4274-1209430439.png?width=400

    2. The good old linux SHIFT+INSERT is not detected through the Menu Selection? (App) event. Not sure why this is inconsistent, but... We can use the Key Down? AND Key Repeat? events to filter this.

    post-4274-1209430397.png?width=400

    Through my testing I have not found a way to paste! Single presses and holding down CTRL+V, SHIFT+INSERT no longer works! Your comments are welcome...

  16. I thought that I would stir up a conversation regarding the proper way to filter string controls for input.

    I was attempting to create a code reuse merge VI for filtering a string control and ran into a few important points:

    1. The Key Down? event does not detect "repeat" keypresses. For example, if you press and hold any key, the event structure will only fire once. All remaining "repeats" of the character will not trigger an event. Thus, the user can enter any character even if you use the Discard? terminal.
      To solve this, both the Key Down? and Key Repeat? should occur in the same event case.
    2. Pasting text into the string control will not be captured by the Key Down? event (sounds logical)

    In summary, it seems that only the "Value Change" event is capable of truly limiting string control input unless there is a way to stop the paste event.

    Your opinions and comments are welcome!

  17. I often create typedefs that are used in various places of the front panel. One convenient technique I like is to create a classic transparent cluster, allowing me to arrange the cluster elements in any manner on the front panel. In fact, when I took the LabVIEW Intermediate course, this technique was used. The only drawback to this is if I change an element of the cluster typedef, the cluster is re-drawn on the front panel even though Autosize is set to none. IMHO, it would be nice if the cluster was not re-drawn upon adding/removing/changing data type of elements from a cluster typedef.

    As of now, I know no work arounds. Please feel free to comment on your experiences with this!

    Please see the attached picture for an example.

    post-4274-1209147001.png?width=400

  18. I am creating an application that is simulating a 10-turn pot. I figured that I would probe the community to find out if this exists anywhere and for advice on how to implement this control.

    So far I have found a resource here, but it limits user input to the increment/decrement buttons (does not allow the user to rotate the wheel).

    The one roadblock I see in creating a control would be detecting if the wheel rotation direction. For instance: Given a 360 degrees of rotation, has rotated in the clockwise or counter-clockwise direction when transitioning between values (to account for roll-over).

    Any info would be appreciated!

    Thanks

×
×
  • Create New...

Important Information

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