Jump to content

EJW

Members
  • Posts

    70
  • Joined

  • Last visited

    Never

Everything posted by EJW

  1. QUOTE(JDave @ Nov 9 2007, 01:59 PM) Exactly. Eliminate the Case Structure altogether. Use the "Lock Front Panel Events..." checkbox for built in events to keep those from firing and user events only fire when called anyway. Example: Timeout Event--Waits for a digital input (from a PLC) to start a test (50ms timeout or whatever) User Event: Acquire-- Acquires Data, calls next user event-Process User Event: Process-- Process the data (calculations), calls next user event-Status User Event: Status-- Determine Pass/Fail conditions, calls next user event-Display User Event: Display-- Display results on screen, calls next user event-Record Data User Event: Record Data-- Records data to a file, calls next user event-Output User Event: Output-- Sends Pass/Fail and Test Complete signals via two Digital outputs to a PLC. calls timeout event User Event: Error-- Can be called from any event where an error occurs to terminate the regular cycle, or could possibly return you to the normal cycle where it left off. Now, if someone changes a setting which triggers an event to record the new setting in the registry, that will be queued up or if you set the mouse busy at the beginning of the acquire, then no one can change anything on the front panel and they have to wait to change a setting.
  2. QUOTE(mross @ Nov 9 2007, 12:54 PM) Ahh, but you can prevent the user from generating front panel input while in an event by LOCKING the front panel during an event. Most of my "states" are fairly quick. 1 second for acquisition, milliseconds in computation, display a graph and other numbers on the front panel, and trigger 2 DIO output lines. The program is part of a gauging machine in a production facility. It waits for a DIO input to start the test, does all the stuff above and waits for the signal again (about every 7 seconds) and the test time is a total of maybe 1.5 seconds with calculations.
  3. Anyone have an opinion on using an Event Structure inside a while loop as the state diagram instead of using a case structure. The program i have seems a whole lot more complicated in regular state diagram form that it would be if i just used the event structure with a few user events. My test lasts only 1 second, acquires about 4000 data points and displays a graph and writes data to a file. The main thing is capturing settings changes (and storing to registry or disk), which is easy with events, catching initialization errors such as missing config files, etc. (easy with events). It just seems to me the whole Case Structure state diagram is a little archaic since we have had an Event Structure for the last 4 Major versions of Labview. I realize this post may start a forum riot (state diagram diehards), but i am curious to know people's current opinions.
  4. EJW

    Equalizer

    QUOTE(xtaldaz @ Oct 26 2007, 02:29 PM) Thanks. Anyone else got something clever?
  5. EJW

    Equalizer

    Ok, here's one for you long time Labview gurus. I was writing my own media player in labview, and i thought it would be cool to add an EQ. Unfortunately, i have no clue how to do this. I am assuming I would use and band pass filter to get each band i want, then modify the amplitude somehow, and then, the part i really don't know, is how to combine it all back into one signal. Anyone want to take a stab at this? I'd appreciate any input, thanks much folks!
  6. QUOTE(dsaunders @ Sep 12 2007, 03:20 PM) I must be doing something wrong because it wont open the second vi, could you please post a short code example? Thanks.
  7. Is there a way to open a front panel of a second vi and have it work independently of the main program. Normally when i call another vi, the front panel opens and the main program pauses until the vi is closed and then continues on. I would still like to be able to use the second vi to progmatically change things in the main vi if at all possible.
  8. EJW

    Digital Waveform

    QUOTE(Herbert @ Jun 18 2007, 03:11 PM) How do you mean? I am unfamiliar with this.
  9. EJW

    Digital Waveform

    Using 6 lines of port 0 of the 6221M DAQ, is it possible to acquire a digital waveform on EACH line. I am acquiring speed signals and converting them to digital waveforms (external signal conditioning) for comparison. I need to be able to read these signals on each of six DIO lines so i can measure frequency. Anyone have an idea how to do this? Thanks
  10. QUOTE(Neville D @ May 15 2007, 01:06 PM) Soo... A system that does not have a lot of memory (or not a lot left) may benefit from using property nodes during initialization, and a system with enough memory should use local variables and gain the performance benefit of speed. "write only" variables?? I want some of what they were taking...
  11. Anyone know of a way to detect when a USB flash drive has been inserted? I was thinking of using that as a way to do automatic updates to existing programs.
  12. QUOTE(dthomson @ May 3 2007, 12:38 PM) Now see, I would call both of those high speed as they are far greater than the 1KHz rates I am using. Most of the lab computers are new dell celeron systems which i am hoping will keep up with everything. I am constantly updating the screen indicators with averages of the 1000 samples I am taking,(only vibration has a graph). Aside from streaming the data to disk (the AIs dump into a functional global, a parallel while loop reads from the global and streams the data), not much else is going on. the test has various load sequences that it cycles through every 30 seconds or a minute where it changes AO voltages, etc, but it just doesn't seem like its enough to load the system too heavily. at current, the program while not finished, is running along smoothly in the test phase at less than 10% proc usage. ALL UI is handled prior to start of test, with the exception of changing to a different tab to see different data output.
  13. For those of you who have been doing this for a long time... What is considered "High Speed data acquistion." or system intensive calculations, etc. where everyone is always seeming to optimize things as best they can in order for their program to function efficiently/quickly. I guess I am looking for a frame of reference for when people talk about collection large amounts of data at a high speed, etc. and processing it. For example. My current project acquires data on 16 RSE lines at 1000s/sec using a 6221-M. --is this fast/lots of data, or negligible. I then calculate things like load, vibration, temperature and (speed from a digital input). If those values then exceed my limits i shut down my machine. I also adjust the loads and motor speed with my analog outputs and digital outuputs. The only other things going on are a data file that i record one data point (average the 1000) for each of the 16 inputs every 5 seconds, and i have a circular disk buffer going with 300000 data points for each line.
  14. QUOTE(Jim Kring @ Apr 8 2007, 08:39 PM) I reviewed the list of bug fixes, and believe it or not, I did not find any that were relevant to any of my 8.2 software. So for now, the 8.2.1 upgrade will sit on my shelf.
  15. When reading/writing configuration files, if you are reading into an indicator, you can just wire the data from the read to the indicator. When wiring the data to a control, however, one must use a local variable or a property node. Since this is being done in the initialization state of my program , does it really matter between using the local or the prop node. I would think during this state of the program, execution speed is not an issue. If I am correct in assuming: Property NOdes don't create copies of the data, local variables do. However, property nodes do switch to the UI thread to obtain a value. Are these assumptions correct as well?
  16. QUOTE(crelf @ Apr 12 2007, 06:31 PM) Unfortunately, time is not a resource i have. The timing sequences for this program are all laid out, and work good, it is just a matter of how best to control the equipment with minimal code. I can always make it work, I just don't want it to be too ugly.!!!
  17. I am writing a new program in LV8.2 to replace multiple LabWindows v3 programs. There are 2 different test stands that share similar functionality. Using :: PCI 6221 DAQ and 6722 AO card. Machine 1: Four test stations, 2 motors (1 per 2 stations) Machine 2: Two test stations, 1 motor for each. DIO (output): 2 each station for relays - total 4 -- 6722 DIO (input): 3 frequency inputs per station - total 6 -- 6221 Both: Analog Inputs: 2 Strain, 1 thermocouple, 1 accelerometer (per station) Analog Outputs: 1 for each motor speed control (6221) , 2 for valves (each station, total 8 -- 6722) DIO (output): 2 for motors, 2 for side enable(2/1 station depending on stand) , 3 each station for valves (12 or 6). -- 6221 DIO (output): 2 for lights 6722 DIO (input): 1 for each side (2 total) -- incoming relay to show power on. 6722 The primary functions of both test stands happen under what is listed as BOTH. Periodically, i fire 2 relays on the smaller stand, and collect frequency input at all times. Based on the section marked BOTH , i belive there must be a way to control either the 2 station stand or the 4 station stand without writing two programs. The four staion stand has 1 motor that turns 2 stations, the two station stand has a motor for each stand. Both machines have all the same DAQ inputs, with the 2 station stand having 2 extra. And they both control valves at each station, but the 2 station stand has 2 extra valves per station. Any thoughts on the architecture of this program???? I have a standard state machine started with a parallel while loop that aquires my AI (the important info). Although I do need to add a way to start and stop the AI. I guess I am hung up on the 2 vs 4 station / controlling them both with the same code.
  18. EJW

    Data Buffering in 8.2

    QUOTE(eaolson @ Feb 22 2007, 01:47 PM) This is true. The typical test is 200-250 hours long (Really big file if streamed!!). I really only need the last 5 minutes of data at the full 1KHz rate. I could also probably rotate my data through a 2D array with just one shift register, which is what it may come down to. I am just trying to get a feel for what may work best. I really don't want to stress the hard drive with all that streaming.
  19. EJW

    Data Buffering in 8.2

    Here (attached) is an example of what i come up with,it seems to be fast and efficient. It only uses memory once, no copies, and no leaks! I even simulated signals every iteration without consuming hardly any time. OPINIONS??
  20. EJW

    Data Buffering in 8.2

    QUOTE(Kevin P @ Feb 21 2007, 09:21 AM) Quick question, i have seen it mentioned several times, but what is "lossy circular buffering" as opposed to...."not lossy"???
  21. EJW

    Data Buffering in 8.2

    QUOTE(ned @ Feb 20 2007, 09:48 AM) I see where you're going with this. I'll have to give it a try in a mini .vi to see what happens, especially when i dump the data to a file. I've just begun the conversion of the old LabWindows program and this segment will be a ways down the road, but i knew i'd better look into it early so i get the code added in the right place at the right time. Thanks for all your help. I'll stay open to other ideas if anyone has them, in the meantime i have ned's and mine to work through, thanks everyone.
  22. EJW

    Data Buffering in 8.2

    QUOTE(ned @ Feb 19 2007, 05:35 PM) The vi looks like it does one channel ok, but how about all 16 channels? (Unless I am not following the .vi correctly) I would think this would be kind of messy even if most of that code was in a FOR LOOP to process each channel. The time it would take to process the loop 16 times may make an impact on performance. This is where i was stuck at 1 or 2 channels isn't so bad, but 16 is a lot of data to manipulate and store. I'm not worried so much about the computer crashing before the test ends and losing the buffer as long as it doesnt crash in the last 5 minutes before failure!!
  23. I am converting an old LabWindows 3 program to LabView 8.2 (don't ask). I have basically started from scratch as there are some new things our test lab would like the program to do. The one that i am sorta stuck on, although have thought of a couple methods, is buffering data. We read 16 AI channels at a rate of 1KHz. Based on the current cycle the program is in, it writes a single (averaged) data point from each channel to a measurement file. What I have been tasked to do is when the test fails (destructive testing of a part) which is typically after 200 hours or more of testing, they would like the last 5 minutes of full rate (1KHz data, 300K data points per channel essentially) written to a separate file so that they can see exactly how the test part failed. Any ideas on how to store 16 channels worth of data for that many data points/ time frame? My original idea was to use shift registers and initalize each one with 300K elements and then use the rotate 1D array and replace array subset functions. Maybe this is the best way, maybe not.. I could sure use some input! Thanks!
  24. QUOTE(yen @ Feb 15 2007, 03:17 PM) It's just done with a Microsoft calculator...
  25. After 20 years of making this software, you would think NI would have come up with a better way to print block diagrams. Does anyone have any utils or tips on how to print a block diagram so that it is actually readable. And yes my program is more than one screen (one screen per while loop actually).
×
×
  • Create New...

Important Information

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