实例讲解丨PLC如何使用模拟量?— Example explanation丨How does PLC use analog quantities? 

 

实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 

首先我们了解一下什么是数字量和模拟量?为什么PLC需要使用模拟量?
First, let’s understand what digital and analog quantities are? Why does PLC need to use analog quantities?

数字量 digital quantity

数字量是物理量的一种。它们的变化在时间上是不连续的,总是发生在一系列离散的瞬间。这一类物理量叫做 数字量。也就是离散量,指的是分散开来的、不存在中间值的量。
Digital quantity is a type of physical quantity. Their changes are discontinuous in time and always occur in a series of discrete moments. This type of physical quantity is called digital quantity. That is, discrete quantities refer to quantities that are scattered and do not have intermediate values.

模拟量 Analog quantity

模拟量是指变量在一定范围连续变化的量;也就是在一定范围(定义域)内可以取任意值(在值域内)。
Analog quantity refers to the quantity of a variable that changes continuously within a certain range; that is, it can take any value (within the value range) within a certain range (definition domain).

数字量是分立量,而不是连续变化量,只能取几个分立值,如二进制数字变量只能取两个值。
Digital quantities are discrete quantities, not continuously changing quantities. They can only take on a few discrete values. For example, a binary digital variable can only take on two values.

那么对于实际的工业应用而言,数字量和模拟量都是必不可少的。
So for actual industrial applications, both digital and analog quantities are essential.

因为在工厂的自动化控制中,我们需要对温度,压力,液位,深度等等数据进行监控并控制。
Because in factory automation control, we need to monitor and control data such as temperature, pressure, liquid level, depth, etc.

比如说一个锅炉的控制,我们需要水烧到一定温度,一般来说该温度是可调的,比如说50摄氏度,或者70摄氏度,而数字量则不能满足这些条件。
For example, for the control of a boiler, we need water to be heated to a certain temperature. Generally speaking, the temperature is adjustable, such as 50 degrees Celsius or 70 degrees Celsius, but digital quantities cannot meet these conditions.

再举个例子,一些化工企业需要测量液体的酸碱度,那么酸碱度不可以用数字量的0或者1表示,只能使用模拟量,PH6.5,PH7.0等等才可以清晰的描绘出实际的数据。
For another example, some chemical companies need to measure the pH of liquids, so the pH cannot be represented by digital quantities of 0 or 1. Only analog quantities, PH6.5, PH7.0, etc. can be used to clearly depict the actual pH. data.

那么学习模拟量其实应该学习两部分内容: So when learning analog quantities, you should actually learn two parts:
一、硬件 1. Hardware
硬件包括选型和接线,选型就是针对不同的工况选择不同的模拟量以及PLC,比如说模拟量使用0-10V,4-20ma还是0-20ma还是特殊的热电偶信号等等。
Hardware includes selection and wiring. Selection means selecting different analog quantities and PLCs for different working conditions. For example, the analog quantities use 0-10V, 4-20ma, 0-20ma, or special thermocouple signals, etc.
其次就是接线,大家不要小瞧了接线,针对不同的PLC有不同的接线方法。
The second is wiring. Don’t underestimate wiring. There are different wiring methods for different PLCs.
对于西门子S7-300系列来说,我们需要使用拓展模块,打开西门子STEP7,选择合适的PLC和模拟量模块,并将模块添加进去。
For the Siemens S7-300 series, we need to use the expansion module, open Siemens STEP7, select the appropriate PLC and analog modules, and add the modules.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
对于PLC而言,每一个模拟量都有一个固定的地址,这个地址是可以在程序中进行识别并计算的,续智能则合适的地址并添加进去。
For PLC, each analog value has a fixed address. This address can be identified and calculated in the program, and the appropriate address can be added intelligently.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
根据现场设备,选择合适的量程,如果是测量温度的话需要使用特定的温度模块,并选择合适的温度信号。对于温度的控制,我们以前文章有介绍过,需要的朋友可以去寻找。
According to the field device, select the appropriate range. If you are measuring temperature, you need to use a specific temperature module and select the appropriate temperature signal. Regarding temperature control, we have introduced it in previous articles. Friends who need it can go find it.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
对于电压信号,有多种可选类型,可根据实际设备的信号类型进行选择。比如说-10V—10V,-5V—5V,-1V—1V,1-5V。
For voltage signals, there are many optional types, which can be selected according to the signal type of the actual device. For example, -10V-10V, -5V-5V, -1V-1V, 1-5V.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
当然,西门子系列的模拟量拓展模块有很多,除了文中所用到的,还有很多其他的电压信号应用在不同领域。如下图所示。
Of course, there are many analog expansion modules in the Siemens series. In addition to those used in this article, there are many other voltage signals used in different fields. As shown below.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
对于电流信号则分为二线制和四线制,需要按照实际仪表去选择。
For current signals, they are divided into two-wire systems and four-wire systems, which need to be selected according to the actual instrument.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
如上图所示,选择好模拟量输入类型后需要将硬件的量程卡也切换到相应的位置。
As shown in the figure above, after selecting the analog input type, you need to switch the hardware range card to the corresponding position.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
记得拆模块前先断电,调整完以后上电并下载硬件组态。
Remember to cut off the power before disassembling the module, then power on and download the hardware configuration after adjustment.
而对于其他的PLC而言就没有更换量程卡这一步骤,只需要将线直接接到PLC模拟量输入模块即可。
For other PLCs, there is no step to replace the range card. You only need to connect the line directly to the PLC analog input module.
二、软件编程 2. Software programming
对于初学PLC编程的人来说,模拟量输入、输出模块的编程要比用位变量进行一般的程序控制难的多,因为它不仅仅是程序编程,而且还涉及到模拟量的转换公式推导与使用的问题。不同的传感变送器,通过不同的模拟量输入输出模块进行转换,其转换公式是不一样的,如果选用的转换公式不对,编出的程序肯定是错误的。
For those who are new to PLC programming, programming of analog input and output modules is much more difficult than using bit variables for general program control, because it is not only program programming, but also involves the derivation and conversion of analog quantities. problem of use. Different sensor transmitters perform conversion through different analog input and output modules, and their conversion formulas are different. If the conversion formula selected is incorrect, the program compiled will definitely be wrong.
其实对于PLC而言,它可以接受的都是-32767-32767数据,我们需要对这个数据转换成为我们需要的实际数据。
In fact, for PLC, all it can accept is -32767-32767 data. We need to convert this data into the actual data we need.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
下图是如何区分电流和电压信号 The figure below shows how to distinguish current and voltage signals
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
它的意思是将模拟量通道为304的数据转化为量程是0-500的实际数据,并将数据赋给MW104.
It means converting the data of analog channel 304 into actual data with a range of 0-500, and assigning the data to MW104.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
模拟量输出则相反,将数据从MW104转化为0-100%的模拟量数据,比如说如果外部信号PQW320是0-10V,则对应0V-10V。
The analog output is the opposite, converting the data from MW104 to 0-100% analog data. For example, if the external signal PQW320 is 0-10V, it corresponds to 0V-10V.
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
该图是模拟量输出的表达形式,大家可以保存下来。方便查找。
This picture is the expression form of analog output and you can save it. Easy to find.
最后给大家一个简单的实例讲解: Finally, I will give you a simple example to explain:
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
实例讲解丨PLC如何使用模拟量?--- Example explanation丨How does PLC use analog quantities? 
这是一个不太复杂的加料程序中的一部分,程序很容易理解,是一个在大料仓里面的雷达料位机,该项目中雷达料位计的特点是可以检测0.5-10米的原料料位,因为生产的原因该料仓需要保证一直有原料。
This is part of a not too complicated feeding program. The program is easy to understand. It is a radar level meter in a large silo. The characteristic of the radar level meter in this project is that it can detect raw materials of 0.5-10 meters. position, because of production reasons, the silo needs to ensure that there is always raw material.
所以我们需要在该料仓低于大概2米的时候进行补料以保证该料仓的原料充足,并且在达到9米的时候停止避免原料堆积到外面。
Therefore, we need to replenish the material when the silo is lower than about 2 meters to ensure that the raw materials in the silo are sufficient, and stop when it reaches 9 meters to prevent the raw materials from accumulating outside.
好了,模拟量输入输出你看懂了吗? Okay, do you understand analog input and output?
 


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
电气技术

大型企业的PLC编程规范!--- PLC programming specifications for large enterprises, code them together to enter a large factory! 

2024-1-7 19:51:27

电气技术

称重传感器是什么?如何与PLC连接?怎样使用才能最精确?

2024-1-7 20:58:13

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索