Hi, I have no idea how to start programming C++ for a serial port.
I need some help/ examples for me to start. I tried looking through the net but I have no luck.
I have previously written some simple C++ programs that I can use the keyboard or scanner.
I have a PLC connected through RS232-USB cable to my PC (COM3).
It will send a simple string text like 12A456789, 1288U
It is transmitted through 9600 speed, 8 data bits, 1 stop bit, even parity and flow control none.
Once the program receives the string text, I need to do a simple comparison and save the text to a txt file according to the content received. EG, if contains 1288U, save as 1288U SN.txt. if contains 1288I, save as 1288I SN.txt
If possible, once the save is completed, the program will send a confirmed message to the PLC (COM3).
Ultimately, I will use bartender commander to extract the txt file for label printing.
Any kind souls can help me with the serial port portion of the C++ program? It will be greatly appreciated. Thanks.