You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old March 1st, 2021, 08:12 PM   #1
Navanes
Member
Malaysia

Navanes is offline
 
Join Date: Mar 2021
Location: Malaysia
Posts: 2
How to save ENcoder initial value

Hi experts,
im new to PLC programming
im using siemens plc(315) and Fraba absolute encoder

my project is to activate output (Q4.5) when encoder moves 1 meter

but I don't know how to program it

currently I able to get the encoder reading by using below code

L PID 256
T MD 256

L MD 260
T PQD 256


can please help to to give example codes on how to program encoder to activate output when encoder move 1 meter

thank you very much
  Reply With Quote
Old March 1st, 2021, 10:13 PM   #2
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 720
Quote:
Originally Posted by Navanes View Post
Hi experts,
im new to PLC programming
im using siemens plc(315) and Fraba absolute encoder

my project is to activate output (Q4.5) when encoder moves 1 meter

but I don't know how to program it

currently I able to get the encoder reading by using below code

L PID 256
T MD 256

L MD 260
T PQD 256


can please help to to give example codes on how to program encoder to activate output when encoder move 1 meter

thank you very much

Which programming environment are you using, classic Step7 or TIA Portal and if the latter, which version?
Why STL????????



I have no idea what you wrote above and don't really want to know. But the concept is what matters.

Depending on the encoder resolution, it RPM and scan time you will determine if you need a high speed counter or not.
HSC will do some of the work for you; you give it a count number (equivalent to that one meter) and it will trigger an interrupt when it gets there; in the interrupt you put code that you could use in the program to turn on the output.
Without HSC, you basically need a compare instruction so that when Current_Count >= Trigger_Count you set a tag as above and your code will turn on the output.
  Reply With Quote
Old March 1st, 2021, 10:40 PM   #3
Navanes
Member
Malaysia

Navanes is offline
 
Join Date: Mar 2021
Location: Malaysia
Posts: 2
Hi Expert,

I'm using step 7ver5.6

the code I use is I took from youtube tutorial

I believe step 7ver5.6 don't have hsc function, please guide if i can use other languages ladder or function block

yes i can do these( Current_Count >= Trigger_Count )

this program is for safety system
The input (0.1 n 0.2) which is joystick controlling the machine movement.
so if input 0.1 and 0.2 is not detected but the machine moves, an emergency lock should be triggered

I wanted the encoder to read both directions,
from the initial position, if moved certain distance to the right or left (but no signal from 0.1 n 0.2), it should trigger the output (the emergency lock)


so how to capture the initial value of the encoder when no signal from 0.1 and 0.2 and compare if it move certain distance
  Reply With Quote
Old March 2nd, 2021, 12:24 AM   #4
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 720
Quote:
Originally Posted by Navanes View Post
Hi Expert,

Good one


Quote:
Originally Posted by Navanes View Post

I believe step 7ver5.6 don't have hsc function,

Sehr interessant.


Quote:
Originally Posted by Navanes View Post

this program is for safety system


You really need an expert advice, and that's not me. Hang on tight and hope for someone to pop into this thread and provide some guidance.
  Reply With Quote
Old March 4th, 2021, 08:01 AM   #5
Rob...
Lifetime Supporting Member
United Kingdom

Rob... is offline
 
Join Date: Jul 2016
Location: Manchester
Posts: 314
L #Enc //Encoder PID
DTR
L #PulsePerMM //How many pulses per mm
/R
T #Position //Position in mm


For these encoders, you need to give it a position value to work from. Their manual is quite clear on how to do this.

However, not safety rated. So if you actually require this to be part of a machine safety circuit it will not be compliant. At least not to EN60204-1
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PF753 Encoder Problem Mark Snodgrass LIVE PLC Questions And Answers 0 June 25th, 2018 07:50 AM
Powerflex 525 Encoder for Speed Feedback ASF LIVE PLC Questions And Answers 5 September 12th, 2017 06:45 PM
Encoder Count Drift marcwand LIVE PLC Questions And Answers 9 March 26th, 2012 02:13 PM
Powerflex 700S2 / 2 encoder problem Bitpopler LIVE PLC Questions And Answers 3 August 31st, 2008 10:21 AM
does the gear box affecting the positioning value???? common LIVE PLC Questions And Answers 3 July 6th, 2002 05:11 PM


All times are GMT -4. The time now is 10:22 AM.


.