1、PLC变量类型对应C#变量 C# 基本数据类型,值类型隐式继承自System.ValueType->System.Object 基本类型占用字节
2、读写任意类型变量 2.0 官方例程 TwinCAT 3 -> TE1000 XAE -> Technologies ->ADS -> TwinCAT ADS
2.1、TcAdsClient类 ReadAny() 方法 //read bool bTest1 = (bool)tcAdsClient.ReadAny(pHandle_bool1, typeof(Boolean));//read by handle short nTest1 = (short)tcAdsClient.ReadAny(pHandle_int1, typeof(short));//read by handle int dintTest1 = (int)tcAdsClient.ReadAny(pHandle_dint1, typeof(int));//read by handle double dfTest1 = (double)tcAdsClient.ReadAny(pHandle_lreal1, typeof(double));//read by handle string strTest1 = (string)