Greetings,
This will be my first use of a multithreading application. I am attempting to create an application that will have a GUI for user input and configuration, communicate with a PLC via DDE or OPC communication, and communicate with a printer via serial communication.
For the PLC:
I will need to maintain a heartbeat (change a bit in the PLC every few seconds and wait up to 30 seconds to see it change back). Tags in the PLC will also be used as events for further actions.
For the printer:
I will need to check ink levels, and report an error to the user if low/none. I will need to increment my index once the printer says it processed the number.
For the GUI:
I will need to have COM configuration for the serial communication. I will have two user-entry fields (Manufacturer and Item Number) combined with the part index to create my serial number to send to the printer.
My main question would be this: Is this a type of application that it would be beneficial to use multithreading on?
If so, would I have a thread per device (GUI, PLC, Printer) or per separate communication I'm going to handle (PLC heartbeat, PLC tags, Printer, then main GUI)?