2011年8月26日 星期五

PLC|RS485模式選擇: ASCII vs RTU

RS485通訊中,有兩個不同的格式可以選擇。
除了格式不同,你知道還影響到那些嗎!?

ASCII 格式:
開頭碼+7-8bit data+同位元+結束碼
data=ASCII code(0-127)

RTU格式:
開頭碼+8bit data+同位元+結束碼
data=16進制碼(0-9,a-f)


差異點:
1.ASCII 可以表達文字,RTU不行。
2.RUT一次可以發送兩個數字,ASCII只能發送一個。
3.檢查錯誤方式不同。
============================


以PLC跟外部裝置通訊來說,
只會有數字,不會有文字的溝通,
所以選RTU可以加快交握的速度。





2011年8月25日 星期四

PLC | RS485 to use HMI communication is the best choice

In the last article written, because the relationship between the PLC scan time,
Makes the communication time <scan time,
A lot of time wasted on the PLC scan time.

The HMI is to use the firmware to handle the communication, to avoid the problem out of the PLC scan time.

If you use the HMI to do RS485, another relative problem will occur.
1 HMI communication with the PLC's different way of writing.
2.PLC, HMI & control of both sides of the program, follow-up would be more trouble Debug.
3 HMI will usually far away from the other components, interference issues to consider.

PLC|RS485使用人機來通訊,最好

PLC|RS485使用人機來通訊是最好選擇

在上一篇文章寫到,因為PLC的掃描時間的關系,
使得通訊時間<掃描時間,
很多時間浪費在PLC的掃描時間。

而人機是使用韌體來處理通訊方式,可以避免掉PLC掃描時間的問題。

如果使用人機來做RS485,又有相對的問題會發生。
1.人機的通訊方式跟PLC寫法不同。
2.PLC、HMI兩邊都有控制權&程式,後續DEBUG會比較麻煩。
3.一般人機會離其他元件較遠,干擾問題要考慮。