ElectricalChile

Profiter L'Ingénierie

PLC LOGO! Cabinets Learn Spanish Solutions SPANISHSPA


How to Programming Analog Inputs 4-20mA in PLC S7-1200






First, We must to know these concepts:

Must Knowledge

Computation
Electricity
First Time with PLC S7-1200





PASO 1 : NECESSARY ELEMENTS

First Remember have all elements to use Hardware and Software

PLC Siemens S7-1200 and all PLCs use a Software to Program and Create the program to execute in automation, the most important elements to start in PLC:

If we don't have the Original CD Software, can Download TRIAl Versión in HERE TRIAL VERSION SIEMENS WEBPAGE it may be useful to understand and start to Configure a PLC S7-1200



STEP 2: Software Configuration

Select the Hardware Module Analog Inputs in TIA Portal

First must to be in Device Configuration, in side Hardware Catalogue, search and take the right AI Module, to work with 4-20mA need 16 Bits Module




Let's go to configure AI Module Channels in Properties => General => Analog Inputs here you need to configure the type of analog inputs that will recieve the PLC in the Channels you will connect Sensores o Transmitters

Must to Configure:

  1. Measurement Type In this case Sensor give us signal 4-20mA so, select Curremt
  2. Current Range 4...20mA
  3. Channel Address This is a very important variable because will work directly with this "address"

Next go to I/O TAGS, and add the name of the Sensor and we can see we have a Variable %IW, The AI Modules have address %IW that we identify in Software for after configure and scale

Now that the Hardware is configured, let's start the PLC Programming!



PASO 3: Programming Analog Inputs

This is the moment to create the program and start to scale and configure

ADD the follow important blocks: NORM y SCALE

Identify:

  1. NORM_X This block is "Normalize" this means normalize and "Scale" INT in a REAL Value, this block too scale and normalize the value 4-20mA from Sensor in a new Software Value 0-27648

  2. SCALE_X Here we scale 2 values Real and Real; Software Value 0-27468 in a new and final scaled value, in this case 0-100 is the Measurement Range of the Sensor, we must to consider this range

  3. IW96% This value is the same we have see in steps before (step 2) when we were configuring our Hardware; how we can see this is the first Address connecting in the block NORM_X

  4. But now what happens with.... Signals ???

  5. The moment to work with Flags M% has arrived!; take note this is very important

Now go to side screen and will start to create the important variables to finish the scaling

VERY IMPORTANT KNOW ABOUT AI:


Then back to "Program Blocks" to finish the PLC Programming

So, we are ready with the scaled value from Sensor into Final Real Value:


Sensors Scaled in a Linear Function

s


PASO 4: Activate By Analog Inputs

Gonna see the most basic form to create a Output of the measured value

The most simple way to create a Output is by "Comparator Operations"

In the side of Instrucctions select the comparator we want to use, in this case we choose the instruction "higher than" and in this block the output will activate when value >50 is higher;, this value remember is the final scaled with MD104 TAG; then add TON Timer ... WHY? Because if we don't control it; between 50-51 "do ON and OFF in milisecond, common error that you may fix with a timer", of course all depends if the process is very critical or not; sometimes you can do it!

Almost finish go to PLC TAGS abd create a Output with a "M" and give address M1.1


Back to Program Block and now assigned the value M1.1 in a Coil to after create a Digital Contact


Finally select and configure a real Output "Q", Go to Device Configurations and choose in I/O Tags the Output "Q" will use, in this case Q0.0


Back to our Block Program and finally add the Address what we need to finish; Q0.0




PASO 5: Connecting and Wire Sensors

Let's see the 3 types of Analog Sensor wire in a AI Module S7 1200

The number of wires used in Sensors that connect AI Modules are 2 - 3 or 4 wires

And in our example... what Sensor we have configurated???



QUESTIONS & ANSWERS

HERE IS ANSWERED YOUR QUESTIONS:

  1. Where can Download TIA Portal V13 o higher Trial Version??
    You can download Trial Download Here in Siemens Webpage ,Also download PLC Sim may helps you to simulate software before start and run, TAKE NOTE, The original CD and Licence allows you assure the correct compatibily between Software and Hardware (PLC)

  2. Why Signal 4-20mA is the most used in Analog Inputs (AI)?
    You can find some advantages GO STEP 2 but always is important mention:
    - Better for a long distances
    - Most tolerant to Electronic Noise (avoiding high values)
    - The Current 4mA is point "0", it means always in the measure must be powered, if we don't have Voltage so we have a Wire Break, Never the wire must to be "0 Volts"
    - The most choosed signal for a most technology Sensors (really it has advantages)

  3. How wire and connect different Sensors o Transmitter in Analog Input Module PLC S7-1200?
    The most used 3 types of Sensores have 2-3 or 4 wires, to see how to connect to AI Module in PLC S7 1200 GO STEP 5

  4. Why Can't communicate PC and PLC S7 1200?
    Communication between PC and S7-1200 is via ETHERNET (TCP/IP); you can verify is your PC is in same Subnetwork than PLC, remember IP S7-1200 has assigned in "Profinet Interface" 192.168.0.x above in page GO STEP 3 HERE