I have a multi function meter and i want to collect the data and display it. My idea was to create a api for serial communication?? will the idea work or is there any other better way?? the meter uses modbus rtu rs485 protocol..
You need to design your api to use the modbus protocol. In windows computers you are usually using a utility or driver program to interface with the modbus rather than re invent the wheel and write the protocol yourself. Your meter should have modbus register numbers to get the information you need. Once you are successful in reading the registers- designing how to display the information or log it is totally up to you.