Ano Ano Posted March 21, 2011 Report Share Posted March 21, 2011 (edited) Hello, In the attached picture you will see that I have 10 inputs of DC signals and that I convert the multi-input waveform to DBL. If I had N-Inputs this would be very tedious! Is there a way to make a loop of some sort and avoid cluttering up the vi? Edited March 21, 2011 by Ano Ano Quote Link to comment
Roderic Posted March 21, 2011 Report Share Posted March 21, 2011 HI, You can use a for loop, you have to create an array of your threshold that you wire to the loop using indexing. you also can wire the "i" terminal to the array function on the left instead of wiring N inputs. Regards, Rodéric Quote Link to comment
Ano Ano Posted April 1, 2011 Author Report Share Posted April 1, 2011 HI, You can use a for loop, you have to create an array of your threshold that you wire to the loop using indexing. you also can wire the "i" terminal to the array function on the left instead of wiring N inputs. Regards, Rodéric The threshold part works! There is a new problem now. - After the threshold is detected I have a timer, for each input, to measure the time until the threshold is reached and the time after the threshold is reached until the stop button is pressed. In other words I need a separate timer for each input. If I insert the timer in the for loop in order to use the same code, then the timer part does not work anymore properly. How can I make this timer integrate with the for loop properly? Quote Link to comment
Roderic Posted April 1, 2011 Report Share Posted April 1, 2011 you'd better use the tick count ms function. Quote Link to comment
Ano Ano Posted April 4, 2011 Author Report Share Posted April 4, 2011 you'd better use the tick count ms function. I did use the tick count ms, but it did not work, I get the same error Quote Link to comment
Roderic Posted April 7, 2011 Report Share Posted April 7, 2011 Can you give us an overall picture of the program, I may have some thoughts regarding your problem, if you didn't already solved it; Quote Link to comment
Ano Ano Posted April 13, 2011 Author Report Share Posted April 13, 2011 Can you give us an overall picture of the program, I may have some thoughts regarding your problem, if you didn't already solved it; The code is too big area-wise to make a print screen. What you do not see in the attached picture is that the threshold detector and timer runs inside a while loop Before the threshold detector and timer there is code to output a 10V dc to the circuit and code fot the acquisition of the 10 signals. After the threshold detector and timer there is the data output code Is this information sufficient? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.