programming of Analog input

tulip

Member
Join Date
Oct 2005
Location
ist
Posts
236
I connected a potantiometer to analog input module (SM331 module, S7-300 ).How can I write a programme for reading this analog input?..And what is the matter for programming if I change potantiometer ? (for example 2 kohm instead of 5kohm )
Thanks in advance....
 
tulip said:
I connected a potantiometer to analog input module (SM331 module, S7-300 ).How can I write a programme for reading this analog input?..And what is the matter for programming if I change potantiometer ? (for example 2 kohm instead of 5kohm )
Thanks in advance....

The analog card is designed for inputs of 4-20ma, 0-20ma, 0-10v etc. How do you intend to produce these voltages or currents with your potentiometer?

Robert
 
Hello tulip;

Once you have selected the analog input module you will use and designed the circuit that will provide the voltage or current range that can be read by that analog input module (and this is your first issue, as was pointed out by Mr. Stone), the next steps are:

-Place it in the PLC rack (if it is not there yet); on some AI modules, capable of different voltage/current ranges, there are some square hardware dongles (on the side of the module) that must be adjusted for each channel, depending on the range you will use for your process. Details are provided in the docs accompanying the module, or the S7-300 Module Data manual (available from Siemens' website).

-In the HardwareConfig editor, select the correct module, insert it (drag & drop) in the correct slot; double-click on the module to open the properties page, and select the appropriate voltage/current range for each channels, the hardware interrupts if available...:

S7_AnIN_Conf.jpg



Notice the addresses given to you by the configurator (here, Inputs 256...271). This represents 16 bytes, or 8 words, one for each channel. Channel 1 will be read at address PIW256, channel 2 at address PIW258...

The numerical values that the program will recieve from each channel will be in a range 0-27648 for a valid reading (0-10 V, 4-20mA); anything below is a underflow error, anything over is an overflow. Again, this is explained in the manual cited above.

To scale the 0-27648 numerical value to engineering values of your choice, esaiest is the function FC105, "SCALE", that you will find in the Libraries tab of the Ladder editor, in the TI-S& blocks.

Hope this helps,
Daniel Chartier
 
Last edited:
Good description. I'll keep that one as a reference for my techs. I think getting past the pot on the input terminals might be hard to explain. LOL.

Robert
 

Similar Topics

In this sample programming, what does U4 mean? Any assistance would be greatly appreciated.
Replies
8
Views
273
This is my first Siemens PLC programming. I got a PLC 315-2DP with 1 DI, 1 DO and 1 AI modules. I have already configured the modules and then...
Replies
7
Views
10,580
DEAR ALL, PLEASE KINDLY HELP ME, TO WRITE PROGRAM FOR ANALOG INPUT(4-20mA). I AM USING MITSUBISHI PLC FX3U-4AD-ADP MODULE. PLC SOFTWARE IS GX...
Replies
6
Views
7,587
Can someone give me a programming example of an analog input using Simatic manager. I am using CPU 314 IFM. Im need to get a 0-10 vdc input from a...
Replies
18
Views
14,956
Hello , i would like some help on how to program analog inputs , 4-20 ma , 0-10vdc using slc 500's......if anyone could show me as far as do you...
Replies
4
Views
2,281
Back
Top Bottom