HIMA F3 DIO 8/8 01模塊,F3 DIO 8/8 01使用過程
主CLX示例
主機(jī)CPU和掃描儀模塊之間的握手使用CMD控件完成(本地:Slot:O.Data[0])、CMD參數(shù)(本地:Slot:O.Data[1])和CMD Reply(本地:Slot:
一、 數(shù)據(jù)[1])寄存器。以下示例顯示了如何與卡交互:
?通過讀取ModuleStatus寄存器(本地:插槽:
一、 數(shù)據(jù)[0])。如果是(0xE0),請等待1秒鐘,然后將卡聯(lián)機(jī)。
?卡運(yùn)行且總線尚未運(yùn)行時(shí),將總線置于運(yùn)行模式模式

IMA F3 DIO 8/8 01模塊?通過在CMD控件中設(shè)置命令位,發(fā)出未完成的命令寄存器(本地:插槽:S.Data[0]。0)筆記主CLX示例必須包含在控制邏輯中除非您使用的是自動(dòng)運(yùn)行位。如果使用自動(dòng)運(yùn)行bit你仍應(yīng)使用主CLX示例中的梯級4和5,以便能夠通過命令參數(shù)寄存器發(fā)出命令。參見第節(jié)10.2.3有關(guān)自動(dòng)運(yùn)行位的更多信息。
PfbMasSts\u位是全局狀態(tài)位。僅當(dāng)所有從屬設(shè)備存在,并與主設(shè)備進(jìn)行數(shù)據(jù)交換。如果你這樣做了當(dāng)某些從屬設(shè)備丟失或不存在時(shí),不想進(jìn)入運(yùn)行模式通信時(shí),應(yīng)將此位作為聯(lián)系人檢查添加到橫檔2
Main CLX Example
Handshaking between the Host CPU and the scanner module is done using the CMD Control
(Local:Slot: O.Data[0]), CMD Argument (Local:Slot: O.Data[1]), and CMD Reply (Local:Slot:
I.Data[1]) registers.
The following example shows how to interface with the card:
?
Check to see if the Card is offline by reading the ModuleStatus register (Local:Slot:
I.Data[0]). If it is (0xE0), wait one 1 second and then put the Card online.
?
Put the Bus in Run mode once the Card is running and the Bus is not already in Run
mode
?
Issue commands that are outstanding by setting the command bit in the CMD Control
register (Local:Slot: S.Data[0].0)
Note
The Main CLX Example must be included with your Control Logic
unless you are using the AutoRun bit. If using the AutoRun bit you
should still use rungs 4 and 5 from the Main CLX Example to be able to
issue commands through the Command Argument register. See section
10.2.3 for more information on the AutoRun bit.
Note
The PfbMasSts_Bit is the Global Status bit. It will be set only if all
slaves are present and in data exchange with the Master. If you do
not want to enter Run mode while some slaves are missing or not
communicating, you should add this bit as an Examine On contact to
rung 2