TIA Portal Program_Alarm; Alarms from multiple sources

whimsey

Member
Join Date
Oct 2022
Location
Washington
Posts
3
Using TIA Portal v17, SIMATIC S7-1500 PLC.

I am trying to write an alarm that will trigger for multiple sources, and output the triggering source(s) in the text.

I have this sort of worked out - all sources that should trigger the alarm do, and as long as only a single source has triggered it, the text output is correct. The problem is when multiple sources have triggered the alarm at the same time.

Each source triggers a bit in an array, which is then gathered into a word, and the value of that word is checked against a text list and the results output.

Ideally, I would be check every bit in the word and output according to the state of that bit.

I can't just throw them into the SD_ inputs, because I have 12 possible sources, and there are only 10 inputs.

I would like to avoid a text list that contains every possible permutation, but that's the only way I'm seeing out of this.

Thanks.
 
Something like "Alarm Triggered. Source 1 Source 2" would be grand.

But I'd also be okay with each source triggering a separate instance of the alarm so I would end up with:

Alarm Triggered. Source 1
Alarm Triggered. Source 2
 
Each source triggers a bit in an array [of bits? i.e. of bools?], which is then gathered into a word, and the value of that word is checked against a text list and the results output.

Ideally, I would be check every bit in the word and output according to the state of that bit.
...I would like to avoid a text list that contains every possible permutation, but that's the only way I'm seeing out of this.
Yes, well a list of the permutation of 12 bits has 4096 elements, so that is a non-starter, unless you generate it programmatically.

Why not use the array of bits to choose which messages to append to the alarm text?

If that array is not available, can you not look at the individual bits in the word e.g. something equivalent to this

message := "Alarm(s) triggered"
IF alarm_word.%X0 THEN message := message + "; Source 0"; END_IF;
IF alarm_word.%X1 THEN message := message + "; Source 1"; END_IF;
etc.


That assumes strings can be concatenated with the [+] operator; if that is not the case, I imagine there is some other way to concatenate strings.

You could also do this with bit-wise ANDs against the alarm_word e.g. [alarm_word AND 1], [alarm_word AND 2], [alarm_word AND 4], ..., [alarm_word AND 2048]; I am pretty sure TIA also has a bit-wise AND instruction in ladder.


I can't just throw them into the SD_ inputs, because I have 12 possible sources, and there are only 10 inputs.
I don't understand this; is this saying there would be a hardware solution if the PLC had 12 (SD_?) inputs?
 
Using TIA Portal v17, SIMATIC S7-1500 PLC.

I am trying to write an alarm that will trigger for multiple sources, and output the triggering source(s) in the text.

Is the goal to only have one summary alarm to avoid overwhelming the operator?


message := "Alarm(s) triggered"
IF alarm_word.%X0 THEN message := message + "; Source 0"; END_IF;
IF alarm_word.%X1 THEN message := message + "; Source 1"; END_IF;
etc.


I think something along these lines would be a decent approach, that only gives one tag to pass into the alarm.

I don't understand this; is this saying there would be a hardware solution if the PLC had 12 (SD_?) inputs?

The Program_Alarm instruction in the S7-1500 allows you to pass the values of up to 10 tags (linked as inputs called SD_1 - SD_10) into the text of the PLC alarm. Still though, I'm not sure that helps here, because
 
Is the goal to only have one summary alarm to avoid overwhelming the operator?

Pretty much exactly this.

The way it is right now the operator gets:

Alarm triggered! See messages for more information.
Alarm information: Source 1
Alarm information: Source 2
Alarm information: Source 3

For up to twelve sources, which can be a lot to sift through.

I will see about setting up a string for it to read from, I didn't consider that as a possibility.
 

Similar Topics

Anyone ever experienced TIA Portal V16 (newest update ver. 6), being unable to open a single program when it was previously? Attached a photo of...
Replies
1
Views
1,063
Hi All While uploading a source code(program) from a machine (I have a copy, many copies) the uploaded version differed from the version I know...
Replies
3
Views
1,828
Hi, I have all my program in OB1 with FCs and FBs, taking up apporx 45 networks. If I add more program cycles for example 123 and 124. I assume...
Replies
8
Views
3,413
Hi guys I have a machine with several s210 converters which has the parameters stored on the plc Tia program Has anyone got a step by step...
Replies
4
Views
1,918
Hi. I'm a college student and I'm currently working on my Siemens 1200 based palletizer machine project. It took me very long time to build and...
Replies
24
Views
7,610
Back
Top Bottom