当前位置:网站首页>Beifu PLC and C transmit string array type variables through ads communication

Beifu PLC and C transmit string array type variables through ads communication

2022-07-23 13:17:00 Dusk and starry sky

In Beifu PLC and C# signal communication , use ADS signal communication , This article explains C# How to read and write String Type array variable .

  1. Operation process
    1.1. PLC Programming
    First, define the relevant variables , As shown below , Activate configuration :
     Insert picture description here
     Insert picture description here

1.2. C# Programming
About C# Hebeifu PLC For routine of communication, please refer to relevant routines of Bifu , This article explains C# About China int Array type related program .
First create C# The type of structure
 Insert picture description here

Besides ,PLC in String The length is 75, So in C# You need to create a structure in , Adapt to PLC Of string length , As shown below :
 Insert picture description here

And then through ADS Related methods create handles , Get handle by tag name

 Insert picture description here

原网站

版权声明
本文为[Dusk and starry sky]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207230558034850.html