# Memory Mapping

Memory mapping consists of two blocks of which size is variable depending on the data block size:

Input is viewed from PLC perspective and shows data from DMA-EZCCM-001 -> PLC

| Status | Result Data | Total Size
--- | --- | --- | ---
INPUT | 8 bytes | 16 bytes | 24 bytes
32 bytes | 40 bytes
64 bytes | 72 bytes
136 bytes | 144 bytes
232 bytes | 240 bytes

Byte | Description | Bit | Description | Comment
--- | --- | --- | --- | ---
0 | Trigger Status | 0 | Trigger Ready | 0 = Not Ready to Accept Trigger via Fieldbus (state when Trigger Enable is low or currently processing trigger or soft event) 1 = Ready to Accept new Trigger via Fieldbus
1 | Trigger Ack | Confirmation of receiving Trigger ON bit, stays on until Trigger bit is low.
2 | Acquiring | 0 = Reader Idle 1 = Reader Processing a trigger (whether it came from photo eye or fieldbus)
3 | Missed Trigger | 0 = No Error 1 = Received a trigger (signal from Photo Eye or Field bus) when an other trigger or soft event is processing. Will reset automatically when a successful trigger could be processed again.
4 | Current Mode | 0 = Setup Tool Mode 1 = Run Mode
5 | Serial Error | 0 = No Error; Reader is Connected 1 = No Reader connected
6 | Trigger Pin 4 Current State | Copy state of input line IN 1
7 | Trigger Pin 2 Current State | Copy state of input line IN 2
1 | Result Status | 0 | Results Available | Indicates that a new set of read results are available (i.e. the contents of the Result Data are valid). Cleared when results are acknowledged by PLC.
1 | Result Ack mirror | This bit mirrors the state of the "Results Ack" bit from the output data. This is not exactly "Result Data Valid". When the result data is first presented, this bit will still be "0," since it just mirrors the "Results Ack" bit from the last output but the data is valid.
2 | Result Data Buffer Overrun |
3 |  |
4 |  |
5 |  |
6 |  |
7 | General Fault | Indicates that a fault has occurred (currently reports V1 or V2 undervoltage).
2 | Soft Event Status | 0 ... 6 | Soft Event Error Code | Soft event error code from DMCC Error code 127 - timeout
7 | Command Completed or Timed out |
3 | ResultCode | 0 ... 7 |  | 0 - Trigger result 1 - SoftEvent Command is running 2- SoftEvent Command Complete
4 | TriggerID | 0..7 |  | ID value of the next trigger to be issued. Used to match issues triggers with corresponding result data received later.
5 | ResultID | 0.7 |  | The value of the “Trigger ID” counter when the trigger that generated these results was issued.
6 | ResultLength | 0..7 |  | Actual number of bytes contained in the “Result Data" field.
7 | Data Block Size ACK | 0 ... 3 | Data Block Size Ack | 0 = 16 bytes (default) 1 = 32 bytes 2 = 64 bytes 3 = 136 bytes 4 = 232 bytes
4 |  |
5 |  |
6 |  |
7 | Reader 2 Disabled | 0 = Reader 2 Enabled (default) 1 = Reader 2 Disabled
8 ... 239 | ResultData | --- |  |

Output is viewed from PLC perspective and shows data from PLC -> DMA-EZCCM-001

| Control | User Data | Total Size
--- | --- | --- | ---
OUTPUT | 8 bytes | 16 bytes | 24 bytes
32 bytes | 40 bytes
64 bytes | 72 bytes
136 bytes | 144 bytes

Byte | Description | Bit | Description | Comment
--- | --- | --- | --- | ---
0 | Trigger Control | 0 | Trigger Enable | 0 = Trigger via PhotoEye 1 = Trigger via Fieldbus
1 | Trigger | 0 = Trigger OFF 1 = Trigger ON * only when Trigger Enable == 1
2 |  |
3 |  |
4 | Force Run Mode | 0 = Allow to open Setup Tool Connection 1 = Block Setup Tool Connection and stay in Run Mode
5 | Trigger Setting | 0 = Individual Trigger per reader 1 = Trigger = triggers both readers * Only for Trigger 2
6 | Trigger Pin | 0 = Pin 4 IN1 1 = Pin 2 IN2
7 | Trigger Edge | 0 = Rising edge 1 = Falling edge
1 | Result Control | 0 | Results Ack | Bit is used to acknowledge that the PLC has successfully read the last result data. When set to true the ‘Result Available’ bit will be cleared.
1 |  |
2 |  |
3 |  |
4 |  |
5 |  |
6 |  |
7 |  |
2 | Soft Event Control | 0 | Soft Event Train Code |
1 | Soft Event Train Match String |
2 | Soft Event Focus |
3 | Soft Event Train Brightness |
4 | Soft Event Untrain |
5 | Soft Event Set Input String |
6 | Soft Event Execute DMCC |
7 | Soft Event Set Match String |
3 | UserDataOption | 0 ... 7 |  | Only used by “Set Match String” soft event. Specifies which code target to assign the string (16-bit integer).
4 |  | 0 ... 7 |  |
5 |  | 0 .. 7 |  |
6 | UserDataLength | 0 .. 7 |  | Actual number of bytes contained in the "User Data" field.
7 | Data Block Size | 0 ... 3 | Data Block Size Enumeration | 0 = 16 bytes (default) 1 = 32 bytes 2 = 64 bytes 3 = 136 bytes 4 = 232 bytes
4 |  |
5 |  |
6 |  |
7 | Reader 2 Disabled | 0 = Reader 2 Enabled 1 = Reader 2 Disabled
8 … 239 | UserData | --- |  |