MODBUS protocol Library

You still didn't tell us why the two mentioned implementations don't work for you as you wrote earlier.

On the page you linked (http://replicantfx.com/wp-content/uploads/2012/11/ModBusSlave_Ref.pdf), there is another implementation of a ModBus slave. You also didn't tell us why that didn't work for you.

Where i can assign slave id , slave address, function code etc,

In that software mentioned above you can set the slave address and the available registers. You'll have to define what a slave ID is as the ModBus I know doesn't define such a term. is it the same as the address? If yes, why should you assign it twice? In most cases only the most primitive function codes are implemented in the existing Arduino code but you're free to extend that functionality if you need more features.