Hi, I am doing a small project with Lathe machines and other CNC machines. I have seen MAZAK, GROB, UNITWIN, and a few more. My task is to get the production count ( often referred to as part count ) and send the values for every shift on to a server. I have prepared a hardware that will send the data to the server however, I am struggling to find out where do I get the part count figure from?

I need to get the part count figure from the machine directly, as I have observed the machine does show the part count in its PLC.

Edit : The controllers I have seen are mostly FANUC & SIEMENS