The really critical question is where have you connected the two cables up to? Most people will run the black cable either to some known earth point on the bike or to the negative terminal of the battery.
The red cable would ordinarily run to the positive terminal of the battery, if you want it on regardless of the position of the ignition key. I'm assuming from your post this is what you've done. Alternatively you can find a switched live, like the positive supply to the headlight and patch into that, so it comes on when the key is turned.
What you are seeing seems counterintuitive, I know of no reason a bike should by design have a switched not - live circuit. What bike are you using? If it's a very small bike (or a big bike with an electronic problem) then you probably don't have enough electrical power to run the accessory once the other electric powered devices are drawing power. Does it come back once the engine is started?
Do you have a digital multimeter? I consider my little travel one to be essential bike maintenance equipment. If you do, measure the voltage going into your accessory in all states (ignition off, ignition on, engine on) and let us know the results.
If you are riding a big bike that's unlikely, unless it's a BMW, in which case it might be a CAMBUS thing, which I know nothing about - except that it can make installation of electrical accessories problematic.
Whatever the issue it will make logical sense, approach it logically and provide as much information as possible when asking for help and you'll get there.
__________________
[ Tim | History - NW Italy/French Rivera, Swiss Alps, Morocco | 2016 - Greece > Albania > Macedonia > Kosovo > Montenegro > Bosnia > Slovenia > Austria ]
|