示例#1
0
        public int GetProgramBlock(PLCEnum.S7BlockType blockType, int number, byte[] buffer, ref int length)
        {
            Console.WriteLine("length:" + length);
            int a = API.DaveGetProgramBlock(Pointer, (int)blockType, number, buffer, ref length);

            Console.WriteLine("length:" + length);
            return(a);
        }
示例#2
0
        public static string AreaName(PLCEnum.S7BlockType blockType)
        {
            byte[] s = new byte[255];
            int    i = API.DaveAreaName((int)blockType);

            API.DaveStringCopy(i, s);
            string st = string.Empty;

            for (i = 0; s[i] != 0; i++)
            {
                st += (char)s[i];
            }
            return(st);
        }
示例#3
0
 public int ListBlocksOfType(PLCEnum.S7BlockType blockType, byte[] buffer)
 {
     return(API.DaveListBlocksOfType(Pointer, (int)blockType, buffer));
 }
示例#4
0
 public int ListBlocksOfType(PLCEnum.S7BlockType blockType, byte[] buffer)
 {
     return(mConn.ListBlocksOfType(blockType, buffer));
 }
示例#5
0
 public int GetProgramBlock(PLCEnum.S7BlockType blockType, int number, byte[] buffer, ref int length)
 {
     return(mConn.GetProgramBlock(blockType, number, buffer, ref length));
 }