三菱變頻器 E540
現(xiàn)在通訊設(shè)置沒有問題(9600 E 2) 但是問題是 傳送的數(shù)據(jù)不連續(xù)(有時候會連續(xù)) 造成變頻器沒有響應(yīng)
用串口捕捉工具看了下模塊所發(fā)送的數(shù)據(jù) 如下 :
# Time Function Data ( Hex )
1 [00000000] IRP_MJ_CREATE Port Opened - AccessPort.exe
2 [00000000] IOCTL_SERIAL_SET_BAUD_RATE Baud Rate: 9600
8 [00002544] IRP_MJ_READ Length: 0010, Data: 05 30 31 46 41 31 30 32 37 42
9 [00002694] IRP_MJ_READ Length: 0010, Data: 05 30 31 46 41 31 30 32 37 42
10 [00002784] IRP_MJ_READ Length: 0010, Data: 05 30 31 46 41 31 30 32 37 42
11 [00002841] IRP_MJ_READ Length: 0006, Data: 05 30 31 46 41 31
12 [00002842] IRP_MJ_READ Length: 0004, Data: 30 32 37 42
13 [00002901] IRP_MJ_READ Length: 0004, Data: 05 30 31 46
14 [00002902] IRP_MJ_READ Length: 0006, Data: 41 31 30 32 37 42
15 [00002949] IRP_MJ_READ Length: 0005, Data: 05 30 31 46 41
16 [00002950] IRP_MJ_READ Length: 0005, Data: 31 30 32 37 42
17 [00003001] IRP_MJ_READ Length: 0008, Data: 05 30 31 46 41 31 30 32
18 [00003002] IRP_MJ_READ Length: 0002, Data: 37 42
19 [00003047] IRP_MJ_READ Length: 0010, Data: 05 30 31 46 41 31 30 32 37 42
20 [00003094] IRP_MJ_READ Length: 0001, Data: 05
21 [00003095] IRP_MJ_READ Length: 0009, Data: 30 31 46 41 31 30 32 37 42
Length: 0010, Data: 05 30 31 46 41 31 30 32 37 42 這樣的數(shù)據(jù)時正確的 變頻器能有響應(yīng) 也就是10位的數(shù)據(jù)要一起發(fā)送才可以的現(xiàn)在的問題就是有時候是連續(xù)的 有時候不是 不知問題所在
PLC程序只有兩段 一段是數(shù)據(jù)傳送到數(shù)據(jù)區(qū) 第二段入附圖所示
不知是不是每一次通訊完成后都要清空一下SCU呢???(注 對協(xié)議宏和該模塊還不是很了解 所以有此想法 )
附圖 PLC程序 和 協(xié)議宏
期待高人出現(xiàn)