| View previous topic :: View next topic |
| Author |
Message |
christensen Junior 2

Joined: 16 Aug 2014 Posts: 25
|
Posted: 31/01/2015 20:03 Post subject: TIA v12, 2-bit gray code |
|
|
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 |
|
 |
scooby Member

Joined: 25 Aug 2013 Posts: 238 Location: Dunquerque
|
Posted: 31/01/2015 21:06 Post subject: |
|
|
Project S7 V5.5 with FC for gray conversion
http://www.datafilehost.com/d/0f6fd0ae |
|
| Back to top |
|
 |
scooby Member

Joined: 25 Aug 2013 Posts: 238 Location: Dunquerque
|
Posted: 31/01/2015 21:16 Post subject: |
|
|
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 |
|
 |
scooby Member

Joined: 25 Aug 2013 Posts: 238 Location: Dunquerque
|
Posted: 31/01/2015 21:24 Post subject: |
|
|
 |
|
| Back to top |
|
 |
scooby Member

Joined: 25 Aug 2013 Posts: 238 Location: Dunquerque
|
Posted: 12/02/2015 21:23 Post subject: |
|
|
How do you convert values from Gray Code to BCD code in STEP 7 (TIA Portal)?
Use STEP 7 (TIA Portal) V13 SP1
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.
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 |
|
 |
christensen Junior 2

Joined: 16 Aug 2014 Posts: 25
|
Posted: 20/02/2015 18:54 Post subject: |
|
|
could you please upload somewhere else the zip file because i can't download.
Thanx |
|
| Back to top |
|
 |
scooby Member

Joined: 25 Aug 2013 Posts: 238 Location: Dunquerque
|
Posted: 21/02/2015 17:24 Post subject: |
|
|
| 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 |
|
 |
|