Each solenoid only has two states.
State 1: Port A is connected to supply Pressure (P), Port B is connected to Exhaust B (EB).
State 2: Port B is connected to supply Pressure (P), Port A is connected to Exhaust A (EA).
With the solenoids you are using, one of these states will be the default. If you are using air cylinders that are powered in both directions by air you should have tubes running to both A and B ports. If you are using air cylinders that are not powered by air in both directions, then you should plug the unused port. I'm personally a fan of
these plugs, but some people like
these better. You can also get them
from here.