I want to use open plc for controlling sugar packing machine. 
How much dose at least will cost me? 
Many thanks
Quote 0 0
Quick answer: nothing. OpenPLC is free and open source, while it also comes with no warranties like any other open source project. You're responsible to audit the code and make sure it fit your needs.

Long answer: of course you will have to buy something to have OpenPLC run on. This can vary from Industrial PCs with Modbus remote I/Os (something you might already have by the way) to simple and cheap Raspberry Pis. The choice will depend on your project's requirements, environment, etc. 
Quote 0 0