C# connects KepService for PLC access, read and write.

After more than a month of exploring PLC, I am still in a novice state, but I still have a little gain. I hope that it will be helpful for C# to connect KepService friends, but if you can communicate directly with PLC, you can communicate with PLC directly. Don't jump into KepService and pay IQ tax.

If you want to access KepService through C#, most of them use [OPCDAAuto.dll], but I found that it is not very useful. So after researching for a long time, I found the one that I think is better. [EEF.UtilityLibrary.OpcLibrary3.0.dll][EEF.UtilityLibrary.SqlServer3.0.dll][EEF.UtilityLibrary.Utility.dll][OpcDaNet.dll] These four are from other bloggers, and also Relatively easy for personal use. Friends in need can contact me and donate for free~.

The point! ! ! The point! ! ! The point! ! ! The best thing to use is [ S7netplus ], which is invincible and easy to use to directly connect to the PLC. There will be a separate chapter on this later (in fact, I haven't figured it out yet).

1. Create a new program and introduce four dlls into it.

2. Connect to KepService.

3. Use the method to read the value. Note that the method entered is a label, not an address. Addresses and labels should be clearly distinguished.

Fourth, use the method to write the value. Note that the method entered is a label, not an address. Note that the second value object data type is not necessarily a string

Is it very simple. Just need the super easy way. But here's the main point, you need to program x86.

There are also small cases in my download. If you need it and don’t have points, you can chat with me privately, local tyrants are free~~~

https://download.csdn.net/download/weixin_38801976/13059227

---------------- Small tail segmentation ------------------------------- ---------

The record of the rookie is also progress~ If it helps you, then give it a thumbs up. -----From the programmer radish without code

Guess you like

Origin blog.csdn.net/weixin_38801976/article/details/110352808