Beckhoff Twincat EL5101 to measure speed with Heidenhain Incremental Encoder

Sohaib28

Member
Join Date
Aug 2015
Location
Cottbus
Posts
31
Dear Members:

I am new in Beckhoff Twincat system. I am working on a project. I am using CX9020 as my embedded PC. I have connected EL5101 as incremental encoder interface with CX9020. I was able to find EL5101 in my system manager. The operation mode is Free Run/SM-Synchron and EL5101 is in OP mode. The power and the run LED is green. I have also configured the NC-configurations. I have Append Axis and then selected Encoder Axis in the types. In my Axis_Enc I have linked NC-Encoder with EL5101. Now the EL5101 ENC Status compact inputs and ENC Control compact outputs are now linked to variables in the Axis_Enc in the NC-Cofigurations.

Now I don’t know what to do next. I have not connected Heidenhain incremental encoder ERN 460 with my EL5101. I have 3 different input terminals
AA’,BB’,CC’ and also Latch 24V and Gate 24V in my EL5101. The incremental encoder also have 3 types of output wires AA’,BB’,CC’. Also the incremental signal of my ERN 460 is 5V TTL.
I want to know do I need to connect all the output wires of encoder AA’ BB’ CC’ to their corresponding terminal in the EL5101? What about Latch 24V and Gate 24V? What I have to do with these terminals?

Is there any sample program or any step by step guide that how can I measure rpm through this setup? What kind of variables and data type I have to define in my PLC Control and to which physical input and outputs I have to link them? Is there any high speed counter in Twincat PLC Control and How can I get it?

Please reply. I shall be very thankful to you.
 
I want to know do I need to connect all the output wires of encoder AA’ BB’ CC’ to their corresponding terminal in the EL5101?
Yes. Don't forget the 24VDC power to the encoder of course.
What about Latch 24V and Gate 24V? What I have to do with these terminals?
Those are optional, in case you have an application where you need to capture the encoder reading. It is like a trigger button taking a momentray snapshot.

Once the encoder is connected, look at the registers of EL5101. You should be able to see values changing as the encoder rotates.
 
Dear Ladder Logic:

Thanks for your reply

Do you know how can I get a high speed counter in Twincat PLC control?
Because I want to design a program that will read the rpm of the motor. I think I can only do this by using a high speed counter in my program.
 
Capture.jpg

I just created a quick configuration with an EL5101 terminal. As you can see, there is a UINT variable called "Counter value"; if you link it to a variable in a PLC program, you will be able to read the high-speed counter value there.
 
It looks like you have a CX9020 with the NC-PTP runtime.
If that is true, then link the EL5101 properly to an NC-Axis. Then the PLC program can be linked to the NC axis and the velocity can be read directly without much logic.
Use MC_Power to power the encoder, perform a Read_Status and the velocity can be read by Encoder.NcToPlc.ActVelo
 
Dear AJZ:

I am able to measure the frequency right now. I can see the value in my Twincat PLC control. I defined the variable ''Input AT %IW: UDINT;'' and then I linked the variable with my physical input. I selected frequency by clicking on the required PDO's.

Now the question is I have the frequency right now. What type of program I have to create in order to measure the rpm?. What plc program I have to create in order to link it with NC axis. How to use use MC_Power? How to perform a Read_Status? Please tell me. It would be very nice if you attach some pics here.

Thanks
 

Similar Topics

Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
920
Hello, I was wondering if anyone know how to upload a PLC program to the Beckhoff TwinCAT 3 from a file? i.e. without having the development pc...
Replies
0
Views
728
Hi anyone got any tips and tricks?? I'm at a stage wherei need to tidy up my hmi project and give all objects sensible names, I did start this...
Replies
0
Views
946
Hello, I have a System running a beckhoff IPC with twincat 2 software on it, Also i have no original source code. Is it possible with the...
Replies
1
Views
1,263
Hi all, I've inherited someone else's program and can't for the life of me figure out his use of the # symbol in one of his structured text...
Replies
5
Views
1,909
Back
Top Bottom