07-10-2008 09:26 AM - edited 07-10-2008 09:30 AM
07-10-2008 09:43 AM - edited 07-10-2008 09:45 AM
Put the delay function in the true case of a case statement where the condition is that the i terminal of the while loop is equal to 0. Then it will only delay on the first iteration of the while loop.
You will need the boolean wire, or the constant in the case structure or passing through in both the true and false cases so the relay express VI will be dependent on the completion of the case structure which will take either the delay time when i=0, or no time at all if i <>0.
07-10-2008 09:46 AM - edited 07-10-2008 09:47 AM
thanks. I'll try these and see what happens.
07-10-2008 10:13 AM
so I put in the case structure and that solves the problem of having the delay happen more than one time while running the VI, but not the problem of having it happen only to the relay passed signal. I do not really understand your second statement. is this question what it is trying to address? Do i just put the relay into the case structure with it, and then in the false case have no delay but only the relay?? what do yo think. I'll keep mussin' with it see what happens.
pmn
07-10-2008 10:18 AM
07-10-2008 10:29 AM
07-10-2008 10:45 AM
07-10-2008 10:53 AM - edited 07-10-2008 10:57 AM
07-10-2008 12:16 PM - edited 07-10-2008 12:17 PM
I guess there are a lot of things I don't understand about what you are trying to do. There are a lot of filtering and integration functions going on. You DAQ assistant only collects 4 samples, which is not a lot of data for a 1kHz sampling rate. It doesn't seem like enough to send through the filter commands.
You have a while loop inside that does continuous integration rapidly on the same data while the "Stop" button is true.
What do you do with this signal besides displaying it? What is the purpose of the delay? Perhaps you just want to add a second's worth of a waveform at the beginning of the waveform to represent the delay? In which case a waveform of zero data could be appended before the switching data. I really don't understand the purpose of the Relay express VI. That is one of those express VI's where I think it would be easier to wire up some comparisons with primitive LabVIEW functions and serve the same purpose.
The switch information coming out of the relay express, although it is a blue signal wire then converted to a double array, is really only a single value (one element 1-D array) that gets continually added to the chart. If that array of doubles or blue signal wire you want to convert to digital data (as in an array of boolean true and false), use the some basic comparisons to generate boolean arrays.
07-14-2008 12:30 PM