Siemens S7/TIA v18: PLC On/Off Status LED...

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
On this project, the operator's asked me to add an LED onto the cabinet of the PLC enclosure, such that the LED illuminates when the PLC's powered.

Hole's been drilled in cabinet and a 24V LED's been connected to PLC's digital output Ch0 (red wire #52, see pic).

I've updated the PLC module's IO page for the DO (circled red - see pic).

I'm not sure how to update the code, so that when the PLC is powered, %Q0.0 goes TRUE and thus sends 24V to light up the LED.

Is there a special tag I can interrogate that tells me if the PLC is powered?

Hope that makes sense. If not, happy to expand on the above.

Thanks

PLC Status LED.png IMG_20230718_173510.jpg
 
Last edited:
do you actually mean PLC is powered or do you mean PLC is in run mode ?.
Is the PLc 24v powered or 240v ac if 24v then just run the LED off that, if not just put a always on bit onto the output, when the plc goes to stop or powered down the outputs go off anyway.
 
You can set up a system bit, like always true as shown. Use this bit to drive the lamp. The lamp will then be on when the PLC is running.

1200 SYSTEM BITS.JPG
 
do you actually mean PLC is powered or do you mean PLC is in run mode ?.
Is the PLc 24v powered or 240v ac if 24v then just run the LED off that, if not just put a always on bit onto the output, when the plc goes to stop or powered down the outputs go off anyway.

The PLC runs off 24vdc.
That's a good question. I think the operator wants the LED on when it's in RUN MODE. I'll confirm with him tomorrow. Cheers
 
do you actually mean PLC is powered or do you mean PLC is in run mode ?.
Is the PLc 24v powered or 240v ac if 24v then just run the LED off that, if not just put a always on bit onto the output, when the plc goes to stop or powered down the outputs go off anyway.


Sidenote. Some PLC's outputs can stay on old state before stop. Check from DO settings which behaviour it has (maintain or fallback behaviour)
 
"Sidenote. Some PLC's outputs can stay on old state before stop. Check from DO settings which behaviour it has (maintain or fallback behaviour)
Report Post" Really ?
Been in this game for over 40 years, never came across a PLC where the outputs stay on in stop mode I would be very concerned about that.
There are options where the status can be kept i.e. if on will retain their state when switched back on but will be off in STOP, These will return to the last state when the PLC goes back into run but again that will depend on the logic driving it for example if a normal output & the logic driving it is not true then it will be turned back off before the real outputs are refreshed, if latched then they will return to the original state before the stop.
Imagine the scenario:
A motor is driving a ram the plc goes to stop but the ram keeps going ?.
So in the case of the OP's requirement it is not a problem as even if the outputs are retained then the output will go off when PLC is in stop (unless Siemens have done what I would consider very dangerous).
 
The S7 TIA PLC's can have a "substitute a value" option for an output reaction to STOP.
I think it does depend on hardware though.

download.jpg
 
You can set up a system bit, like always true as shown. Use this bit to drive the lamp. The lamp will then be on when the PLC is running.
In your image, Did you manually type in addresses "0" and "255"?

By default, mine came up as addresses "1" and "0", respectively - see pic.

Is it critical what addresses to use?

Sorry for the basic questions - cheers.

Memory Bits Addresses.png
 
Yes I put in these manually. You can use any address really, so long as they are free. TIA automatically adds the tags. The system clocks can be useful to flash a light at different rates say for different modes of your program or whatever
 

Similar Topics

Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi again, When the "REPORT" button is pressed (on a different screen), it takes the operator to the...
Replies
7
Views
669
Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi, The operator has reported that, from time-to-time, when he presses the "Generate Report" button...
Replies
5
Views
466
General Question: The PLC and HMI that I've been working on (a laser measurement system) is soon to be transported to the site where it will be...
Replies
2
Views
701
Hi, I'm not sure how to do this... Basically, I want to restrict the user input values for this tag to be in the range 20.001 to 25.0. I...
Replies
17
Views
1,637
Can someone help me with this? I'm no good at SCL - virtually everything I've done so far has been ladder logic. The return value from the...
Replies
13
Views
1,109
Back
Top Bottom