04-20-2022 06:25 PM
I am running Windows 10 Home 64 bit and LabVIEW 32. I am using VISA serial to send parameters to a microcontroller (AdaFruit Itsy Bitsy M4 Express). I have worked with serial instruments but this is the first time I have tried to write instrument control and I am stuck.
I do not understand why characters I write to the port come back in the read and the device response remains in the port. I do not understand how to send ASCII "CONTROL-D" to soft reset the hardware. I tried 0x04 with no success. The communication is ASCII based and is flawless in a terminal emulator ( PuTTY). I want my LabVIEW re-entrant VI to work that well. A screenshot of a PuTTY session is attached.
I have read and implemented several useful posts in the forum to get as far as I am. The zip file includes details for packet and requests during sessions with my VI and PuTTY.
Solved! Go to Solution.
04-20-2022 07:56 PM
1. A Ctrl+D (End Of Transmission) is a character value of 4 (0x4).
2. Initialize your port with the VISA Configure Serial Port. It will then default you to having the termination character turned on, which I think you want here.
3. You should not have loops inside of loops like this. Just a single loop should handle all of this.
4. I recommend you go watch this: VIWeek 2020/Proper way to communicate over serial. There is a link there to code that I use on a regular basis that I think will really help you out here.
04-20-2022 10:16 PM
Wow! I watched the video. The techniques for ASCII will help me make the robust GUI I know is possible.
Thank you!