Make sure no other instruments are at addresses 0 and 31. National Instruments GPIB controllers default to primary address 0, so if you want to use an instrument at primary address 0, you should change the address or your controller. You can do this by using the ibpad function.
Address 31 is invalid. It is reserved for the UNTalk and UNListen commands. It is generally preferable to create a device that does not use addresses 0 or 7 since those are common controller addresses.