Veterinarians must limit initial prescriptions for schedule II, III, or IV opiates to a 7-day supply for treatment of acute pain, which is pain that the practitioner reasonably expects to last only a short period of time.  (This does NOT include chronic  pain, pain being treated as part of cancer care, hospice or other end-of-life care, or pain being treated as part of palliative care practices.)

After prescribing a 7-day supply of a schedule II, III, or IV opiate for acute pain at an initial consultation, a practitioner may then issue a 30-day supply with refills as appropriate and allowable.  The patient does not have to revisit the practitioner in order to receive a prescription for continuing treatment beyond 7 days.

Controlled substance prescriptions are limited to a 30-day supply except that up to a three-month supply may be prescribed for treatment of certain conditions: panic disorders (code A); attention deficit disorder (code B); convulsive disorders (code C); relief of pain in patients suffering from diseases known to be chronic and incurable (code D); narcolepsy (code E); and certain other deficiencies, conditions and illnesses (code F).
 
You can write a 3-month phenobarbital prescription for seizure control (write "Code C - for seizure control” on the script).  A three-month prescription may be refilled once.  

A 30-day supply prescription may be refilled five times.  Refills on a prescription for Tramadol are limited to 5.