plc.myforum.ro Forum Index plc.myforum.ro
PLCs users www.plc.myforum.ro!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TIA v12, 2-bit gray code

 
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> Simatic Automation Systems
View previous topic :: View next topic  
Author Message
christensen
Junior 2
Junior 2


Joined: 16 Aug 2014
Posts: 25

PostPosted: 31/01/2015 20:03    Post subject: TIA v12, 2-bit gray code Reply with quote

Hi,

I have an issue with reading an optical sensor which have 2-bit gray code output.

I had search in TIA v12 for a library with gray code but i didn't found.

How could i read/convert the sensor gray code output.
Mainly i'm interested to determine the direction and than apply to a counter.
Back to top
View user's profile Send private message
scooby
Member
Member


Joined: 25 Aug 2013
Posts: 238
Location: Dunquerque

PostPosted: 31/01/2015 21:06    Post subject: Reply with quote

Project S7 V5.5 with FC for gray conversion
http://www.datafilehost.com/d/0f6fd0ae
Back to top
View user's profile Send private message
scooby
Member
Member


Joined: 25 Aug 2013
Posts: 238
Location: Dunquerque

PostPosted: 31/01/2015 21:16    Post subject: Reply with quote

or
download the OSCAT library
http://www.oscat.de/downloadmanager/viewcategory/3.html
will find gray functions
and adapt to V12
the same with above function with convert projects or write code
Back to top
View user's profile Send private message
scooby
Member
Member


Joined: 25 Aug 2013
Posts: 238
Location: Dunquerque

PostPosted: 31/01/2015 21:24    Post subject: Reply with quote

TIA v12, 2-bit gray code



TIA v12, 2-bit gray code
Back to top
View user's profile Send private message
scooby
Member
Member


Joined: 25 Aug 2013
Posts: 238
Location: Dunquerque

PostPosted: 12/02/2015 21:23    Post subject: Reply with quote

How do you convert values from Gray Code to BCD code in STEP 7 (TIA Portal)?
Use STEP 7 (TIA Portal) V13 SP1
TIA v12, 2-bit gray code


TIA v12, 2-bit gray code


TIA v12, 2-bit gray code

Call the "Gray_to_BCD" block in your user program if you want to convert a Gray Code into a BCD Code. The block can process an encoding of up to 32 bits maximum. You do not need to interconnect points you do not need.
Call the "BCD_to_Gray" block in your user program if you want to convert a BCD Code into a Gray Code. The block can process an encoding of up to 32 bits maximum. You do not need to interconnect points you do not need.
TIA v12, 2-bit gray code

The download includes the TIA Portal library "Gray-Code.zip".
https://cache.industry.siemens.com/dl/files/824/109037824/att_826837/s1/gray-code.zip
Back to top
View user's profile Send private message
christensen
Junior 2
Junior 2


Joined: 16 Aug 2014
Posts: 25

PostPosted: 20/02/2015 18:54    Post subject: Reply with quote

could you please upload somewhere else the zip file because i can't download.

Thanx
Back to top
View user's profile Send private message
scooby
Member
Member


Joined: 25 Aug 2013
Posts: 238
Location: Dunquerque

PostPosted: 21/02/2015 17:24    Post subject: Reply with quote

christensen wrote:
could you please upload somewhere else the zip file because i can't download.

Thanx

last file
http://www.datafilehost.com/d/2318bcc0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> Simatic Automation Systems All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro