When the machinery manufactured in a factory it will be qualified as Excisable goods and falling under specific tariff heading depending upon the name of the machine.
You can take Input credit for the machines used, but you have to give declaration under Notification 65/97 for the goods manufactured in in-house and used for manufacture of subsequent final product and also the machine manufactured having the exemption benefits as per the notification referred above.
It is better to give declaration / intimation under 67/97 you are proposed to mfg.enjoying the credit.