LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"visa write" to arduino only works when EXECUTION is ON

hello everyone!!

need urgent help please..i only need on time communication between labview and arduino through visa write .problem is that when i turned the "highlight execution "button on it show on time data sent to arduino and led pin 13 is on as the condition match .but not working when execution button is off. please this is not a big issue for you guys i attached my codes please reply Smiley Indifferent

int a=0;
void setup()
{
  pinMode(13,OUTPUT);
  Serial.begin(9600);
}
void loop ()
{
  while  (Serial.available()>0)
{
  a= Serial.parseInt();
  if (a>5)
  digitalWrite(13,HIGH);
  else
  digitalWrite(13,LOW);
  delay(100);
 
}
  

}

led control.png

0 Kudos
Message 1 of 4
(3,765 Views)

That means you need to slow down your code.

0 Kudos
Message 2 of 4
(3,749 Views)

how to slow it down ? by lowering the delay values??

 

0 Kudos
Message 3 of 4
(3,740 Views)

Or speed up your code that is running on the arduino by lowering its delay value.

0 Kudos
Message 4 of 4
(3,728 Views)