I/O Scaning

osamamalhy

Member
Join Date
Jan 2006
Location
alex
Posts
89
Hello every one
i like to do Scaning (by using the looping) for siemens 315 CPU the total number is 160 I/O , i need that to make fulat montoring
regards
Osama
 
hello
sure the plc having automatic scan , but my request is (i wand to do i/o scanning to make fault tracking that came through the i/o modules
regards
osama
 
Try to explain with other words what it is that you want to achieve.
Maybe you want to have some kind of alarm system.
Or maybe you want to log the on/off transitions.
Or maybe it is something completely different.
And also specify the EXACT plc type.
 
Do you want to know if the I/O module itself is faulty or healthy?? or you have (e.g. smoke sensors) wired to your inputs and you will issue an alarm action when an input goes high?
 
i had the system connected to field sensors (level . temp,...) i like to monetor this , and say have an alarm if one of them chang to the undesired state, which is for example the low state
regards
osama
 
may itis better to repeat the request in other way , can i do looping to the I/O , to monetor them for alarming system
regards
osama
 
Hi

This is one way ....

you need to create two DB's called AlarmDB and HistoDB
// First intialise your pointer

L 160 // if 160 byte
// if 160 inputs then L 20
T #pointer

Next:Nop 0 // start of loop
L pointer // contains highest IB you wanna scan
SLW3
T AdjPoint // adjusted pointer for byte(must be double word)
opn HistoDB
L IB[#AdjPoint] // your current Input
L db[#Adjpoint] // historical data ( ie previous cycle )
XOR
T #temp1 // contains all changes

L IB[#AdjPoint]
T #temp1
AW
T #NewChange // contains all 0 to 1 changes

L IB[#AdjPoin]
L #temp1
AW
T #OldChange // contains all 1 to 0 changes

L IB[#AdjPoint]
T DBW[#Adjoint] // store Input to histo

// write new alarms in alarm DB
Opn AlarmDB
L #temp1
T DBW[#Adjpoint]

L #pointer
Loop Next

// once you stored all the 0 to 1 changes ( 1 to 0 or all changes) to alarm DB then do some post processing because at the next scan cycle the inputs may change.

Hope its usefull

Eric
 

Similar Topics

A
hi friends. i m quite new in field, i could not understand what is scaning. can u brief me what is the basic concept of scaninpls
Replies
1
Views
1,875
Back
Top Bottom