This 16-bit word will show a 4-character hex number. The tag's value can be monitored in the Default tag table, but it is a hexadecimal value by default. When the analog-to-digital converter (ADC) provides an output to the PLC, it is converted to a standard value range of 0-27648, meaning that 0 V display a ‘0’ for Analog_In_1, and exactly 10 V display a ‘27648’.Īt this time, you could connect and navigate to a watch table to see the value. In this way, both analog input tags can be created using the data type: Word and the starting addresses, as shown below.īack in the Main program block, a ladder rung can now be designed to convert or store the analog value to perform any desired task. Select the I/O addresses under the Analog inputs, which will display the start and end addresses for both inputs.Īs you can see below, the first input consumes addresses 64 and 65, and then the second one consumes 66 and 67.įigure 4. If the PLC is selected, there will be a ‘Properties’ window open at the bottom of the screen. In your project, double-click on ‘Device configuration.’ What Is the Memory Address for the Analog Inputs in an S7-1200? Since it takes up two addresses, the second analog input begins at address IW66. The first analog input begins at memory address IW64. ![]() Since the analog inputs are built into the hardware, the memory allocation for both inputs is also baked right in, but they are not simply the first two addresses-it’s a bit more complex. This is called a ‘word’, so we must create a Word data type. However, in the TIA Portal, these are constructed as two bytes, consuming two consecutive byte memory addresses. The size of the variables created for analog inputs is 16 bits most of the time, these would be called integers (INTs) with a single address. This time, we need to create tags for the analog points, but they are no longer discrete tags. Visual representation of the top of an S7-1200 with the analog terminals on the upper right (note: not all digital terminals may be shown).Ī keen mathemetician may notice that this voltage divider will not precisely reach 10 V, but as luck would have it, my old potentiometer exceeds 1 kΩ, so the net result is a tutorial that must address calibration in order to achieve a correct output.įollowing the previous tutorial, a few tags were created to connect some discrete I/O points. If the inputs are measured with respect to the (-) 24 V rail, then this 2M terminal should also be connected to the common (-) 24 V rail.įor this example, a simple 1 kΩ potentiometer (3 terminal adjustable resistor) is configured with a 1.5 kΩ resistor in series with the 24 V supply to ensure that the variable voltage never exceeds 10 V.įigure 2. ![]() As expected, 0 and 1 are the analog voltage signal inputs, but the 2M is the common ground. Located at the top right corner of the PLC is a set of three analog terminals, 2M, 0, and 1. If the desired sensor or original device is a 4-20 mA current signal, there are modules and signal boards designed for such current signals. In the built-in analog channels for this PLC, the 0-10 V range is the permanent configuration for inputs. To understand inputs to the S7-1200 platform, we will first look at the wiring, then discuss the programming required to interpret the voltage at the terminal into a memory-mapped variable. Analog outputs will be covered in the next tutorial installment. The Siemens S7-1200 PLC contains many built-in I/O points but can be expanded with modules of all kinds.Īnalog outputs are a bit less common in the modern world of high-speed digital networking but are often still used to transmit specific variable signals to motion drivers and process control modules. Rarely does an industrial system rely exclusively on discrete on/off signals, so the natural second level of understanding should include analog signals.Īnalog inputs bring data from sensors, such as temperature, pressure, or set points from variable resistors.įigure 1. ![]() ![]() In a previous tutorial, we investigated the process of designing a new project in Siemens’s TIA Portal, then connecting and downloading a simple program to the S7-1200 PLC platform, illustrating a few simple coil and contact commands. Intro to Siemens S7-1200 PLC and TIA Portal Programming Check Out the First of Our Siemens TIA Portal and S7-1200 Tutorials:
0 Comments
Leave a Reply. |