10-04-2023 07:28 AM
In essence,
I'm simply trying to send a command to arduino, and readback any response there may be over the USB port via serial comms.
My code is practically working except for one thing. I need to have a read visa with atleast 1000millisecond timeout before trying to write in order for it to work. Which is annoying because I'm literally only sending an on or off command and it's having to wait one second everytime.
I'm happy to provide further details, would anyone be able to help me out who's a bit more experienced in serial comms.
Many thanks.
10-04-2023 08:16 AM
10-04-2023 09:02 AM
Most serial communication issues can be solved by watching this video: VIWeek 2020/Proper way to communicate over serial
Also we don't know what is going on inside your Arduino. I am guessing you wrote the Arduino code? Granted this is not an Arduino board but posting your Arduino code might help.
10-04-2023 09:29 AM
Can you confirm that what you want to happen is properly working in a serial terminal program communicating with the arduino over USB? This is without any LabVIEW.
Once that works with the timing you need then start using LabVIEW.
10-09-2023 02:16 AM
So I solved the issue.
Basically when you configure the connection using the function in the Serial palette, it takes about 900ms to open the connection. Ofcourse, I was opening and closing the connection every time I wanted to send something. Instead I've opened the connection once have a while loop to handle user events, luckily this is sufficient for my project and I won't need to talk to the arduino from more than one device, but I can see how this would get annoying for other scenarios. Thank's for all the questions anyway. 🙂