plc

TwinCAT: Running on isolated cores failed

旧巷老猫 提交于 2019-12-11 07:33:40
问题 I was trying to activate my configuration on my local PC, but it failed. I tried: Isolate 1 or 2 cores on my pc (Under SYSTEM > Real-Time and reboot the PC) and run the PLC tasks on those cores. When I do this I get the following error: 'TwinCAT System' (10000): Sending ams command >> Init4\RTime: Start Interrupt: Ticker started >> AdsWarning: 4118 (0x1016, RTIME: startup of isolated CPU fails!) << failed! I then tried to run it on the normal windows dedicated CPUs (so none of the CPU’s were

can't find snap7 library - linux

和自甴很熟 提交于 2019-12-10 10:47:12
问题 I'm running Rapbian on a Raspberry Pi Revision B. I downloaded the module python-snap7 as instructed on this webpage: Snap7 Installation I tried it twice: One time using pip and another doing it manually. However, I installed it then via setup.py build and then setup.py install . If i try to create a client, I get the following error: Python 2.7.3 (default, Mar 18 2014, 05:13:23) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import snap7 >>>

基于OPC协议的上位机PLC通讯 (一)

本小妞迷上赌 提交于 2019-12-10 07:19:26
OPC技术是通常是用于PLC和上位机通讯的一个基于COM的一个通讯组件。比如某个项目是用西门子系列的PLC控制的自动化系统通过西门子的中间件通常会安装S7-200 PC Access 或者SimaticNet的OPC服务端软件。这两个软件的目的就是在上位机的系统中搭建了一个OPC Server并提供访问可以编程实现遵循OPC技术使上位机与PLC通讯的功能。 此外,需要强调一点,OPC并不是西门子的技术,它是一个标准,凡是遵循OPC技术的PLC都能共通过其标准与下位机通讯 。 几个关于OPC的概念: 同步读:在调用OPC的接口函数时实时的将数据(组)通过出口参数传出 同步写:在调用OPC的接口函数时实时的将数据写入寄存器 异步读:调用OPC接口不会直接写入PLC寄存器,而是在注册的回调函数中拿到数据的相关信息 异步写:也是在回调函数中将数据写入 组的概念: 组中可以包含项,是多个项的一个集合 组是和OPC提供的IO接口绑定的,OPC的IO接口是用于读写数据 项的概念: 项其实就是对于了PLC上的对应地址,每种OPC服务器根据厂商不同定义的格式不同 关于封装的类 情况说明(这个类是本人在开发上位机软件与西门子S200系列PLC通信是所编写的 OPC服务器是SimaticNet) 几个疑惑点说明: OPC服务器提供了几个接口的头文件需要在项目中添加 需要加到工程中的文件: opc.h

How can I communicate between a Siemens S7-1200 and python?

徘徊边缘 提交于 2019-12-09 16:26:17
问题 I am running a process on a S7-1200 plc and I need it to send a start signal to my python script, after the script is done running it needs to send something back to the plc to initiate the next phase. Oh, and it has to be done in ladder. Is there a quick and dirty way to send things over profibus or am I better off using just a RS232 thing? 回答1: I would go with SNAP7 and python-snap7 libraries. Example on how to install it on a Raspberry pi found in this blog: http://simplyautomationized

二手plc模块回收的作用有哪些

点点圈 提交于 2019-12-09 15:03:14
事实上对于西门子这个品牌大家都不陌生,而且在现实生活中有很多西门子产品的忠实粉丝,撇去旗下完善的品牌产品,西门子模块也是很不错的一个设备,所以人们才会对二手plc模块回收这么热衷,那么这些被回收回来的模块必然是要发挥二次作用,可是都能够被作用在哪些方面呢? 其实说它的作用之前,我们有必要对于西门子模块有一个认识,很多人其实都不太了解西门子模块,实际上它能够被分为很多种不同的种类,不同的模块,其实能够支持的作用以及产生的作用都是不一样的,就好像有一些是能够成为一个扩展模块,必须要挂在扩展的槽位当中才能够发挥出作用,而有一些则是跟智能的仪表进行通信,从事二手plc模块回收行业需要对这些作用有所了解。 一、安全模块 如果回收回来的模块是安全模块,那么顾名思义就是作用在安全回路上提供保护的。通常带有f型号的cpu才能够被挂上安全模块,所以它的作用部分是双通道的,两个触点一定要同时被导通,千万不能够有先后的时间差出现。其实很多以前的老设备都会用到安全继电器,都是依靠硬接线才能保护电路,但是这种做法不仅很浪费空间,更重要的是还会浪费精力和时间。但是这个时候我们如果能够回收到西门子的一块安全模块,那就能够自由编程,同时使用相当方便。跟最早的安全继电器相比简直不要好太多,最大的亮点还是在于它能够进行随意的自由编程。 二、FB模块 这个部分也是不错的一个功能形式模块,拥有着最独立的背景数据

PLC Programing in C# .NET [closed]

前提是你 提交于 2019-12-09 04:56:56
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . Can I Write Programs for PLC Controlling in C#? How? 回答1: Not likely. C# requires an implementation of the Common Language Runtime (CLR) to run applications developed in that language or any .NET language. I would say it is very unlikely that any PLC will ever be manufactured

Reading a JSON structure from a web server page on a Siemens S7 1500 PLC

帅比萌擦擦* 提交于 2019-12-08 21:56:18
问题 I've been working with HTML and javascript to create graphical web pages to display data from my Siemens S7 1500 PLC. I've been using a $.getJSON command to successfully read values from the PLC when the web page that requests the information is served up by the PLC web server and in the same directory as the file with the JSON structure and all of the desired values. I have a PC connected to my PLC via ethernet and wish to run a web page locally on the PC and read the values served up by a

Detect code changes on Beckhoff PLC using C#

拈花ヽ惹草 提交于 2019-12-08 07:53:29
问题 I have a Beckhoff PLC that's running a software developed with TwinCat3. Is there a way to retrieve the running software using C# application ? The TwinCAT.Ads library does not seem to offer such functionality. The plan is to be able to compare what is online with a backup stored locally to detect any unplanned code changes made by Service Technician. It would be enough for me if I could for example retrieve a hash code from the PLC and generate hash from a local backup and see if they match.

how to connect and read values from kepware using OPCAutomation.dll

对着背影说爱祢 提交于 2019-12-08 05:11:10
问题 I am creating a small c# program to connect and read value from kepware server using OPCAutomation.dll, but unable to get its syntax? OPCAutomation.OPCServer _OPCServer = new OPCAutomation.OPCServer(); _OPCServer.connect("", ""......); what values will come inside these brackets? 回答1: OPCAutomation.OPCServer _OPCServer = new OPCAutomation.OPCServer(); _OPCServer.connect("Kepware.KEPServerEX.V5", ""); The second parameter is the OPC Server node and can be left String.Empty. From Reflector:

Runtime error 429 in VBA, but class is registered

人盡茶涼 提交于 2019-12-06 09:56:59
问题 I'm trying to recreate a program that uses javascript to open a connection to a PLC and then display all sorts of information on a web page. I'd rather have it in a form in MS Access for various reasons, and have spent forever trying to find the right dll to use (Jet32X.dll, if anyone is curious). I finally tracked the CLSID called out in the javascript back to a registered class for the PLC, and I'm trying to create that object in VB code. It won't get any further than the Dim As New line,