问题描述
大家好,
通过EtherNetIP与omron PLC交谈我写了一些不好的指令,它返回了标签列表和每个标签的模板(结构,数组或原子)。这是非常困难的,因为omron没有关于这个协议的文档而不是Allen Bradley。
现在我想将这些'结构'作为'类'复制到VB.Net中:我想知道反思ad在运行时创建一个类(然后是一个onbject实例)。
某些Plc的结构有数组字段,例如:
类StructRegMT {
按布尔值;
NrItem为整数;
SetPointRegMT(64)为整数;
}结束类
如何在运行时制作这个样本类?
感谢大家的帮助......
Matteo M.
Hi everyone,
speaking with an omron PLC via EtherNetIP i wrote some poor instruction that returned me the list of tags and the template of each tag (structure, array or atomic). It was very difficult cause omron has no documentation about this protocol instead Allen Bradley for example.
Now i would like to replicate these 'structure' as a 'class' into VB.Net: i thougth about reflection ad make a class (then an onbject instance) during runtime.
Some Plc's structure has array field, for instance:
Class StructRegMT {
On as boolean;
NrItem as integer;
SetPointRegMT(64) as integer;
} end Class
How make this sample class during runtime?
Thanks all for help..
Matteo M.
推荐答案
这篇关于vb.net反射:使用数组字段构建运行时类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!