Jump to content

EJW

Members
  • Posts

    70
  • Joined

  • Last visited

    Never

Everything posted by EJW

  1. This maybe due to the timer resetting itself. try changing the off value to 0 and see if this works. if it does, you can either leave it like that, or we can go the messier route of using shift registers to carry around the current timer value.
  2. Unfortunately the computer clock can't always be counted on, but i modified your vi so that it should work for you now. If it looks like it slows down or speeds up, that is just your system's ability to keep up, it may actually be running properly, but the screen updates happen too slow. By the way, i forgot to mention that i changed the clock from 1KHz to 1KHz®, which resets for every iteration. you could use a shift register and the output node to get the second frame's ending time and add that to the off time and keep looping that into the 't0", but that gets messy and it is possible for the timed loop to get farther ahead while your doing the math and then it misses. I also removed your extra local variable and have your high (T) wired directly to the terminal for the indicator. Minimize the use of variables to keep memory/processor overhead down. Hope all this helps. Good Luck!!! Download File:post-3482-1166042884.vi
  3. Check out the following links, they should be a good starting point for you. NI-VISA Overview 9-Bit Serial Writing in LabVIEW Accessing one COM port from diffrent locations within a VI Async Serial I/O Using Events and VISA COM Interface
  4. It will mainly depend on what type of data you are streaming and what you are streaming from. Many serial devices have their own way of sending data and you need to know how to decode the data as it is received. After you have determined what type of data it is sending you and how to properly decode it, you can then build an appropriate program around it.
  5. Nothing wrong with a global variable if you are using it as a read only variable AFTER initialization where you write to it once! Even a global used for data read from a daq device is no problem. You write to the global as the output from the daq read and read from it during processing. Properly used, globals can be very useful. :2cents:
  6. If you want to use a control that has a front panel multiple times within one vi, the only way i know of is to use the subpanel control. This is accessed from the front panel controls- modern - containers - subpanel. This allows you to show multiple vi front panels. You need one subpanel for each instance. Otherwise, the ideal thing to do, would be to create your front panel controls on one vi and use a subvi of your timed loop multiple times on your block diagram.
  7. WOW!! That's a lot of VI for such a simple thing. I pressed the "Easy Button" (thank you Staples), and have attached a much simpler VI. Hope this works for ya! Download File:post-3482-1165528964.vi
  8. Christina, if you check support reference #7122877, i had a similar issue, which was resolved with the release of 8.2 ---- they had considered it a severe bug at the time and corrected it in time for 8.2 shipment.
  9. I have either really stumped everyone, or no one uses DLLs enough to have an answer ! :headbang:
  10. I really have no idea why I quoted myself. "I really have no idea why i quoted myself."
  11. Attached is a simple project where i try to create a DLL with a 2D array as an input. When I try to build the DLL and define the prototype, the builder does not seem to recognize a 2D array as an array. Consequently, if you try to build a test vi and define the prototype manually (using Call Library Function Node), it really does not like it, (crashes) The problem appears to be in the builder itself, as it is not recognizing a 2D array. Anyone with any thoughts to this please respond. Download File:post-3482-1164909520.zip
  12. Actually, in the real program, there is a multiple channel/single point data acquisition ocurring, and monitoring of a DIO card during the timeout state. The various steps (1-4) would coincide with my finite data acquisition (approx 5000 samples per each of 8 channels - 40K total), followed by a process , status, update, and output state, then back to the timeout state providing there wasnt an error generated which is then handled by the error state first. I was using the timeout on the event structure to trigger the timeout state and still allow full UI functionality.
  13. :question: I have attached a simplified version of a state machine i am using in a large program. I am curious as to what the experts think on my particular implementation of it is. Does it look redundant, awkward, etc. Any ideas on improvements? The event structure also handles user events, i left this out in my example. Download File:post-3482-1160058566.vi
  14. Download File:post-3482-1157995331.vi I used the code at the above URL to make a VI using .NET that allows for inputs of Initial Directory, Filters, FilterIndex and Multiselect options (of course Error In) The outputs consist of an array of filenames and the dialog status (OK or Cancel) and Error Out. Hopefully this will be useful to you. You can change the default All Files to Text Files easily enough. The VI is attached. Eric
  15. Unfortunately this is typical behavior of a file dialog box in Windows. Labview appears to only access the standard file dialog. When using things such as the Visual Studio environments, the "All Files" can be removed as you have access to more lower level functions.
  16. I tried that in Labview 7.1 and it does not seem to work with records. (Its says it does.) I am trying to do this in 8.0.1 which says the offset is in bytes only ( i guess i could try records, but i doubt it works). BTW, in Labview 8, SEEK has been changed to SET FILE POSITION.
  17. I have been looking for a way to use random access files in labview. The closest thing i have seen is the datalog files, which are not completely what i am looking for. The datalog files can randomly read, but they only append to the end of the file. What i need is a way to read/write randomly to a specific location/record in a file. If i want to update record 15 with new information, i don't want to have to rewrite the whole file!! Any help is greatly appreciated. Eric
  18. Does anyone have a clue how to set up a syntax checker. Here is the issue: I have an input form for a user that includes a string control where they can type in a formula. There are 6 variables allowed, the parentheses (), and the boolean operators "AND" and "OR". I want to somehow be able to check to make sure there are no errors in the formula, for example, a missing parenthesis, or a misspelled variable. A formula like this : (VARIABLEA AND VARIABLEC OR VARIABLE B would be incorrect because the ")" is missing after "VARIABLEC" Please HELP!
×
×
  • Create New...

Important Information

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