【问题标题】:Read data in Plc with Moka7用 Moka7 读取 PLC 中的数据
【发布时间】:2017-10-29 18:50:51
【问题描述】:

这些方法你需要什么参数?

 Client.ReadArea(S7.S7AreaDB,1,1,1,byte[]{2});
 S7.GetDIntAt(byte,1);

每个方法的数量都有哪些值?

【问题讨论】:

    标签: java plc


    【解决方案1】:
    AreaType area: one of area type like DB (data block), MK (Merker) and ...
    
    int db: `IF` area type is DB, it will the show db number
    
    int start: show the position of start of bits
    
    int amount: number of bits
    
    DataType type: type of Data like BIT, BYTE, WORD, REAL and ....
    
    byte[] buffer: result will be copy to this array
    

    client.readArea(AreaType.DB, 200, 34, 1, DataType.BYTE, 缓冲区);

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-14
      • 1970-01-01
      • 2016-02-09
      • 2016-06-13
      • 1970-01-01
      • 2014-10-06
      • 1970-01-01
      • 2017-01-17
      相关资源
      最近更新 更多