litung
臺灣-李同在
級別: VIP會員
![]() |
使用純軟體的方式來模擬PLC的動作 環境: GPPW+LLT+MX+VB6+電腦一臺 ^_^ 使用方法: 1 先開啟 GPPW 2 載入PLC程式 3 執行LLT 4 執行VB6 5 開啟附件檔(vb6程式碼) 動作: 有VB6的畫面來模擬氣壓缸的前進與後退。 PS:有興趣的朋友可以抓回去看看。 |
|
---|---|---|
本帖最近評分記錄:
|
夏日雪夢
為了夢,夢一生
級別: VIP會員
![]() |
19樓,你看一下這個是不是讀32位寄存器 Private Sub btn_Write32BitInteger_Click() Dim lReturnCode As Long 'Return code Dim buffer32BitInteger As udt32BitInteger 'User-defined type for '32bit Integer' data Dim bufferInteger As udtInteger 'User-defined type for writing to the PLC 'Error Handler On Error GoTo CatchError 'Copy the TextBox data to the user-defined type for '32bit Integer'. buffer32BitInteger.l32BitInteger = CLng(txt_Write32BitInteger.Text) 'Copy the 'buffer32BitInteger' to the user-defined type for writing to the PLC. LSet bufferInteger = buffer32BitInteger 'The WriteDeviceBlock2 method is executed.(to D10-D11) lReturnCode = ActEasyIF1.WriteDeviceBlock2("D10", |
---|---|
|
夏日雪夢
為了夢,夢一生
級別: VIP會員
![]() |
呵呵,樓主再辛苦你來一個寫D0 值的示例了。 [ 此帖被夏日雪夢在2009-09-01 10:24重新編輯 ] |
---|---|
|