Analogue input to a s7-200

Bridon_CE

Member
Join Date
Mar 2008
Location
Doncaster
Posts
1
I am new to programming an Analogue input and output to a s7-200. Can anyone give me an idea of where to start?



The input will be a 0-20 mA

Output either 0-10V or 0-20mA



Sketch, point in the right direction, help files, any help would be great.
 
Try the S7-200 Programming manual? Analog inputs come in as input words, and are a numeric value representing the scale of the input. Analog outputs are output words, which will be assigned a value to indicate the output voltage desired. AIW and AQW and addressing expansion blocks are described in Chapter 4.
 
Hi Bridon:

The first, you have to do the electrical connections properly. You have to configure all the inputs of a card in the same way (in this case 0-20 mA). For example, using a EM231:

AnalogInput_.JPG


And you have to set the microswitches at the bottom of the card like this:

SwitchesForEM231_.JPG


For outputs it is easier, you only have to connect them in the right way to select voltage or current output. For example, using a EM232:

AnalogOutput.JPG


Addressing:

Starting from left to right, only matters the relative position: AIW0, AIW2, AIW4...

It's the same for outputs: AQW0, AQW2, AQW4... and they are independent of the inputs.

Processing the Value:

If you capture the value from the input AIWn, you will get a INTEGER VALUE from 0 to 32000. 0 for 0 mA, 32000 for 20 mA.

You have to do a mathematical conversion to obtain the real value you are measuring. For example, if your sensor gives you 0 mA at 20ºC and 20 mA at 60ºC, you have to:
  • Convert the INT value to REAL
  • Divide it by 800 ( because 32000/(60-20) = 800 )
  • Add 20 (because 0mA --> 20ºC)
Yo may calculate it easier using a function from Nubitek Free Utils. It helps the programmer to obtain the real value from the analog sensor.
http://www.nubitek.com/section02/pr10-free_utils.htm

AnalogAdapter.JPG


You have to do the opposite proccess for analog outputs. You want to get a reponse as a real value range at your external device, so you have to write a value between 0 and 32000 in the AQWn field.

Good luck with that!

Regards,

Lorenzo Rivas
www.nubitek.com
 

Similar Topics

Hi, I have a ControlLogix system with 1756-IF16 analogue inputs. I can't scale the inputs at the card as there is a requirement to facilitate...
Replies
12
Views
261
Hello guys I am just wondering do I need to set up each channel configuration, including enabling the channel , ranging … if I have already...
Replies
8
Views
2,014
Hi, I have a device which is giving out a 4 -20mA signal but the ADC's on the PLC channel do not match. The supplier is saying the channel needs...
Replies
2
Views
759
Hi, I'm planning to install a new Analogue Input module Q68AD-G. It will inserted on Rack 0 Slot 4. When it's installed, will the code recognise...
Replies
6
Views
2,430
Hi, I've got a Q68AD-G card (8 channel). I want to configure it for 0-10v analogue input. I've enabled the channel by using Un\G0. Then I used the...
Replies
4
Views
1,829
Back
Top Bottom