It is difficult to say exactly without seeing/ knowing what pins are represented by which variable names, but some general info:
HIGH [PIN] will always set the pin represented to +5V if configured as output. As will [PIN] = 1
LOW [PIN] will always, similarly, set the pin to ground. [PIN] = 0, the same.
TOGGLE [PIN] will reverse the state - if the pin was HIGH, TOGGLE will make it LOW; if LOW, it becomes HIGH. It is likely, looking at this explanation, that if your output is ending in the wrong state, it is because it began in the wrong state.
Your comment "when i put the command to turn off the PWR_LED = 0 before the toggle PWR_LOWLED command , the PWR_LED remains on" indicates you:
Turn Off PWR_LED
Then TOGGLE the pin, thus turning it from LOW to HIGH.
You state "the PWR_LED remains on". Which, would appear to agree with what I understand you to say, but is not correct. TOGGLE simply makes the pin HIGH again immediately after turning it off and so, it appears to remain on. Try putting a pause between the statements to verify my assumption, so that you may observe PWR_LED being turned off, then [PAUSE], then TOGGLE reversing the pin output and turning the LED on again.




Bookmarks