I want to build a program that receives product weights from an industrial scale, records inventory in a database, and eventually exports the information to Excel spreadsheets. I have not coded much recently, so I will need to refresh my skills. Initially, I thought the scale communicated through FTP, but I have since confirmed that it can also provide real-time weight data over TCP. I have previous experience with C++ and MySQL and would appreciate advice on whether they are suitable, or whether another language and setup would make more sense.
4 Answers
If you use FTP instead of TCP, you could automate the process with a script: download the scale's file, transform it into a reliable CSV or another database-friendly format, and import it into the database. The exact transformation depends on whether the scale produces plain text, CSV, JSON, or a proprietary format.
Python would be a practical choice for this kind of project. It has built-in support for TCP connections and FTP, SQLite is easy to use for local storage, and libraries are available for writing Excel files. That said, the best language is usually the one you already know well enough to maintain. C++ and MySQL can absolutely handle the job if you are more comfortable with them.
A reasonable design would be a small service that listens for readings from the scale, validates and converts the incoming data, then writes each accepted measurement to MySQL. Keep the raw readings and inventory calculations separate if possible, so you can audit or reprocess data later. Generate the Excel files as an export step rather than using spreadsheets as the primary database.
First clarify exactly how the scale sends its data. If TCP provides live readings, that is probably a better fit for real-time inventory updates than periodically downloading files over FTP. FTP generally means the scale creates a file, your program retrieves it, and then processes it, which is more suitable for batch imports or daily measurement logs.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically