05-07-2015 09:52 AM
too much wire and shift register, I am Confused, can you help me a little bit for the coding ?
05-07-2015 10:06 AM - edited 05-07-2015 10:07 AM
@zqz51911 wrote:
too much wire and shift register, I am Confused, can you help me a little bit for the coding ?
You are right, too many shift registers and wires in your code. You can move the indicator terminals inside of the event case. That will make things a lot simpler. It also helps if you properly label controls and wires.
05-07-2015 10:56 AM
appreciate
05-07-2015 11:33 AM
can you plz show me the what is inside the "false " state, and btw why my stop can not wire to the "envent structure" ?
05-07-2015 11:35 AM
The other image is a snippet. You can drag and drop it to your desktop, then drag it into your block diagram and have all the code.
That wire needs a source. In the Stop event, put a true constant there and wire it out to the conditional terminal.
05-07-2015 11:43 AM
magic, amazing
05-07-2015 04:12 PM
Hi Knight of NI, I still have some problems, sorry to bother you again.
The problem is why my vi can only output in array 2(in the loop) while the vi running. If I want to output in array 1(out of the loop), I need to click the stop button every time.
Another problem is the reset button, I want a reset all the value to zero when I press this button, however it did not work.
The last problem is when I run the vi, when the first time I press the “toggle” ,in the “Frequency” and “break” indicator, there always some random number come out unless I press three times to finish a cycle the number will remain normal.
Thanks
05-07-2015 07:50 PM
You need a different event case for each button you have. You should have a Reset:Value Change and a Stop:Value Change events. Do whatever you need to inside of those cases.
05-08-2015 11:00 AM
however, I can't put two event structure in one loop.
05-08-2015 11:49 AM
@zqz51911 wrote:
however, I can't put two event structure in one loop.
Who said anything about having multiple Event Structures? You want a different event CASE. Right-click on the Event Structure and choose "Add Event Case".