A communication failure can be caused by a number of different problems, the most common are wiring and a bad PCM - yes it is possible for the PCM to fail to communicate and yet work perfectly for everything else.
The least expensive and easiest thing you can do is check for communication with a Generic OBD code reader. If it communicates ok and you get "no codes" then take it back for the smog check and let them know - ask them to do a "code and monitor status check" prior to running the test.
CAUTION! do NOT clear codes, reset it, or disconnect the battery! if you do you will have to drive it long enough to run the OBD Monitors prior to the smog test.
If your tool does not communicate, look under the dash at the DLC and check for broken or disconnected wires, beyond that without the proper tools, information and training it may be beyond what you can do yourself and more expensive than having a professional do it.
I have seen a few times where the system would not communicate and I had to exit and initiate communications again or cycle the key off, then back on. but If you get no communication after several attempts then it's better to take it in.
Your car's engine computer (PCM/ECM) communicates with the Smog test Machine through the data link (DLC) connector using the Global OBDII protocol (computer language). The PCM also has a factory protocol.
Typically we (professional technicians) would try to communicate with the PCM on the factory protocol, then use a labscope to verify if there is communication at the DLC, if not next we go to the PCM and test the circuit directly at the pcm. If it works at the PCM but not at the DLC then it's a wire, but it is also possible for the PCM to fail to communicate and still work fine.
Robert Grove, ASE World Class Technician
Automotive Hall of Fame 1996