Siemens PLC 95U - Analog Value Processing

K

Thread Starter

Kiran Kirtane

I want to know how analog modules are addressed in 95u/100u ? How the values are read & written by the program?

Also how a Serial Interface Module data is read / write by the PLC program ?

Experts comments please......!!!!!!!
 
Hi, Hopefully I can help with your first question.
You need to use two standard function blocks :
FB250 RLG:AE Read in and scale analog value
FB251 RLG:AA Output analog value

Both of these are intergrated into the CPU's operating system.
Example:
JU FB251
Name :RLG:AA
XE :DW 45 Analogue value to be outputed
BG :KF +1 Slot Address
KNKT :KY 1,0 Channel / Type 0=Unipolar
ORG :KF +1600 Upper Limit
URG :KF +0 Lower Limit
FEH :-F23.4 Invalid slot or Channel
BU :-F23.5 Outside Upper or Lower

JU FB250
Name :RLG:AE
BG :KF +0 Slot Address
KNKT :KY 1,3 Channel / Type 3=4-20mA
ORG :KF +1600 Upper Limit
URG :KF +0 Lower Limit
EINZ :-F1.0 N/A
XA :DW46 4-20mA value to to be scaled
and written to.
FB :-F23.6 1 On Wire break
BU :-F23.7

Dont forget to call your DB before the FB's.
Hope this helps.
Robin
[email protected]
 
H

Hakan Ozevin

Each analog module reserves 8 bytes of process image area, starting from address 64. Each channel on the module uses 2 bytes. For example, Channel 1 on module 0 has the address IW66/QW66.
You can use integrated blocks FB250 and FB251 to read and write data easily.

For CP521 serial interface module, jobs are sent using PIQ area. For example:
L KH5000
T QW120
will make a page feed on the printer connected to CP521.
Data exchange is via communication DB's.

You can download S5-100U and CP521 SI manuals from Siemens websites for detailed information.
 
M

Michael Griffin

> I want to know how analog modules are addressed in 95u/100u? How the
> values are read & written by the program? Also how a Serial Interface
> Module data is read/write by the PLC program?
<clip>

Analogue module addressing is covered in the manual for this processor, which you can download from the Siemens web site for free. There is much more detail in the manual than can be covered here.
However, the analogue address space begins at IW64 and QW64, with 8 bytes of input and 8 bytes of output per slot, and a maximum of 8 analogue slots (the first eight slots).
You can read and write the values either directly, or via a pair of built in function blocks (in the 95U). The built in function blocks offer scaling to engineering units, so it is usually most convenient to use them rather than direct read/write. I don't recall the block numbers, but this is covered in the manual. If you are using the on board analogue I/O for the 95U then see the section on configuring the on board I/O
using DB1.

The serial interface module (I believe you are referring to the CP521 SI) is addressed as an analogue module. The same applies to the high density digital I/O cards. The CP521 SI would normally be communicated with via a special function block (not built in) which transfers blocks of data over multiple bus cycles to allow more than 8 bytes to be sent or recieved. There is an individual manual for this module which explains how this works. The CP521 Basic module operates in a similar fashion, except it has a built in Basic interpreter.


--

************************
Michael Griffin
London, Ont. Canada
************************
 
Hello;
I would suggest you start by going to the Siemens support webpage and downloading the manual for the S5-95U:
http://www4.ad.siemens.de/csinfo/livelink.exe?func=cslib.csinfo2&siteid=cs&lang=en

You will find that analog modules in the 95U can be installed only in slots 0-7, and the physical address is linked to its slot. For example, in slot 1, analog addresses are 72 to 79, in slot 2, 80-87... Strandard FB 250 is used to read an analog input; DB1 has to be modified to allow the CPU to handle the number of analog channels in the project.

Let's say you have an analog input module (4 channels) in slot 1, address 72. The representation in memory of the analog value must be shifted to the left by 3 places (SLW 3) because the 3 LSBits are used for internal signals to the CPU (wire break and such). So to prepare the analog input value for treatment by FB250, you would hve to program the following sequence:

L IW 72 //READ IN RAW DATA FROM ANALOG INPUT CHANNEL
T FW 72
L FB 72
SLW 3
T IW 72
 
Top