发表于:2005/2/23 19:07:00
#0楼
Private Sub Command2_Click()
Dim i, j As Integer
i = kf_integer(Int(Text1.Text))
res = db_write(10, 10, 1, i) '写入
res = db_read(10, 10, 1, j)
Text2.Text = kf_integer(j)
End Sub
Private Sub Form_Load()
res = unload_tool
End Sub
Private Sub Label1_Click()
plcadr(0).adr = 2
plcadr(0).SEGMENTID = 0
plcadr(0).SLOTNO = 2
plcadr(0).RACKNO = 0
res = load_tool(1, "s7online", plcadr(0)) '初始化
res = new_ss(1) '建立连接
End Sub
我读了几变手册还是不明白res = db_write(10, 10, 1, i)
不知道应该怎样读取plc上的值
Dim i, j As Integer
i = kf_integer(Int(Text1.Text))
res = db_write(10, 10, 1, i) '写入
res = db_read(10, 10, 1, j)
Text2.Text = kf_integer(j)
End Sub
Private Sub Form_Load()
res = unload_tool
End Sub
Private Sub Label1_Click()
plcadr(0).adr = 2
plcadr(0).SEGMENTID = 0
plcadr(0).SLOTNO = 2
plcadr(0).RACKNO = 0
res = load_tool(1, "s7online", plcadr(0)) '初始化
res = new_ss(1) '建立连接
End Sub
我读了几变手册还是不明白res = db_write(10, 10, 1, i)
不知道应该怎样读取plc上的值
承接工业自动化项目