Check Encoder counts

interlock

Member
Join Date
May 2011
Location
Middle East
Posts
29
Hi !
If PIW 512 is receiving Encoder counts (Siemens PLC) for hoisting movement of a machine, Can someone suggest a scheme or programming ways of how to detect there is no change in the Encoder counts ( and stop the machine)?
Can it be done using OB35? ...... Meaning, scan the Encoder counts in OB35 and compare if it has changed or not ? Not sure though if it is feasible?
Please advise.
Regards
 
If it is an A/B pulse encoder then taking a simple snapshot of one state to the next will give you a comparison point - then take the next snapshot.
If it is an absolute type then look for the next value over time,
If you have the advantage of an absolute (Gray Code) encoder than look at the change on 1 bit
OB35 is probably the best Block to perform this
 
Dear iant,
Thanks for the reply.
The Encoder is wired to the Siemens PLC through Profibus.

How about comparing the actual encoder counts with the value stored in OB35 100ms ago?

A Q 3.2 "MACHINE LIFTING (OR LOWERING)"
FP M 6.1
R M 6.0 "ENCODER ALARM"
JU P1

P1: A Q 3.2 "MACHINE LIFTING"
JCN P2
L "DATA B".encoder_value "ACTUAL ENCODER VALUE"
L "DATA B".cyclic_check "PREVIOUS STORED ENCODER VALUE "
<>D
JC K1
S M 6.0 "ENCODER ALARM"
BE

K1: L "DATA B".encoder_value "ACTUAL ENCODER VALUE"
T "DATA B".cyclic_check "PREVIOUS STORED ENCODER VALUE "

P2: NOP 0

Please advice if the codes or the idea behind it is ok or not.

Regards
 
As you know the OB35 interupt speed can be changed depending on cpu.
try your program - be carefull with the OB35 basic function
 
If you are trying to detect a fault in an incremental encoder then you could look at using the Z or N channel. You generally get A and B channels that are the normal outputs but there is also often a Z or N channel that gives an output once per revolution. Using that to trigger an interrupt you can check that the encoder gave out the correct number of pulses for a rev.
 
good idea Bryan,
I still dont know what type of encoder is being used.
it is wired through Profibus -
Also we dont know how many pulses can be allowed before a fault is detected.
so a 360 degree plus rotation with a fault could be dangerous.
That is the reason for suggesting taking a 'Snapshot'
 
Dear iant , BryanG,
Thanks for your time and attention yet again.
The Encoder brand is "TR Electronic Gmbh" and I guess its absolute rotary encoder.
http://www.trelectronic.com/product...e/ce65m/profibus/class2/tr-ece-ba-gb-0009.pdf

and

http://www.trelectronic.com/index.php?fuseaction=home.products&prod_ID=4

The codes I wrote in my last post is not a part of the original program (infact there is nothing in the original program to have a check on the Encoder counts and probably there was no need for that). Neither I'm planning to load these codes in the original program. I'm just exploring a way if something like this is possible or not ! What do you say - the idea behind those codes in OB35 makes any sense or no?

Once again many thanks for your attention.
Regards
 
you will find that you will not need to do an OB35 check as the Profibus Encoder has significant fault detection ability -
Absolute Encoders are extreamly more robust-
read the PDF files - they are helpfull
This encoder give out a scalable value not pulses - so you can take a simple snapshot and make sure the value either increases or decreases every time interval -

Output capacity: ................................................ Max. 25 bits
Resolution: ......................................................... Max. 8192 increments per revolution (13 bits)
Measuring range:............................................... 4096 revolutions (12 bits)

Because it is programmable - all you will see in the PLC is Milimeters or fraction thereoff
 
Last edited:

Similar Topics

I have 2 Absolute Encoders 8192 steps per Rev. (Model TR Electronic CEV65m-11003) These Encoders communicate to the PLC5-60 via Parallel push/pull...
Replies
3
Views
1,516
I'm attempting to examine the pulses from an encoder BEI. It has A+ A- B+ B- Z+ Z- PWR and GND. I connect the clip from probe to GND and the probe...
Replies
8
Views
1,726
Hi you all. I'm new here and allready have a question. At this moment i'm programming a project with a unitronics V290. To measure the...
Replies
8
Views
3,643
Hello all, I have a Controllogix 1756-L61 with some RIO. There are a couple of 1734-OB4E's that have gone bad. (no output voltage) My boss found...
Replies
10
Views
1,070
Hello I am new here and new to PLC's, I wrote this program for a class that I am taking and my local tech school. The description is switch 7 will...
Replies
0
Views
413
Back
Top Bottom