02-21-2013 12:13 AM
I'am attaching one program in which I used a while loop to give commands one by one from a arrray. I need to take reply for the last command , which when equal to itself the loop should stop iterating. how to do such a thing. Here outside signal such that only the loop should iterate can you please help
02-21-2013 07:56 AM
Point 1 - it's a for loop you've got there not a while loop, so it will stop when it runs out of indexing items
Point 2 - the code is a little messy, and it's not easy to see what you're doing in there
If you use a while loop it might help, but also what happens if the last command isn't equal to itself? Back to the start of the array? Keep resending the last command? Those things make a difference to how you need to code this.
02-21-2013 09:27 AM
Why are you closing your VISA port within each iteration of your For Loop?
02-21-2013 09:47 PM
Yeh i'am using A for loop, in it, I want to put this for loop in a while loop so that it will iterate until I push the stop button. But I need to stop this for loop once the 28 equality happens.And when I press the second button it should take the command array from the case loop. i'am sending that program