https://www.nicoclub.com/service-manual ... +v1.11.pdf
If you haven't already grabbed a service manual, do so. You have a redtop and this manual is for an S14 blacktop, but the steps for solving a CAS related no spark would be the same albeit the ECU pins will be different.
I see you have your car listed as a Silvia in your profile. Is it a Silvia or is it a 240SX? That kind of matters. If it's a 240SX with an SR swap, are you running a custom wiring harness or something more like a Wiring Specialties conversion harness? That kind of information is necessary to track down things like where power is sourced for specific equipment. The CAS is powered via the ECCS relay while the IACV is powered from the Fuel Pump relay on a 240SX. The Silvia powers the IACV directly off a fuse and is independent of the fuel pump circuit.
Best thing I can say for now is that if you're having electrical problems is to go through the wiring harness and look for damage. Something could be shorting or grounding and is causing your erratic issues.