Jump to content

Sparc

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Sparc

  1. Reminds self to be more pedantic when posting.
  2. QUOTE(Gavin Burnell @ Jul 6 2007, 02:35 PM) These functions are substantially slower than the raw Flatten/Unflatten. Fine for a final write out to file, but not something I'd want in a loop. Sparc
  3. Plain labels don't have property nodes. Use a string indicator with a transparent background and border instead. The Classic Controls->Strings->Simple String is ideal for this. Sparc
  4. In somewhat never ending attempt to get some of LabVIEW's UI controls to behave more like traditional Windows controls I have long sought for 'smooth' scrolling arrays. Now, using splitters and panes I finally have an array of clusters that will scroll smoothly. Feel my joy! Now that I have achieved this, I want to tab through the elements for data entry. I can get the focus rectangle (KeyFocus) to the controls in the cluster (in the array) and it will cycle through them, however it only cycles through the controls in one element of the array. How can I make is so when the last control in the cluster has the focus and the user presses 'Tab' that the focus rectangle jumps to the first enabled control in the cluster in the next element of the array? There appears to be no subtle method for setting the element the focus rectangle should be on. I can set the 'Index Values' property of the array, but that affects the visual appearance of the array as well (causes the wired index to become the element in the top of the array). The SelStart property has no effect. :headbang: Note you can mouse click on a new element in the array and the focus rectangle will follow the mouse and not change the visual appearance of the array. Smooth scrolling array example in LV 8.2 attached.
  5. I'm spec'ing some hardware for a client. I need 12k (or more) discrete steps ramped in 500 uS. I find the NI PCI-5421 (100 MS/s, 16-Bit) and am quite happy. Until I read "Amplitude Resolution: 3 digits". I also read somewhere "AC accuracy: 1 mV". WTF? I called NI and was pointed to this as an answer. I'm not sure what that answer was other than "its a floor wax AND a dessert topping". So if you any of you guys have experience with this device can you please answer me this simple question: If I use this device to drive a 0 to 2 V ramp with 12000 steps, will I see 0.00016 V increments in the output waveform? This signal will be driving the control input for a laser while I won't be measuring the output directly, I should be able to detect the change in wavelength with another instrument. And, if you could answer how 16-bits = 3 digits I'd love to hear that too. Your help is appreciated, Sparc
  6. QUOTE(Eugen Graf @ Mar 16 2007, 03:28 PM) A NOP would still give you 100% cpu load since all it does is increment the program counter and eats up exactly one clock/instruction cycle. A loop of NOPs would indicate 100% cpu usage. It always has. If you want NOP functionality, you need to use rafa's idea of an active wait, cause thats all NOP ever did. What you want is a thread Sleep with more than 1 mS resolution (Want to me to break out my grouchy old man voice and tell you that not long ago the best we could hope for was 15 mS resolution?). As others have stated, Microsoft's Desktop OSs don't offer that resolution for a multitude of reasons, the most fundamental being you don't need it for an OS designed to be operated by humans. If you only get 100% usage while talking to your hardware and you don't have it pegged for hours on end, I wouldn't worry about it too much. But if you're hung up on it here's how you can reduce it. Run your little loop without any delay for 999 iterations. And on iteration 1000, add a 1 mS delay. Rinse. Repeat. It'd be smarter to add that little delay at some non-critical moment instead of a fixed 1000 iterations, but hopefully you get the idea. Better yet, check and see if your [wiki]DAQ[/wiki] card has any buffer memory where you can write a waveform.
  7. To update a value of a cluster, don't do it via a reference. Unless you like slow and complicated code it is usually better just to pass the value of the cluster around. Use references to affect how the cluster looks or behaves. Unless you have a compelling reason, don't use references to just to update a value. If you've found that every time you change what the cluster holds that all your sub-vis break, you should turn your cluster into a type def. Sparc
  8. Sparc

    Same VI

    Scripting features that actually modify VIs cannot be used on a running VI nor one reserved to run. New Object, for example will fail if the owner object is, or is in, a running VI. However, scripting Properties like "Is Indicator" can be used on a running VI. Sparc
  9. Provided its pretty simple data, how about displaying the data in a listbox/multi-column listbox instead? Sure, you'd have to convert it all to strings and then be limited to ~32k entries, but the scollbar works like it should. Sparc
  10. What he said. To integrate the values from a DAQ board just sum all the samples and multiply by how long the acquistion took. To do it "continuously" keep the last sum around, add the new DAQ samples to it and multiply by the time since the DAQ started (or whenever you have defined to be t0). Rinse. Repeat. Sparc
  11. The example wasn't meant to be a perfect implementation of your Action Engine, just an example that a VI could be loaded in to memory, without a Front Panel and you could access it remotely. No, it doesn't truely terminate and given the constraints of LabVIEW, it never will and keep the behaviour you want. Do note that a VI ca run to termination and not unload as long as something has an open reference to it. Also, a loop that is waiting on a queue element, notification, or an occurance consumes almost no CPU cycles. Maybe, with a little revision, you can use these ideas to make your Action Engine. Sparc
  12. Download File:post-1232-1118091909.zipShow me where I said "Use a 'Static VI Reference'" and I'll show you your mistake. Take the example .zip, only open "exe.vi" and run it. You'll see the counter increment. Close the VI. Re-open it and re-run it, you find that the counter is still incrementing. It's left as a task to the reader to implement a clean way of shutting down the tsr.vi. Sparc
  13. 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
  14. Create a reference to itself by using 'Open VI Reference" with 'Current VI's Path' wired into the 'VI Path' terminal. Store the generated reference in a shift register until you're ready to close it. Sparc
  15. Its not that "make current value default" isn't working, its the VI you're trying to operate on. When you use "make current value default" you have to save the VI to make it stick. The VI you want to change is inside the .exe. The .exe is being executed by the operating system. Generally speaking OS's lock the .exes before running them so they can't be deleted, renamed, overwritten, etc while they are running (saving the VI would overwrite the .exe). The exe is locked, and by extention so is your VI, hence the error. "Make current value default" should work fine from an .exe, just not on a VI inside the .exe. Sparc
×
×
  • Create New...

Important Information

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