plc

【技术总结】几种常用的无线串行通信技术

我只是一个虾纸丫 提交于 2019-12-03 23:32:30
与传统的有线串行(RS232)通信不同,无线串行通信具有设备移动方便(特别在通信设备空间相互隔离不便连线的情况下)、通信距离远(可达几十公里)等特点。     无线串行通信应用领域非常广,常用的有:PLC无线通讯;无线抄表;工业遥控遥测;无线数据传输;银行POS系统;无线数据采集;楼宇自动化、无线监控、门禁系统;智能家居、工业控制;汽车检测设备;无线LED显示屏系统等。     目前,比较常用的无线串行通信技术有红外、蓝牙、ZigBee和RF无线数传等四种。四种方式都有标准模块,特别适用于嵌入式系统及PC机之间的串行通信。     一、红外串行通信    符合IrDA1.x标准,利用950 nm近红外波段的红外线作为传递信息的载体,通过红外光在空中的传播来传递信息,由红外发射器和接收器实现。其最大优点是:不易被人发现和截获,保密性强;几乎不会受到电气、天电、人为干扰,抗干扰性强。此外,红外线通信机体积小、重量轻、结构简单、价格低廉。不足之处在于它必须在视距内通信,且收发端必须是直线对射。       二、蓝牙串行通信   符合蓝牙协议(BlueTooth)V1.x,使用2.4GHz的ISM(工业、科学、医学)频段。频道共有23个或79个,频道间隔均为 1MHz,采用时分双工方式,调制方式为BT= 0.5的GFSK。 蓝牙的数据传输率可达1Mbs,与红外一样,蓝牙的传输距离也较短。

组态王常见问题解答

你说的曾经没有我的故事 提交于 2019-12-03 23:32:00
 一、在XP系统安装完组态王软件和驱动在打开运行时信息栏出现“您没有正确安装KVCOM.SYS驱动程序”。     【答:】     (1)建议在安装前先把电脑上的杀毒软件先关闭,以免安装时对部分程序的影响。     (2)若还出现此类问题,可以尝试把装好的组态软件在电脑上卸载掉,然后重新 启动安装,这个有时是系统造成的,建议多装几次。(我的就是这样后来装 好的)若实在还是不行,建议换个XP系统,应该是系统环境的问题。          二、打开组态王软件,在切换到view界面时弹出“历史库:打开工程映射区内存失败”。     【答:】     这个是在安装驱动时系统有时会把《KVCOM.SYS》文件的后缀名”.SYS”给删掉。 这时可以在驱动的安装路径里面找到《KVCOM》,然后把文件的后缀名添加上就可 以了。        三、西门子PLC的通讯问题     【问:】     西门子S7200使用西门子公司提供的PC/PPI电缆选用PPI方式与组态王通讯,一旦PLC断电通讯不能恢复,重新启动组态王通讯失败,必须用西门子的编程软件和PLC通讯一次后,组态王才能与PLC通讯是为什么?     【答:】    (1) 不用西门子公司提供的PC/PPI带缆,使用RS232/485的转换模块,485的DATA+ 接PLC的PORT口的3,DATA-接PLC的PORT的8

Communicate with CoDeSys program on a Linux-based WAGO PFC200 PLC

冷暖自知 提交于 2019-12-03 21:20:38
I'm currently getting familiar with PLC's, the WAGO 750-8206 PLC in particular. It offers a linux OS and can run CoDeSys programs. There are some I/O modules attached to the controller: 750-530, 750-430 and 750-600. What I would like to know is this: Is it possible to write a C++ linux application that runs on the PLC and gets/sets the digital inputs and outputs? Even better: can I write a CoDeSys program that "talks to the I/O's" and handles all the logic and at the same time can be accessed by a C++ linux program? THe idea is this: I would like the CoDeSys program to check for let's say two

A clever homebrew modulus implementation

℡╲_俬逩灬. 提交于 2019-12-03 12:37:10
问题 I'm programming a PLC with some legacy software (RSLogix 500, don't ask) and it does not natively support a modulus operation, but I need one. I do not have access to: modulus, integer division, local variables, a truncate operation (though I can hack it with rounding). Furthermore, all variables available to me are laid out in tables sorted by data type. Finally, it should work for floating point decimals, for example 12345.678 MOD 10000 = 2345.678 . If we make our equation: dividend /

Alternative to OPC-UA

核能气质少年 提交于 2019-12-03 12:18:45
问题 Is there any decent alternative to OPC-UA as a solution for accessing process data of a system composed of various PLCs? Something that is platform independent and can "speak" with products of different brands ? I've heard of MQTT but it seems to be much more like a transport protocol, and only that. It does not have all the higher level stuff like the information modeling, etc. Thanks for your help! 回答1: OPC is the only standard way for communicating with PLCs. OPC DA is the old alternative.

Updating “Hierarchyid” in SQL Server

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've used Hierarchyid data type in one of my tables in SQL Server. Now I want to change the father of one of the rows, but when I change that all its descendant HierarchyId's must change according to that. Is there a function to do that or I must change all of them myself. If I need to do that, what is the best way ? Thanks In advance 回答1: Use the "GetReparentedValue" Function to do it. This is what I did for a table in my database : DECLARE @FatherNode AS _INT_ SELECT @FatherNode = [PLC_PLC_ID] FROM [dbo].[Place] WHERE ([PLC_ID] = @PLC_ID)

Alternative to OPC-UA

前提是你 提交于 2019-12-03 05:12:37
Is there any decent alternative to OPC-UA as a solution for accessing process data of a system composed of various PLCs? Something that is platform independent and can "speak" with products of different brands ? I've heard of MQTT but it seems to be much more like a transport protocol, and only that. It does not have all the higher level stuff like the information modeling, etc. Thanks for your help! OPC is the only standard way for communicating with PLCs. OPC DA is the old alternative. OPC UA is the new one and recommended, nowadays. Before OPC there was just proprietary protocols and shared

A clever homebrew modulus implementation

流过昼夜 提交于 2019-12-03 03:49:33
I'm programming a PLC with some legacy software (RSLogix 500, don't ask) and it does not natively support a modulus operation, but I need one. I do not have access to: modulus, integer division, local variables, a truncate operation (though I can hack it with rounding). Furthermore, all variables available to me are laid out in tables sorted by data type. Finally, it should work for floating point decimals, for example 12345.678 MOD 10000 = 2345.678 . If we make our equation: dividend / divisor = integer quotient, remainder There are two obvious implementations. Implementation 1: Perform

C#与西门子PLC通讯

匿名 (未验证) 提交于 2019-12-03 00:43:02
通讯组件概述 通讯组件名称 数据类型 函数与参数 [EntLink] [ComLink] CommRate,Int32,与PLC通讯的速率 Station, Uint16, PLC的站号码 返回值:Int16,函数执行结果,见4.3详细说明 [DeLink] [CmdRead] [CmdWrite] [Bit_Test] [Bit_Set] [Bit_Reset] [CmdReadString] [CmdWriteString] [DataConvert] SourData , Object,需要转换的源数据 -18 PLC的网络句柄解析错误; -19 PLC的网络句柄数据错误; -28 PLC的网络句柄解析错误; -29 PLC的网络句柄数据错误; -70 PLC内存区域的功能受限制; -80 PC系统中无网卡; -81 PC的IP地址格式错误; -82 PLC的IP地址格式错误; -83 PING命令返回错误; 组件使用步骤 VS.NET平台的DLL程序集组件不用注册,ActiveX的COM组件(*.dll/*.ocx)须要在系统下注册才能正常使用,注册的方法主要有两种: 控制面板->用户账号和家庭安全->用户账户->更改用户账户控制设置,把滑竿拖到最下面,即“从不通知”。 原文:https://www.cnblogs.com/DreamRecorder/p/9359435

Send FINS command from C# to PLC

坚强是说给别人听的谎言 提交于 2019-12-03 00:42:23
I try to send FINS commands through UDP from PC (C#.NET) to PLC Ethernet module (Omron), but is not getting any responds from the PLC and have no clue where I can start troubleshooting. PLC has a very simple ladder logic as follow: If DM100 has value of #0001 , then trigger on output 101.00 . (Here, "Trigger" is just a symbol name for memory area D100 , and "Output" is a symbol for output 101.00 ) Then I wrote a piece of C# that performs FINS command of "Memory Area Write" which has command code of 01 02 , followed by beginning address, number of items to be written, and the data. The C# code