RF522數(shù)字量輸出框架
FIP總線控制器將在設(shè)置前等待寫入傳輸完成
通道錯誤位和詳細(xì)的通道狀態(tài)位,用于指示非致命超時
錯誤即使發(fā)生超時,傳輸仍然可以完成。因此應(yīng)用程序可以選擇發(fā)生這種情況時要做什么。如果超時值被指定為零,不會報告超時錯誤。
對于大多數(shù)應(yīng)用,不需要指定超時,充當(dāng)超時。(字12應(yīng)為零表示無超時。)然而,有兩個建議指定超時的特殊情況:A、 當(dāng)時間單位數(shù)(字11)為零時,后續(xù)傳輸將在上一次轉(zhuǎn)賬完成且無期間錯誤時立即發(fā)出
報道。在這種情況下,可以指定超時值,以便超時錯誤為由信道錯誤位報告。
B、 當(dāng)寫入周期非常長時(分鐘或小時)。在這種情況下,超時時間較短可以指定值,這樣應(yīng)用程序就不必等待寫入周期在采取行動之前過期。
(字13)本地PLC-存儲器類型:字13-14指定本地PLC中的位置FIP總線控制器將從中獲取要寫入遠(yuǎn)程PLC的數(shù)據(jù)。該區(qū)域的大小由寫入遠(yuǎn)程PLC的數(shù)據(jù)大小設(shè)置。有效的內(nèi)存類型有:程序名(字24-27)和程序塊名
(字28-31)必須在PLC內(nèi)反轉(zhuǎn)每對ASCII字符
記憶力例如,名稱“瑪麗”(“M”=4DH,“A”=41H,“R”=52H,“Y”=59H)將在第一個字中有414D,在第一個詞中有5952第二個詞。使用發(fā)送信息報告COMREQ打開與主機(jī)應(yīng)用程序SRTP(服務(wù)請求傳輸協(xié)議)服務(wù)器并傳輸數(shù)據(jù)
從本地PLC CPU參考表到該SRTP服務(wù)器。命令塊指定重復(fù)周期、要執(zhí)行的到服務(wù)器的傳輸數(shù)以及等待每次傳輸完成時允許超時。執(zhí)行第一次發(fā)送立即,而不管指定的時間段。
示例:發(fā)送信息報告命令塊此示例命令塊建立到遠(yuǎn)程主機(jī)的通道(通道7)
IP地址為3.0.0.1的應(yīng)用程序服務(wù)器。它將COMREQ狀態(tài)字返回到%R10。
成功執(zhí)行COMREQ后,F(xiàn)IP總線控制器發(fā)送本地PLC將%R50–%R57注冊到遠(yuǎn)程服務(wù)器。該通信在以下位置重復(fù)10次:每7秒一次的速率。每次讀取的超時時間為500毫秒
e FIP Bus Controller will wait for a write transfer to complete before setting
the Channel Error bit and Detailed Channel Status bits to indicate a non-fatal timeout
error. The transfer can still complete even after a timeout occurs. As a result, an
application can choose what to do if one occurs. If the timeout value is specified as zero,
no timeout errors will be reported.
For most applications a timeout need not be specified because the write period, in effect,
acts as a timeout. (Word 12 should be zero for no timeout.) However, there are two
special circumstances in which specifying a timeout is recommended:
A. When the number of time units (word 11) is zero, so that a subsequent transfer will
be issued as soon as the previous transfer completes and no period errors are
reported. In this case a timeout value can be specified so that timeout errors will be
reported by the Channel Error bit.
B. When the write period is very long (minutes or hours). In this case a shorter timeout
value can be specified so the application doesn’t have to wait for the write period to
expire before taking action.
(Word 13) Local PLC - Memory Type: Words 13-14 specify the location in the local PLC
from where the FIP Bus Controller will get the data to be written to the remote PLC.
The size of this area is set by the size of the data written to the remote PLC. Valid
memory types are:The Program Name (words 24 - 27) and Program Block Name (words
28 - 31) must have each pair of ASCII characters reversed within the PLC
memory. For example, the name “MARY” (“M” = 4DH, “A” = 41H,
“R” = 52H, “Y” = 59H) would have 414D in the first word and 5952 in
the second word.Use the Send Information Report COMREQ to open a communications channel to a
Host Application SRTP (Service Request Transfer Protocol) server and to transfer data
from the local PLC CPU reference tables to that SRTP Server. The Command Block
specifies the repetition period, the number of transfers to the server to perform, and the
timeout allowed in waiting for each transfer to complete. The first send is performed
immediately, regardless of the period specified.
Example Send Information Report Command Block
This example Command Block establishes a channel (channel 7) to a remote Host
application server at IP address 3.0.0.1. It returns the COMREQ Status word to %R10.
Following successful execution of the COMREQ, the FIP Bus Controller sends local PLC
registers %R50–%R57 to the remote server. This communication is repeated 10 times at
the rate of once every 7 seconds. The timeout period for each read is 500 ms