Jump to content

Ladder loop works only for the first row detected with an alarm


ORSO2001

Recommended Posts

Dear All,

after I have "studying" your example about the alarms management I have created my function with "alarms actual" and "alarms history"; at the beginning I created a loop to check if an alarm is present in "actual" and reset the row after transfered it to "history"...it worked.

In the next step I added a BIT check (image 1) to verify if the alarm was reseted by the device that I have to controll with the PLC...and if it still present do as set (reset row and transfer) and add a "note" in other DTI...if it was already reset do only what was set (reset row and transfer).

after this modification the loop doesn't work anymore...works only for the first row detected with an alarm...I checked and I found that the BIT highlighted in GREEN, in the immage 2, is set in rung 1 but is not reset in rung 2 (at the end of the row).

I done a lot of test and modifications...at the end I had to insert a reset and a timer ON of 15 ms (image 3a) to do the reset action of it...in this way it works....only reset without the timer doesn't work.

 

In this case the BITs that I used are "global" and are used only in this function; are present only in two rungs (set, contact, reset) 

Some suggestions?

 

thanks

 

 

1

2

3a

 

Link to comment
Share on other sites

I see that you have a Bit named "Bit Alarm Read..." (The 3 dots are text that I don't see, so I don't know the actual name).

Do you have more than 1 bit with a similar name? I'm asking, since on the first rung, I see at the end that you Set and then reset a tag with the same name (See image1, red rectangle sets a tag, and after it there is a reset)

If it's the same tag, then what are you trying to gain?

 

About Rise/Fall: The values are compared to the values on the previous scan.

 

Btw, why aren't you using the build in alarms?

Link to comment
Share on other sites

Dear Saragani,

 

I created a BIT array (same for int., buffer, string...) for each function that I have done; obviusly in the block you can see only the name of the array but not the single BIT (see attached image); trust me if I say that this bit is used only in the two contiguous rungs for: set, contact, reset.

 

I saw both example "built in alarm" and the "alarm example with events"...at the end I choice the second way because I have to manage 10 slaves that is, at same time, master of 61 slaves with different features and alarms and a single alarm has different "source"  associated...so 610+10 slaves...but huge quantity of alarms variables...In this way, with the alarm function event I can combine multiple tags value to have, at the end, the alarm description that I need...maybe I am wrong but it works.

 

 

 

BIT ARRAY

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...