Jump to content

lvb

Members
  • Posts

    209
  • Joined

  • Days Won

    6

Everything posted by lvb

  1. QUOTE (ASTDan) 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?
  2. 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!
  3. QUOTE (Ton @ Dec 9 2008, 10:24 AM) Looks great, but how can I obtain that property node?
  4. 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:
  5. 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!
  6. Where did the App:Project.ActiveProject property node come from? I have been looking for this feature for since the project was introduced. It definitely is not in the NI Class Browser.
  7. QUOTE You need to obtain a reference to the Root of the Project and then read the ProjectItem "Find Items with No Callers" See below:
  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. Looks like an interesting idea. I am about to download and test this out. Expect some feedback soon.
  11. 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.
  12. 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...
  13. QUOTE (jgcode @ May 12 2008, 12:02 AM) 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.
  14. This seems like a bug to me. When showing the scrollbar of the Waveform Graph, the maximum number of plots created (ever) is displayed.
  15. 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. Thanks!
  16. QUOTE (Michael_Aivaliotis @ Apr 29 2008, 01:12 AM) 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!
  17. 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. 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. 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...
  18. QUOTE (Michael_Aivaliotis @ Apr 28 2008, 07:11 PM) Michael, I have attached a screenshot of the event for my VI. Update Value while Typing is enabled. I have been able to use the Key Repeat? event to stop the issue in item #1, but have not been able to figure out a way to prevent the user from pasting in data and bypassing the event structure. Please let me know if there is a way to do this! Thanks http://lavag.org/old_files/monthly_04_2008/post-4274-1209425544.png' target="_blank">
  19. 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: 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. 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!
  20. 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.
  21. QUOTE (Phillip Brooks @ Apr 4 2008, 06:49 PM) Actually that address is in my original post under the "here" link...
  22. 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
  23. Nice to know they are now selling it as an individual module. Last October, I had a spare IEPE 9233 I wanted to use with the carrier. I had to purchase a USB-9421 just to get the carrier module!
  24. QUOTE(crelf @ Feb 16 2008, 06:16 PM) I was attempting to use the XML file as a last resort. Has anyone made any discoveries if using DAQmx property nodes?
  25. In the "Project Explorer" for a .lvproj file, you can create NI-DAQmx tasks/scales/channels. I am looking to modify these dynamically and achieve the following goals: How to read all channels/tasks/scales in a project? How to write a channel/task/scale in a project? How to delete a channel/task/scale in a project? Below is some code I used to detect what DAQmx items exist, but how can I acess them using the DAQmx property nodes dynamically? Thanks
×
×
  • Create New...

Important Information

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