It is currently Sat May 18, 2013 7:15 pm
       


All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: rising / faling edge detection
PostPosted: Sat Jan 28, 2012 11:28 am 
Offline
arexx.com user
User avatar

Joined: Thu Mar 31, 2011 8:07 pm
Posts: 5
Location: The Netherlands
Hello,

I am trying to detect a rising edge of an input.
Normally when i use PLC controls there is a commando to detect a edge.
how is this done in C or C++ language?
Are there any examples?

thanks in advance.
Patrick

Edit by Admin: Thread moved, obviously wrong Forum.


Top
 Profile E-mail  
 
 Post subject: Re: rising / faling edge detection
PostPosted: Sat Jan 28, 2012 1:12 pm 
Offline
arexx.com user

Joined: Thu Oct 16, 2008 1:08 pm
Posts: 190
It depends on the electronics/microprocessor involved. What product are you talking about? Is it one of the robots, or the Arexx measurement products?


Top
 Profile  
 
 Post subject: Re: rising / faling edge detection
PostPosted: Sun Jan 29, 2012 8:57 pm 
Offline
VIP - AREXX STAFF
User avatar

Joined: Thu Jun 23, 2005 10:52 am
Posts: 693
Location: Zwolle
hi,

you will always have to remember the last state.

if current-state is 1 and last-state is 0 then (remember current-state as last-state) a rising-edge has occurred.
if current-state is 0 and last-state is 1 then (remember current-state as last-state) a falling-edge has occurred.
if current-state unequals last-state then (remember current-state as last-state) an edge is detected.

Henk


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group