04-18-2018 07:27 AM
Hi,
Yes, you are right. My mistake, sorry. For example, if I want to exit a loop:
int counter; //it is my global value
for(int i = 0; i < dataValue.size; i++)
{
if(dataValue == randomValue)
{
counter++;
if(counter == 2)
{
break;
}
}else{
//do nothing
}
So in that case, my loop will not be executed if my counter reaches 2. That's exactly what I want to implement in Labview. So can I create another comparison then connect it stop button ?
Thanks for the help
04-18-2018 07:30 AM
Hi,
Thanks for the answer. Yes, it worked. I would like to iterate my for loop and exit if the condition met. For example, if I want to exit a loop:
int counter; //it is my global value
for(int i = 0; i < dataValue.size; i++)
{
if(dataValue == randomValue)
{
counter++;
if(counter == 2)
{
break;
}
}else{
//do nothing
}
So in that case, my loop will not be executed if my counter reaches 2. That's exactly what I want to implement in Labview. So can I create another comparison then connect it stop button ?
Thanks for the help
04-18-2018 07:31 AM
Yes. Do a comparison with your threshold value, then wire the output to an OR node. The other operator of the OR must be the Stop button.
Wire the output of the OR to the conditional terminal.
04-18-2018 08:48 AM - edited 04-18-2018 08:49 AM
@aybarskizilay wrote:
So in that case, my loop will not be executed if my counter reaches 2. That's exactly what I want to implement in LabVIEW. So can I create another comparison then connect it stop button ?
Learn Boolean Logic.