check signal shaft encoder

Tumakon

Member
Join Date
Jul 2007
Location
Hengelo
Posts
4
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 lenght of a product we use a shaft encoder with a measure wheel attached to it (number of pulse is free programmable).
I configured a shaft encoder (X4) in the hardware with frequency measurement 100msec.

To start a sequence in my program one of the conditions have to be that the encoder is indeed measuring (so there is a product moving under the measuring-wheel).

I use a Greater Than FB to check if the frequency is greater then zero. If this is true then a MB.... is high. This MB is my condition to start the sequence.

My question now is if this is a good solution of does anyone have a better one?????

Thanx for the answers en reactions.

Leon
 
No, the unit where the encoder is attached on is very solid. So that won't be a issue. Signal noise i don't no. The cable from the encoder is EMC protected so, i hope signal noise isn't evenso a issue.
 
When you say "trigger the sequence" can you describe what that is?

If you are measuring or firing outputs based on product position, I would have logic always running to measure the distance travelled by the encoder each PLC scan:

Combined with other logic, this "delta D" value can be used to perform all sorts of measurement and control with great precision.

For example, you can monitor a photocell and trigger logic that sums "delta D" with an array of variables that track the products' in process positions.

Then your outputs can be driven by compare windows based on limit tests using all the Product (x) position values for all the product.

The code ends up very simple and effective.

When the product position is greater than the end of your programs' concern, delete it from the array, or simply quit tracking it and let it be overwritten by the next new product.

In the SLC500 I work with most, I have to build a fixed array large enough to handle as many products as I can foresee being in process at any given time. Then as new products are detected and qualified, I decrement my array lower pointer, If less than zero, I roll it over to the highest position value. In this manner, no data has to be shuffled or fifo'd. Its a revolving array. I keep track of an array upper pointer too, and update the product position values in a loop from the upper pointer to hte lower pointer with wraparound. That helps with scan time issues in my little SLCs. It's very efficient and super accurate.

The beauty of always using encoder based "Delta D" is that every little jitter or backlash can be included in the position values.

Use raw counts where possible or convert delta D to a high resolution floating point number before summing for best accuracy.
Oh, by the way what is an "MB"? in Siemens speak?
 
OkiePC.

The positioning of the product is covered. A second encoder is used for the traveling distance wich is calculated with the lenght measured with the first encoder.

My problem is that i want to know if there is a another product following. Now i hear the most of you thinking. Use a extra sensor for that. sorry not possible.

the sequence that has to be started is that form the product, the length has to be measured, after this it has to be transported to a calculated position on a conveyor.

MB in siemens terms is M. for example: MB0 means in siemens M0.0
 
Hi Timakon,

The way you use is not bad and is quite simple. It has one disadvantage - it's slow. You need at least 100 ms to "catch" the movements. If this is not critical, you can stay with your way.
If you want to recognize the begining of movements faster, you can use advanced features 2.5 ms interrupt and immediate read HSC. Each 2.5 ms you will compare the current, Immediate updated value of the encoder with previous one. If they are equivalent, no action will be taken. If current value is greater than previous, you will set a bit and will copy current value to previous. You can use the bit as start condition.
An improvement to this way can be - instead to set a bit, to increase a counter. The next interrupt, if the values are equivalent, you will reset this counter, if not - will increase it again. When the counter reaches value 3 or 4, this means you continiously have encoder increasing, than you can set the bit for start your process. Even if you use counter value of 4, it will take you 0.01 sec to recognize the movement, which is 10 times faster than the way you use now.
 
I can infer that you have a roll forming machine or somthing similar that feeds the prouct to a certain length and then cut it, punch it, etc

you wanna make sure that only when the machine has a product in it, the encoder will only measure is that condition is met!

why not just use a proxy senso or any other detecting devices to check for product availibility in the machine ??

I have done this once on a roll formming machine! I fixed the proxy sensor on the measurement whell to detect whether there is metal sheet or not in the machine.. I hope that help..
 
@EM44.

Thanks for your reply.

The 100ms needing to catch a movement is not critical. Far from that. The minimum time of a sequence is aprox. 7 to 8 seconds. In other words, every 7 to 8 seconds minimum i read the statusbit if the encoder is measuring.

The other faster solutions also sounds very usefull but not really needed for this purpose. Still i keep them in mind for eventual use in the future. Again thanks therefor.

@khalil.

Believe me. that was my 1st solution i mentioned. But if it was possible i had to solve it with the software.
 

Similar Topics

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,065
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
412
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
10
Views
1,965
I'm trying to save a project as an L5X and I need to uncheck the "Encode Source Protected Content" checkbox, but it's grayed out. How do I get...
Replies
1
Views
939
Hello. I have been working on my first plc project for a while now. I just ordered all the parts that I need and before I did that, I created the...
Replies
10
Views
2,021
Back
Top Bottom