What language and architecture should I use for a weighing-scale inventory system?

0
8
Asked By MellowCedar42 On

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

Answered By CopperLynx31 On

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.

Answered By BrightHarbor7 On

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.

Answered By QuietMaple88 On

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.

Answered By KiteAndCopper19 On

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.