help required ..

panthripu

Member
Join Date
Mar 2004
Posts
228
Hi friends
I am again entangled in this small program.Please help me to know what exactly the attached FB is doing.I m poor in reading STL.Please help me.
 
NW1 for checking input IN_ALM only can be DB, then save pointer to TMP_ALM_ADDR
NW2 for checking input IN_MASK only can be DB, then save pointer to TMP_MASK_ADDR
NW3 for Checking input IN_LEN only can be bigger(equal) than 0
NW4 for masking alarm which you don't need to know (alarm-1111 will filter by mask-0000)
NW5 set ENO (state of coil M680.1)
 
as above except

NW3 the length must be greater than zero.

NW4 loops 3 times (value of IN_LEN), and checks the datawords DB210 DBW438, 440 and 442 to see if any bits are on that correspond with the mask words DB97, DBW43, 45 and 47.

If any are on then ENO is set on exit which turns on the external flag.
 
In_alarm ,in_mask

thanks friends
I will really appriciate if you can explain in more easy way.
The address at IN_ALARM is a fault bit.
By my understanding after reading whole plc program , i believe that this bit alone is not considered to get fault at the output of this FB rather it consider either a full byte starting from the bit adress given at IN_ALARM.
Is it so or i am wrong?
From the function discription of the equipment , i can see that the fault will trip the equipment and the address at the IN_ALARM is one of these alarms. and output of this FB trips the machine.But i can not see other faults in program. However if i open the db of IN_ALARM i can see the other faults are the next bits after the bit address of IN_ALARM.
 
help requiered

Thanks peter
AS you said its pointer to first word , it means the the word starting from DB210.DBX438.0 Right?
In my DB210 if i see all 16bits starting from DBX438.0 ,,, i can see all these bits are related to fault condition.
Now i undertand that one word is considered in the FC starting from DB210.DBX438.0.
but what should be the state of these 16 bits to generate the output at ENO of FC98.
 
help required

My intention here is to know , In what condition the output of this FC will become high ?
 
OK, lets give an example, lets say M 680.1 symbol was 'Tank_1_Alarm' and words DB210.DBW438, 440 and 442 hold 48 alarm bits that correspond to the area where Tank 1 is, of these 48 alarm bits only 12 are directly associated with the Tank.

So 3 MASK words are created to identify the alarm bits these would be held in DB97.DBW43, 45 and 47 with values as follows.

DB97.DBW43 = 0000 0000 1001 1000
DB97.DBW45 = 1100 0001 0001 0001
DB97.DBW47 = 0100 0000 0000 1110

Take the first Alarm word as an example

DB97.DBW43 = 0000 0000 1001 1000 would correspond to alarm bits DB210.DBX439.3, .4 and .7 (so we are saying that these three bits are Tank 1 alarm bits).

The block you have shown would compare the MASK words with the alarm words and if ANY alarm bit was on that matched the MASK bit would turn on M 680.1

Using word 1 only (assuming other alarm words are always zero when these states are seen)

Example 1: No alarms on

DB97.DBW43 = 0000 0000 1001 1000
DB210.DBW438 0000 0000 0000 0000
'AND' result 0000 0000 0000 0000 all bits OFF so M 680.1 is OFF


Example 2: Non Tank 1 alarm is on

DB97.DBW43 = 0000 0000 1001 1000
DB210.DBW438 0000 0100 0000 0000
'AND' result 0000 0000 0000 0000 all bits OFF so M 680.1 is OFF


Example 2: Tank 1 alarm is on

DB97.DBW43 = 0000 0000 1001 1000
DB210.DBW438 0000 0000 0001 0000
'AND' result 0000 0000 0001 0000 a bits ON so M 680.1 is ON



Just remember that the block is testing 3 words (IN_LEN)
 
help

Great......
Thanks peter for this explanation now lots of things are clear to me.some more confusion ,
How you get the bit pattern for DB97.DBW43/DB97.DBW44/DB97.DBW47...Is it only assumption in this example. Or I should see my bit pattern in DB97.

DB97.DBW43 will be anded with DB210DBW439 , right ? or as you mentinoed only bit 3 ,4 and 7.
 

Similar Topics

Hey, we got a machine from China (yay hooray -.-) that has some really annoying flaws. Like the HMI screen is going off after a minute which is...
Replies
7
Views
2,166
I have the logic of OMRON but I want to do this logic in TIA 15.1 CPU 1200...
Replies
4
Views
1,839
I have a small application where I need to spec out an actuator. The load is 7kg and needs to move 90 degrees around a 1cm diameter in 1 second...
Replies
6
Views
1,840
I'm currently trying to open an old Medoc/Melsec (Mitsubishi DOS-based PC program) Does anyone know how convert it into windows based program? I...
Replies
6
Views
2,036
i am using PLC of B&R its CPU is CS0104100242. It is showing Error 23 and when i reset this error its cpu shows "INIT" and again it shows error...
Replies
1
Views
1,871
Back
Top Bottom