plc s7300 and absolute encoder 10 bit(1024 binary)

tid_champ

Member
Join Date
Mar 2011
Location
bkk
Posts
30
Hi
I want to read degree from absolute encoder 1024 binary by plc s7300.
Please Describes the functionality of the absolute encoder 1024 binary and Programming Example.
Thanks.
 
What PLC language

Hi tid_champ
I'm not familiar with Siemens but I know everything about absolute encoders :ROFLMAO: I also make PLC programming using Beckhoff soft PLC.
What kind of encoder interface (SSI ? )
 
Hi tid_champ
I'm not familiar with Siemens but I know everything about absolute encoders :ROFLMAO: I also make PLC programming using Beckhoff soft PLC.
What kind of encoder interface (SSI ? )
Inter face with 1byte and 2 bit.

20151017_162246.jpg
 
Last edited:
That is a parallel ecoder

As I said I don't know Siemens but you just connect the 10 cables to 10 inputs and +/- 24V.
Then you assign these input to an int (think Siemens say word).
If you read that word you will get the value from the encoder.

I don't know what you will do with the encoder value but Binary parallel encoders has a problem that the PLC sometimes read the wrong value.
Normally Gray code is used with PLC.
If you just show the value on a monitor you will probably not notice the problem.
I program in Structured text (think it is seldom used in Siemens world)
MY Guess! is that it something like this in instruction list (AWL)
Load PW123
AND (mask if bit 10-15 are used for something)
Store "EncoderValue"
Bjorn
 
In my program it looks like this:
VAR
Encoder: WORD;;
realDegree: REAL;
END_VAR


LD Encoder
AND 16#3FF
ST Encoder

LD Encoder
MUL 0.35
ST realDegree
 
You are welcome.

No I'm retired Swedish but I live in Thailand for 8 years now helping with support for trelectronic.co.th .
Support TR Electronic encoders and Beckhoff PLC systems.
If you need support regarding encoder or PLC (regardless of brand) you are welcome to ask us maybe we can help.
Everybody else here speaks Thai.🍻
 
You need to convert the Gray Code 10 point input to Binary Word and store it in an integer where you can read it in a decimal format as pure Gray Code read in a decimal format the numbers are all over the place.
 
Looks like the tag on that encoder says 1024 Binary? if that is the case then I would try moving the result from each input directly to an integer-word then use the PLC look at it in decimal.
If even 1 wire is not hooked up correctly it be missing one or more of the binary inputs to the PLC.
 
Last edited:
Reading Binary value

Hi
Sorry I missed your comment in November I was in Sweden that month.

Yes you are correct you have to connect 10 data to 10 inputs and read them as word at the PLC.
You will automatically get the correct decimal value if you connect in the correct order.
When you write your program you have to be a bit careful because using binary code you will get wrong value some scans.
Normally a PLC uses Gray code then you will get correct value every scan but you have to convert from Gray to Binary in the PLC.
Gray 10 is only used by none binary resolutions and in BCD code, for example an encoder with 360 step will need 10 cables 4 will have value 0-9 next 4 0-9 and the last 2 for the 3:d digit (3 in 360) need only 2.
Then you have to convert Gray10 (BCD) to Binary in PLC so it is not used very often nowadays.

Bjornf
 

Similar Topics

Hi Any one here please helpmein simulation of s7 300 plc program with factory io. how to connect. plcsim 5 doesnot have option of s7 300 ..:
Replies
2
Views
1,011
Hi all, I am tasked with quoting a solution in which our two S7300 PLC's with added 343-1 LEAN CP is supposed to communicate with two WAGO IPC...
Replies
5
Views
2,956
I have got a PLC S7-300 communicating to a device running Profinet IO. I have a shared data block (DB1) with few attributes. I want to know the...
Replies
0
Views
1,924
dear sir we have 840d cnc with s7300 plc. Can you give me some information about Transfer procedure of Auxiliary H function "CNC to PLC"
Replies
0
Views
2,435
Hi All, I have a simple question about PLC siemens S7300 CPU315-2PN/DP and I would be grateful if you could help me. In which way I can get a...
Replies
3
Views
2,620
Back
Top Bottom