quote:以下是引用夏东在2014-11-26 23:25:43的发言:
多谢ruixin2。
现在我用VB,不在G码或者step7
怎么控制这一信号?
vb通过ncdde与系统通讯,ncdde能读写plc变量!
Writing PLC data
In this example the client writes the value "250" to flag byte 5 of the PLC.
Sub Form_Load ()
Label1.LinkTopic = ”ncddencu840d”
Label1.LinkItem = ”/PLC/Memory/Byte[5]”
Label1.LinkMode = 2 ’Manual
Label1.Caption = ”250”
Label1.LinkPoke
End Sub
DB Bits: /PLC/DATABLOCK/BIT[C20,1.1]
______ Bit Adress
_______ DB-Adress
__________ Datablock => DB20.DBX 1.1
DB Bytes: /PLC/DATABLOCK/BYTE[C20,1]
_____ Byte Adress
_______ DB-Adress
___________ Datablock => DB20.DBB 1
DB Wort: /PLC/DATABLOCK/WORD[C20,1]
____ Wort Adress
_______ DB-Adress
_____________ Datablock => DB20.DBW 2