1. 程式人生 > >三菱FX系列PLC程式設計口通訊協議總覽

三菱FX系列PLC程式設計口通訊協議總覽

該協議實際上適用於PLC程式設計埠以及FX-232AW模組的通訊 

通訊格式 
     命令(CMD)   命令碼    目標裝置 
DEVICE READ  CMD    "0"    X,Y,M,S,T,C,D 
DEVICE WRITE CMD    "1"    X,Y,M,S,T,C,D 
FORCE  ON    CMD    "7"    X,Y,M,S,T,C 
FORCE  OFF   CMD    "8"    X,Y,M,S,T,C 

擴充套件命令碼 
讀配置   "E00" 
寫配置   "E10" 
讀程式   "E01" 
寫程式   "E11" 

傳輸格式: RS232C 
波特率: 9600bps 

奇偶: even 
校驗: 累加方式和校驗 
字元: ASCII 

命令   16進位制程式碼   命令解釋 
ENQ       05H       通訊請求 
ACK       06H     PLC正確響應 
NAK       15H     PLC錯誤響應 
STX       02H       報文開始 
ETX       03H       報文結束 

幀格式 
STX CMD DATA ...... DATA ETX SUM(upper) SUM(lower) 

例子 
STX ,CMD ,    ADDRESS,      BYTES,  ETX,  SUM 
02H, 30H, 31H,30H,46H,36H, 30H,34H, 03H, 37H,34H  

指令解釋如下: 
STX,         "0",     "10F6",       "04",       ETX,       "74"  
報文開始,  讀命令,  地址10F6H處,  04H位元組資料, 報文結束, 累加方式和校驗 
其中 SUM=CMD+......+ETX=30h+31h+30h+46h+36h+30h+34h+03h=74h; 
累加和超過兩位取低兩位,轉換成ascii碼,分 SUM(upper),SUM(lower)二次傳送。 

========================================================================================== 


三菱FX 系列PLC 程式設計口通訊協議例一 

RS232C介面,通訊波特率 9600,7,e,1 。 
PC機(設定為FX1S)向停止執行的FX1S正常下載11步程式。 

三菱FX1S PLC下載通訊協議說明   
作者:許意義 
日期:2009.6.11 

------------------------------------------------------------------------------------------ 
PC機發送   位元組數: 0001, 資料: 05          // ENQ ;如無應答,延遲1.28X10mS再次傳送ENQ,連續3次傳送無應答,則通訊出錯,和PLC連線不上。 
PC機發送   位元組數: 0001, 資料: 05          // ENQ  
PLC應答    位元組數: 0001, 資料: 06          // ACK ;PLC應答(已收到)   

PC機發送   位元組數: 0011, 資料: 02 30 30 31 45 30 30 31 03 36 41 // STX,"0","01E0","01",ETX,"6A" ;查詢PLC 01E0H地址資料位元組(FX1S執行狀態)  
PLC應答    位元組數: 0006, 資料: 02 30 41 03 37 34                // STX,"0A",ETX,"74"            ;PLC返回"0A",代表PLC暫停 
                                                                                               ;如PLC返回"09",代表PLC執行 
PC機發送   位元組數: 0011, 資料: 02 30 30 45 30 32 30 32 03 36 43 // STX,"0","0E02","02",ETX,"6C" ;查詢PLC 0E02H地址資料字(PLC型號) 
PLC應答    位元組數: 0008, 資料: 02 43 32 35 36 03 45 33          // STX,"C256",ETX,"E3"          ;PLC返回"6266",代表PLC型號FX1N 
                                                                                               ;如PLC返回"C256",代表PLC型號FX1S 
PC機發送   位元組數: 0011, 資料: 02 30 38 30 30 30 32 45 03 37 32 // STX,"0","8000","2E",ETX,"72" ;發出讀PLC 8000H地址處連續2EH位元組資料指令(這些內容為PLC內預置引數值) 
PLC應答    位元組數: 0008, 資料: 02 30 32 30 30 36 35 41          // STX,"020065A",               ;PC機讀入PLC 8000H地址處連續2EH位元組資料 
PLC應答    位元組數: 0008, 資料: 39 30 30 30 30 30 30 30          // "90000000",  
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 32 30 32          // "02020202",  
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 32 30 32          // "02020202", 
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 32 30 32          // "02020202", 
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 32 30 32          // "02020202", 
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 32 30 32          // "02020202", 
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 32 30 32          // "02020202", 
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 32 30 32          // "02020202", 
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 32 30 32          // "02020202", 
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 32 30 32          // "02020202", 
PLC應答    位元組數: 0008, 資料: 30 32 30 32 30 03 42 36          // "02020",ETX,"B6" 

PC機發送   位元組數: 0011, 資料: 02 30 38 30 32 45 32 45 03 38 39 // STX,"0","802E","2E",ETX,"89" ;發出讀PLC 802EH地址處連續2EH位元組資料指令(這些內容為PLC內預置引數值) 
PLC應答    位元組數: 0008, 資料: 02 32 30 32 30 46 34 30          // STX,"2020F40",               ;PC機讀入PLC 802EH地址處連續2EH位元組資料 
PLC應答    位元組數: 0008, 資料: 39 46 46 30 42 46 34 30          // "9FF0BF40", 
PLC應答    位元組數: 0008, 資料: 31 45 37 30 33 36 34 30          // "1E703640", 
PLC應答    位元組數: 0008, 資料: 45 43 37 30 45 44 43 30          // "EC70EDC0", 
PLC應答    位元組數: 0008, 資料: 45 46 46 30 45 39 30 30          // "EFF0E900", 
PLC應答    位元組數: 0008, 資料: 31 46 45 30 33 30 30 30          // "1FE03000", 
PLC應答    位元組數: 0008, 資料: 30 30 30 30 30 30 30 30          // "00000000", 
PLC應答    位元組數: 0008, 資料: 30 30 30 30 30 30 30 30          // "00000000", 
PLC應答    位元組數: 0008, 資料: 30 30 30 30 30 30 30 30          // "00000000", 
PLC應答    位元組數: 0008, 資料: 30 30 30 30 30 30 30 30          // "00000000", 
PLC應答    位元組數: 0008, 資料: 30 30 30 30 30 30 30 30          // "00000000", 
PLC應答    位元組數: 0008, 資料: 30 30 30 30 30 03 45 35          // "00000",ETX,"E5" 

PC機發送   位元組數: 0011, 資料: 02 30 30 45 30 36 30 32 03 37 30 // STX,"0","0E06","02",ETX,"70" ;查詢PLC 0E06H地址資料字 
PLC應答    位元組數: 0008, 資料: 02 31 30 30 30 03 43 34          // STX,"1000",ETX,"C4"          ;PLC返回"1000",代表?? 

PC機發送   位元組數: 0011, 資料: 02 30 38 30 35 43 33 45 03 38 42          // STX,"0","805C","3E",ETX,"8B" ;發出讀PLC 805CH地址處連續3EH位元組資料指令 
PLC應答    位元組數: 0128, 資料: 02 30 36 32 34 30 37 43 35 30 46 30 30 30 35 43 // STX,"062407C50F0005C", ;PC機讀入PLC 805CH地址處連續3EH位元組資料 
                              38 30 46 30 30 46 46 46 46 46 46 46 46 46 46 46 // "80F00FFFFFFFFFFF", 
                              46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 // "FFFFFFFFFFFFFFFF", 
                              46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 // "FFFFFFFFFFFFFFFF", 
                              46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 // "FFFFFFFFFFFFFFFF", 
                              46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 // "FFFFFFFFFFFFFFFF", 
                              46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 // "FFFFFFFFFFFFFFFF", 
                              46 46 46 46 46 46 46 46 46 46 46 46 46 03 41 41 // "FFFFFFFFFFFFF",ETX,"AA" 

PC機發送   位元組數: 0055, 資料: 02 31 38 30 35 43 31 36 30 32 32 // STX,"1","805C","16","022", ;發出寫PLC 805CH地址處連續16H位元組(11步程式)資料指令 
                              34 30 30 43 35 30 46 30 30 46 46 // "400C50F00FF",             ;接出PC機連續送出16H位元組(11步程式)資料 
                              46 46 46 46 46 46 46 46 46 46 46 // "FFFFFFFFFFF", 
                              46 46 46 46 46 46 46 46 46 46 46 // "FFFFFFFFFFF", 
                              46 46 46 46 46 46 46 46 03 42 31 // "FFFFFFFF",ETX,"B1" 
PLC應答    位元組數: 0001, 資料: 06                      // ACK ;PLC應答(已收到)  

PC機發送   位元組數: 0005, 資料: 02 42 03 34 35          // STX,"B",ETX,"45”   ;發出下載程式寫結束指令 
PLC應答    位元組數: 0001, 資料: 06                      // ACK                 ;PLC應答(已收到)  

PC機發送   位元組數: 0011, 資料: 02 30 38 30 35 43 31 36 03 37 41          // STX,"0","805C","16",ETX,"7A" ;發出讀PLC 805CH地址處連續16H位元組(11步程式)資料指令(校驗下載資料) 
PLC應答    位元組數: 0048, 資料: 02 30 32 32 34 30 30 43 35 30 46 30 30 46 46 46  // STX,"022400C50F00FFF" ;PC機讀入PLC 805CH地址處連續16H位元組(11步程式)資料 
                                                                               // "FFFFFFFFFFFFFFFF", 
                                                                               // "FFFFFFFFFFFFF",ETX,"39" 
// 下載結束 

========================================================================================== 

三菱FX 系列PLC 程式設計口通訊協議例二 

RS232C介面,通訊波特率 9600,7,e,1 。    
PC機(設定為FX1N)向停止執行的FX1N正常下載3步程式。  

三菱FX1N PLC下載通訊協議說明   
作者:許意義 
日期:2009.6.12 

-------------------------------------------------------------------------------------------  
PC機發送   位元組數: 0001, 資料: ENQ                           // PC機發出通訊請求  
PLC應答    位元組數: 0001, 資料: ACK                           // PLC應答(已收到)    
PC機發送   位元組數: 0011, 資料: STX,"0","0E02","02",ETX,"6C"  // 查詢PLC 0E02H地址資料字(PLC型號)  
PLC應答    位元組數: 0008, 資料: STX,"62","66",ETX,"D7"        // PLC返回"6266",代表PLC型號FX1N  

PC機發送   位元組數: 0001, 資料: ENQ                           // PC機發出通訊請求   
PLC應答    位元組數: 0001, 資料: ACK                           // PLC應答(已收到)    

PC機發送   位元組數: 0013, 資料: STX,"E00","01C0","01",ETX,"DD" // 查詢PLC 01C0H地址資料位元組(FX1N執行狀態)    
PLC應答    位元組數: 0006, 資料: STX,"0A",ETX,"74"              // PLC返回"0A",代表PLC暫停  
                                                             // 如PLC返回"09",代表PLC執行  

PC機發送   位元組數: 0001, 資料: ENQ                           // PC機發出通訊請求   
PLC應答    位元組數: 0001, 資料: ACK                           // PLC應答(已收到)    

PC機發送   位元組數: 0011, 資料: STX,"0","0E02","02",ETX,"6C"  // 再次查詢PLC 0E02H地址資料字(PLC型號)  
PLC應答    位元組數: 0008, 資料: STX,"62","66",ETX,"D7"        // PLC返回"6266",代表PLC型號FX1N  

PC機發送   位元組數: 0001, 資料: ENQ                             // PC機發出通訊請求   
PLC應答    位元組數: 0001, 資料: ACK                             // PLC應答(已收到)     

PC機發送   位元組數: 0013, 資料: STX,RTC,"8000","2E",ETX,"E8"    // 發出讀PLC 8000H地址處連續2EH位元組資料指令(這些內容為PLC內預置引數值)   
PLC應答    位元組數: 0008, 資料: STX,'0','8','0','0','D','7','C' // PC機讀入PLC 8000H地址處連續2EH位元組資料   
PLC應答    位元組數: 0008, 資料: '9','0','0','0','0','0','0','0'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'   
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'   
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'   
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'   
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'   
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'   
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'   
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'   
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0',ETX,"CE"   

PC機發送   位元組數: 0013, 資料: STX,"E01","802E","2E",ETX,"FF"  // 發出讀PLC 802EH地址處連續2EH位元組資料指令(這些內容為PLC內預置引數值)   
PLC應答    位元組數: 0008, 資料: STX,'2','0','2','0','F','4','0' // PC機讀入PLC 802EH地址處連續2EH位元組資料   
PLC應答    位元組數: 0008, 資料: '9','F','F','0','B','F','4','0'   
PLC應答    位元組數: 0008, 資料: '1','E','7','0','3','6','4','0'   
PLC應答    位元組數: 0008, 資料: 'E','C','7','0','E','D','C','0'   
PLC應答    位元組數: 0008, 資料: 'E','F','F','0','E','9','0','0'   
PLC應答    位元組數: 0008, 資料: '1','F','E','0','3','0','0','0'   
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'   
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'   
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'   
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'   
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'   
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0',ETX,"E5"   

PC機發送   位元組數: 0001, 資料: ENQ                            // PC機發出通訊請求  
PLC應答    位元組數: 0001, 資料: ACK                            // PLC應答(已收到)    

PC機發送   位元組數: 0013, 資料: STX,"E00","0E06","02",ETX,"E5" // 發出讀PLC 0E06H地址處一字資料指令(這些內容為PLC內預置引數值)   
PLC應答    位元組數: 0008, 資料: STX,"1000",ETX,"C4"            // PC機讀入PLC 0E06H地址處一字資料   
-------------------------------------------------------------------------------------------  
// 讀入PLC中已有程式  
-------------------------------------------------------------------------------------------  
PC機發送   位元組數: 0001, 資料: ENQ                            // PC機發出通訊請求  
PLC應答    位元組數: 0001, 資料: ACK                            // PLC應答(已收到)   
PC機發送   位元組數: 0013, 資料: STX,"E01","805C","2E",ETX,"00"  // 發出讀PLC 805CH地址處連續2EH位元組資料指令  
PLC應答    位元組數: 0008, 資料: STX,'0','2','2','4','0','3','C' // PC機讀入PLC 805CH地址處連續2EH位元組資料   
PLC應答    位元組數: 0008, 資料: '5','0','F','0','0','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'   
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F',ETX,"5C"   
-------------------------------------------------------------------------------------------  
// 讀入結束  
-------------------------------------------------------------------------------------------  
PC機發送   位元組數: 0001, 資料: ENQ                             // PC機發出通訊請求  
PLC應答    位元組數: 0001, 資料: ACK                             // PLC應答(已收到)    
PC機發送   位元組數: 0010, 資料: STX,'E','7','7','6','0','E',ETX,"61"  
PLC應答    位元組數: 0001, 資料: ACK                               
-------------------------------------------------------------------------------------------  
// 下載程式  
-------------------------------------------------------------------------------------------  
PC機發送   位元組數: 0001, 資料: ENQ                             // PC機發出通訊請求  
PLC應答    位元組數: 0001, 資料: ACK                             // PLC應答(已收到)    
PC機發送   位元組數: 0025, 資料: STX,"E11","805C","06",'0','2','2','4','0','3','C','5','0','F','0','0',ETX,"69"   
                                                              // PC機發出寫PLC 805CH地址處連續06H位元組(3步程式)資料指令  
PLC應答    位元組數: 0001, 資料: ACK                             // PLC應答(已收到)    
-------------------------------------------------------------------------------------------  
// 下載結束  
-------------------------------------------------------------------------------------------  
PC機發送   位元組數: 0001, 資料: ENQ                            // PC機發出通訊請求  
PLC應答    位元組數: 0001, 資料: ACK                            // PLC應答(已收到)    
PC機發送   位元組數: 0010, 資料: STX,'E','8','7','6','0','E',ETX,"62"  
PLC應答    位元組數: 0001, 資料: ACK   
PC機發送   位元組數: 0001, 資料: ENQ   
PLC應答    位元組數: 0001, 資料: ACK   
PC機發送   位元組數: 00ENQ, 資料: STX,"B",ETX,"45"   
PLC應答    位元組數: 0001, 資料: ACK   
-------------------------------------------------------------------------------------------  
// 檢驗程式  
-------------------------------------------------------------------------------------------  
PC機發送   位元組數: 0001, 資料: ENQ   
PLC應答    位元組數: 0001, 資料: ACK   
PC機發送   位元組數: 0013, 資料: STX,"E01","805C","06",ETX,"EF"           // 發出讀PLC 805CH地址處連續06H位元組資料指令  
PLC應答    位元組數: 0008, 資料: STX,'0','2','2','4','0','3','C','5','0','F','0','0',ETX,"7C"   
                                                                       // PC機讀入PLC 805CH地址處連續06位元組資料   
-------------------------------------------------------------------------------------------  
// 結束下載  
-------------------------------------------------------------------------------------------  


------------------------------------------------------------------------------------------- 
RS232C介面,通訊波特率 9600,7,e,1 。   
PC機(設定為FX1N)向停止執行的FX1N正常下載3步程式。 
------------------------------------------------------------------------------------------- 
PC機發送   位元組數: 0001, 資料: ENQ                           // PC機發出通訊請求 
PLC應答    位元組數: 0001, 資料: ACK                           // PLC應答(已收到)   
PC機發送   位元組數: 0011, 資料: STX,"0","0E02","02",ETX,"6C"  // 查詢PLC 0E02H地址資料字(PLC型號) 
PLC應答    位元組數: 0008, 資料: STX,"62","66",ETX,"D7"        // PLC返回"6266",代表PLC型號FX1N 

PC機發送   位元組數: 0001, 資料: ENQ                           // PC機發出通訊請求  
PLC應答    位元組數: 0001, 資料: ACK                           // PLC應答(已收到)   

PC機發送   位元組數: 0013, 資料: STX,"E00","01C0","01",ETX,"DD" // 查詢PLC 01C0H地址資料位元組(FX1N執行狀態)   
PLC應答    位元組數: 0006, 資料: STX,"0A",ETX,"74"              // PLC返回"0A",代表PLC暫停 
                                                             // 如PLC返回"09",代表PLC執行 

PC機發送   位元組數: 0001, 資料: ENQ                           // PC機發出通訊請求  
PLC應答    位元組數: 0001, 資料: ACK                           // PLC應答(已收到)   

PC機發送   位元組數: 0011, 資料: STX,"0","0E02","02",ETX,"6C"  // 再次查詢PLC 0E02H地址資料字(PLC型號) 
PLC應答    位元組數: 0008, 資料: STX,"62","66",ETX,"D7"        // PLC返回"6266",代表PLC型號FX1N 

PC機發送   位元組數: 0001, 資料: ENQ                             // PC機發出通訊請求  
PLC應答    位元組數: 0001, 資料: ACK                             // PLC應答(已收到)    

PC機發送   位元組數: 0013, 資料: STX,RTC,"8000","2E",ETX,"E8"    // 發出讀PLC 8000H地址處連續2EH位元組資料指令(這些內容為PLC內預置引數值)  
PLC應答    位元組數: 0008, 資料: STX,'0','8','0','0','D','7','C' // PC機讀入PLC 8000H地址處連續2EH位元組資料  
PLC應答    位元組數: 0008, 資料: '9','0','0','0','0','0','0','0' 
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2' 
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0','2','0','2'  
PLC應答    位元組數: 0008, 資料: '0','2','0','2','0',ETX,"CE"  

PC機發送   位元組數: 0013, 資料: STX,"E01","802E","2E",ETX,"FF"  // 發出讀PLC 802EH地址處連續2EH位元組資料指令(這些內容為PLC內預置引數值)  
PLC應答    位元組數: 0008, 資料: STX,'2','0','2','0','F','4','0' // PC機讀入PLC 802EH地址處連續2EH位元組資料  
PLC應答    位元組數: 0008, 資料: '9','F','F','0','B','F','4','0'  
PLC應答    位元組數: 0008, 資料: '1','E','7','0','3','6','4','0'  
PLC應答    位元組數: 0008, 資料: 'E','C','7','0','E','D','C','0'  
PLC應答    位元組數: 0008, 資料: 'E','F','F','0','E','9','0','0'  
PLC應答    位元組數: 0008, 資料: '1','F','E','0','3','0','0','0'  
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'  
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'  
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'  
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'  
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0','0','0','0'  
PLC應答    位元組數: 0008, 資料: '0','0','0','0','0',ETX,"E5"  

PC機發送   位元組數: 0001, 資料: ENQ                            // PC機發出通訊請求 
PLC應答    位元組數: 0001, 資料: ACK                            // PLC應答(已收到)   

PC機發送   位元組數: 0013, 資料: STX,"E00","0E06","02",ETX,"E5" // 發出讀PLC 0E06H地址處一字資料指令(這些內容為PLC內預置引數值)  
PLC應答    位元組數: 0008, 資料: STX,"1000",ETX,"C4"            // PC機讀入PLC 0E06H地址處一字資料  
------------------------------------------------------------------------------------------- 
// 讀入PLC中已有程式 
------------------------------------------------------------------------------------------- 
PC機發送   位元組數: 0001, 資料: ENQ                            // PC機發出通訊請求 
PLC應答    位元組數: 0001, 資料: ACK                            // PLC應答(已收到)  
PC機發送   位元組數: 0013, 資料: STX,"E01","805C","2E",ETX,"00"  // 發出讀PLC 805CH地址處連續2EH位元組資料指令 
PLC應答    位元組數: 0008, 資料: STX,'0','2','2','4','0','3','C' // PC機讀入PLC 805CH地址處連續2EH位元組資料  
PLC應答    位元組數: 0008, 資料: '5','0','F','0','0','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F','F','F','F'  
PLC應答    位元組數: 0008, 資料: 'F','F','F','F','F',ETX,"5C"  
------------------------------------------------------------------------------------------- 
// 讀入結束 
------------------------------------------------------------------------------------------- 
PC機發送   位元組數: 0001, 資料: ENQ                             // PC機發出通訊請求 
PLC應答    位元組數: 0001, 資料: ACK                             // PLC應答(已收到)   
PC機發送   位元組數: 0010, 資料: STX,'E','7','7','6','0','E',ETX,"61" 
PLC應答    位元組數: 0001, 資料: ACK                              
------------------------------------------------------------------------------------------- 
// 下載程式 
------------------------------------------------------------------------------------------- 
PC機發送   位元組數: 0001, 資料: ENQ                             // PC機發出通訊請求 
PLC應答    位元組數: 0001, 資料: ACK                             // PLC應答(已收到)   
PC機發送   位元組數: 0025, 資料: STX,"E11","805C","06",'0','2','2','4','0','3','C','5','0','F','0','0',ETX,"69"  
                                                              // PC機發出寫PLC 805CH地址處連續06H位元組(3步程式)資料指令 
PLC應答    位元組數: 0001, 資料: ACK                             // PLC應答(已收到)   
------------------------------------------------------------------------------------------- 
// 下載結束 
------------------------------------------------------------------------------------------- 
PC機發送   位元組數: 0001, 資料: ENQ                            // PC機發出通訊請求 
PLC應答    位元組數: 0001, 資料: ACK                            // PLC應答(已收到)   
PC機發送   位元組數: 0010, 資料: STX,'E','8','7','6','0','E',ETX,"62" 
PLC應答    位元組數: 0001, 資料: ACK  
PC機發送   位元組數: 0001, 資料: ENQ  
PLC應答    位元組數: 0001, 資料: ACK  
PC機發送   位元組數: 00ENQ, 資料: STX,"B",ETX,"45"  
PLC應答    位元組數: 0001, 資料: ACK  
------------------------------------------------------------------------------------------- 
// 檢驗程式 
------------------------------------------------------------------------------------------- 
PC機發送   位元組數: 0001, 資料: ENQ  
PLC應答    位元組數: 0001, 資料: ACK  
PC機發送   位元組數: 0013, 資料: STX,"E01","805C","06",ETX,"EF"           // 發出讀PLC 805CH地址處連續06H位元組資料指令 
PLC應答    位元組數: 0008, 資料: STX,'0','2','2','4','0','3','C','5','0','F','0','0',ETX,"7C"  
                                                                       // PC機讀入PLC 805CH地址處連續06位元組資料  
------------------------------------------------------------------------------------------- 
// 結束下載 
-------------------------------------------------------------------------------------------