How do coal rollers control when their vehicle spews black smoke and when it does not?

States don’t usually check individual vehicle emissions unless they have a problem meeting NAAQS:

If a state or region is found to be in violation of EPA-mandated NAAQS, then they’re required to develop a SIP:

A SIP is a state’s plan for achieving NAAQS compliance and often targets privately owned vehicles, either with an annual smog check requirement, or (as Denver does) a drive-by roadside emissions check.

If a state is in NAAQS compliance, then they often aren’t equipped to do emissions checks. As noted upthread though, the EPA is targeting bigger fish, with some success: