From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-21-2017 01:57 PM
i have written a code using arduino for a robot and i am using Labview to send data so tat based on tat it does the required operations . My code is working properly but whenever i send data rx pin on arduino blinks but at d 1st click it never does the required job and i need to click it twice or thrice to make it work the way i want it to.Pls do help me out
09-21-2017 02:18 PM - edited 09-21-2017 02:20 PM
LabVIEW tip. Don't open and configure the serial port on every iteration of the while loop. Configure it before the loop. There should be no need to flush the buffer.
Since you say that your code is working properly, but the robot is not doing what it needs to, then the problem must be in either the Arduino code or the robot. Neither of those things can be solved on a LabVIEW forum.
09-21-2017 02:22 PM - edited 09-21-2017 02:25 PM
Please attach the actual VI. We cannot debug pictures. Thanks.
09-21-2017 02:26 PM
@altenbach wrote:
- What is the mechanical action of your buttons? (If these are latch action booleans, they belong inside the event structure.).
Please attach the actual VI. We cannot debug pictures. Thanks.
That is almost certainly the problem. Because the boolean is read first in the loop, then the waits at the event structure until something happens. So if you hit "W" at that point, the event case for "W" value change will occur, but since the "W" button was false prior to that, your "W" case in the inner case structure will not run.