First of all, what is the instrument you are trying to program? Second, the Write function returns the number of bytes that are sent. It has nothing to do with the number of bytes that the instrument might send back and you will get the same thing whether the instrument is connected or not. Third, do you know for sure that the instrument supports the *IDN? command? Verify that it is listed in the manual. Fourth, have you tried to use Hyperterminal to communicate to the instrument? That's the first step I always recomend. Once that works, you know your com settings and cable are correct. Lastly, if you got VIs that came with the instrument, have you tried running those and do you get a similar error?