PM904F處理器控制模塊
對(duì)于大多數(shù)應(yīng)用,不需要指定超時(shí),充當(dāng)超時(shí)。(字12應(yīng)為零表示無超時(shí))。然而,有兩個(gè)建議指定超時(shí)的特殊情況:A、 當(dāng)時(shí)間單位數(shù)(字11)為零時(shí),后續(xù)傳輸將
在上一次轉(zhuǎn)賬完成后立即發(fā)出,不會(huì)出現(xiàn)期間錯(cuò)誤報(bào)道。在這種情況下,可以指定超時(shí)值,以便超時(shí)錯(cuò)誤為由信道錯(cuò)誤位報(bào)告。
B、 當(dāng)讀取周期非常長時(shí)(分鐘或小時(shí))。在這種情況下,超時(shí)時(shí)間較短
可以指定值,以便應(yīng)用程序不必等待讀取周期在采取行動(dòng)之前過期。
(字13)本地PLC-存儲(chǔ)器類型:字13-14指定本地PLC中的位置
其中FIP總線控制器將存儲(chǔ)從遠(yuǎn)程PLC接收的數(shù)據(jù)。大小
該區(qū)域由從遠(yuǎn)程PLC(字17)讀取的數(shù)據(jù)大小設(shè)置。確信這一點(diǎn)
區(qū)域足夠大,可以包含請(qǐng)求的數(shù)據(jù),而不會(huì)覆蓋其他應(yīng)用程序
數(shù)據(jù)有效的內(nèi)存類型包括:使用“建立寫入通道”命令打開到遠(yuǎn)程PLC和的通道
定期將數(shù)據(jù)從本地PLC傳輸?shù)竭h(yuǎn)程PLC。如下面的示例所示,命令塊指定周期、數(shù)量
要執(zhí)行的寫入,以及等待每次傳輸完成所允許的超時(shí)。這個(gè)第一次寫入將立即執(zhí)行,而不考慮指定的周期。
示例:建立寫入通道命令塊
本示例在IP地址處建立遠(yuǎn)程PLC的寫入通道(通道6)
3.0.0.1.它將COMREQ狀態(tài)字返回到%R10。成功執(zhí)行命令,F(xiàn)IP總線控制器將從本地PLC寄存器寫入數(shù)據(jù)%R50-%R57到遠(yuǎn)程PLC寄存器%R100-%R107。此通信將以每7秒一次的速率無限重復(fù)。每個(gè)的超時(shí)時(shí)間
寫入時(shí)間為500毫秒。即使在通道命令設(shè)置為發(fā)出一次寫入示例寫入周期計(jì)算:如果Word 10包含值3,則指定秒作為時(shí)間單位,并且字11包含值20,則寫入周期為20秒。
通常在每個(gè)寫入周期開始時(shí)發(fā)出寫入。如果掛起的寫入傳輸
寫入期間未完成,通道錯(cuò)誤位和詳細(xì)通道
狀態(tài)字被設(shè)置為指示非致命周期錯(cuò)誤。掛起的傳輸仍然可以在周期錯(cuò)誤發(fā)生后完成。對(duì)于設(shè)置為發(fā)出多個(gè)寫入時(shí),下一次寫入傳輸僅在掛起的寫入傳輸完成后發(fā)出。
設(shè)置為發(fā)出單個(gè)寫入的通道命令只能有一個(gè)掛起的寫入轉(zhuǎn)移
如果時(shí)間單位數(shù)為零,則在對(duì)于大多數(shù)應(yīng)用,不需要指定超時(shí),
充當(dāng)超時(shí)。(字12應(yīng)為零表示無超時(shí))。然而,有兩個(gè)
建議指定超時(shí)的特殊情況:
A、 當(dāng)時(shí)間單位數(shù)(字11)為零時(shí),后續(xù)傳輸將在上一次轉(zhuǎn)賬完成后立即發(fā)出,不會(huì)出現(xiàn)期間錯(cuò)誤報(bào)道。在這種情況下,可以指定超時(shí)值,以便超時(shí)錯(cuò)誤為由信道錯(cuò)誤位報(bào)告。
B、 當(dāng)讀取周期非常長時(shí)(分鐘或小時(shí))。在這種情況下,超時(shí)時(shí)間較短
可以指定值,以便應(yīng)用程序不必等待讀取周期在采取行動(dòng)之前過期。
(字13)本地PLC-存儲(chǔ)器類型:字13-14指定本地PLC中的位置
其中FIP總線控制器將存儲(chǔ)從遠(yuǎn)程PLC接收的數(shù)據(jù)。大小
該區(qū)域由從遠(yuǎn)程PLC(字17)讀取的數(shù)據(jù)大小設(shè)置。確信這一點(diǎn)
區(qū)域足夠大,可以包含請(qǐng)求的數(shù)據(jù),而不會(huì)覆蓋其他應(yīng)用程序
數(shù)據(jù)有效的內(nèi)存類型包括:使用“建立寫入通道”命令打開到遠(yuǎn)程PLC和的通道
定期將數(shù)據(jù)從本地PLC傳輸?shù)竭h(yuǎn)程PLC。
如下面的示例所示,命令塊指定周期、數(shù)量
要執(zhí)行的寫入,以及等待每次傳輸完成所允許的超時(shí)。這個(gè)第一次寫入將立即執(zhí)行,而不考慮指定的周期。
示例:建立寫入通道命令塊
本示例在IP地址處建立遠(yuǎn)程PLC的寫入通道(通道6)3.0.0.1.它將COMREQ狀態(tài)字返回到%R10。成功執(zhí)行命令,F(xiàn)IP總線控制器將從本地PLC寄存器寫入數(shù)據(jù)%R50-%R57到遠(yuǎn)程PLC寄存器%R100-%R107。此通信將以每7秒一次的速率無限重復(fù)。每個(gè)的超時(shí)時(shí)間寫入時(shí)間為500毫秒。即使在通道
命令設(shè)置為發(fā)出一次寫入示例寫入周期計(jì)算:如果Word 10包含值3,則指定
秒作為時(shí)間單位,并且字11包含值20,則寫入周期為20秒。
通常在每個(gè)寫入周期開始時(shí)發(fā)出寫入。如果掛起的寫入傳輸
寫入期間未完成,通道錯(cuò)誤位和詳細(xì)通道
狀態(tài)字被設(shè)置為指示非致命周期錯(cuò)誤。掛起的傳輸仍然可以
在周期錯(cuò)誤發(fā)生后完成。對(duì)于設(shè)置為發(fā)出多個(gè)
寫入時(shí),下一次寫入傳輸僅在掛起的寫入傳輸完成后發(fā)出。
設(shè)置為發(fā)出單個(gè)寫入的通道命令只能有一個(gè)掛起的寫入轉(zhuǎn)移如果時(shí)間單位數(shù)為零,則在
For most applications there is no need to specify a timeout,
Act as a timeout. (word 12 should be zero to indicate no timeout). However, there are two
It is recommended to specify the special case of timeout:
A. When the number of time units (word 11) is zero
It will be sent immediately after the last transfer, and there will be no period error
Reporting. In this case, you can specify a timeout value so that the timeout error is
Reported by the channel error bit.
B. When the reading period is very long (minutes or hours). In this case, the timeout is short
You can specify a value so that the application does not have to wait for a read cycle
Expires before action is taken.
(word 13) local PLC memory type: words 13-14 specify the location in the local PLC
Where the FIP bus controller will store the data received from the remote PLC. size
This area is set by the data size read from the remote PLC (word 17). Be sure of this
The area is large enough to contain the requested data without overwriting other applications
Valid memory types of data include: use the "establish write channel" command to open the channel to the remote PLC and Periodically transfer data from local PLC to remote PLC.
As shown in the following example, the command block specifies the period and quantity
The write to be performed, and the timeout allowed to wait for each transfer to complete. thisThe first write is performed immediately, regardless of the specified cycle.
Example: create write channel command block
This example establishes a write channel of a remote PLC at the IP address (channel 6)
3.0.0.1. It returns the comreq status word to% R10. Successfully executed
Command, FIP bus controller will write data from local PLC register
%R50 -% R57 to remote PLC registers% R100 -% R107. This communication will:
Repeat infinitely at a rate of once every 7 seconds. Timeout for each
The write time is 500 milliseconds. Even in the channel
The command is set to issue a write
Example write cycle calculation: if word 10 contains a value of 3, specify
Seconds as the time unit, and word 11 contains a value of 20, then the write cycle is 20 seconds.
A write is usually issued at the beginning of each write cycle. If a pending write transfer
Incomplete during writing, channel error bit and detailed channel
The status word is set to indicate a non fatal periodic error. Pending transfers are still available
Complete after cycle error occurs. For multiple
When writing, the next write transfer is issued only after the pending write transfer is completed.
A channel command set to issue a single write can only have one pending write
transfer
If the number of time units is zero