HIMA F3 DIO 8/8 01模块,F3 DIO 8/8 01使用过程
主CLX示例
主机CPU和扫描仪模块之间的握手使用CMD控件完成(本地:Slot:O.Data[0])、CMD参数(本地:Slot:O.Data[1])和CMD Reply(本地:Slot:
一、 数据[1])寄存器。以下示例显示了如何与卡交互:
•通过读取ModuleStatus寄存器(本地:插槽:
一、 数据[0])。如果是(0xE0),请等待1秒钟,然后将卡联机。
•卡运行且总线尚未运行时,将总线置于运行模式模式
IMA F3 DIO 8/8 01模块•通过在CMD控件中设置命令位,发出未完成的命令寄存器(本地:插槽:S.Data[0]。0)笔记主CLX示例必须包含在控制逻辑中除非您使用的是自动运行位。如果使用自动运行bit你仍应使用主CLX示例中的梯级4和5,以便能够通过命令参数寄存器发出命令。参见第节10.2.3有关自动运行位的更多信息。
PfbMasSts\u位是全局状态位。仅当所有从属设备存在,并与主设备进行数据交换。如果你这样做了当某些从属设备丢失或不存在时,不想进入运行模式通信时,应将此位作为联系人检查添加到横档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