Must Knowledge
ComputationFirst 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
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:
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!
This is the moment to create the program and start to scale and configure
ADD the follow important blocks: NORM y SCALE
Identify:
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:
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
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???
HERE IS ANSWERED YOUR QUESTIONS: