Coe Register Extract

Register Extract Function


In [1]:
import binascii

def register_extract(hex_string='abcd0123', definition=([ 0, 'RegisterName', 'Comment'],) ):
  num_of_bits = 32
  bin_string = bin(int(hex_string, 16))[2:].zfill(num_of_bits)
  
  print("^ Hexadezimal Value: 0x{0} {1}  =>  Binary Value: 0b{2} {3} {4} {5} {6} {7} {8} {9} ^^^".format(hex_string[0:4],hex_string[4:8], bin_string[0:4], bin_string[4:8], bin_string[8:12], bin_string[12:16], bin_string[16:20], bin_string[20:24], bin_string[24:28], bin_string[28:32]))
  print("^ {0:>4} ^  {1:>15} ^ {2:50} ^".format("Bit", "Registername", "Comment"))
  
  for i in range(num_of_bits):
    for entry in definition:
      bit = bin_string[num_of_bits-1-i]
      if bit == "1" and entry[0] == i:
        print("| {0:4} | {1:>16} | {2:50} |".format(i, entry[1], entry[2]))
  print("")

CoE 0x8000 - Print Mode Setup Register (PrintControl)

WpWiki CoE Registers

Link table doc PrintMode-PrintControl


In [2]:
printModeSetup_def  = ([ 4, '', 'Drop Multiplication'],)
printModeSetup_def += ([ 8, '', 'Start Absolut'],)
printModeSetup_def += ([ 9, '', 'Start Relativ'],)
printModeSetup_def += ([10, '', 'Activate Img Offset'],)
printModeSetup_def += ([11, '', 'Activate Img Shift'],)
printModeSetup_def += ([12, '', 'ImageRotation'],)
printModeSetup_def += ([13, '', 'ImageMapping'],)
printModeSetup_def += ([16, '', 'Flip-X'],)
printModeSetup_def += ([17, '', 'Flip-Y'],)
printModeSetup_def += ([18, '', 'Activate Masking'],)
printModeSetup_def += ([24, '', 'Emulation Encoder'],)
printModeSetup_def += ([25, '', 'Use HW Encoder'],)
printModeSetup_def += ([26, '', 'Reverse HW Encoder'],)
printModeSetup_def += ([27, '', 'Encoder Single Phase Mode'],)
printModeSetup_def += ([28, '', 'RS422 option [0] 0=HW_Enc, 1=Dropwatcher, 2=Cam_Sync, 3=NoOutput'],)
printModeSetup_def += ([29, '', 'RS422 option [1] 0=HW_Enc, 1=Dropwatcher, 2=Cam_Sync, 3=NoOutput'],)

Digiround Settings


In [3]:
register_extract("00040C00", printModeSetup_def) # Digiround Settings original
register_extract("00042C00", printModeSetup_def) # Digiround Settings with image mapping


^ Hexadezimal Value: 0x0004 0C00  =>  Binary Value: 0b0000 0000 0000 0100 0000 1100 0000 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   18 |                  | Activate Masking                                   |

^ Hexadezimal Value: 0x0004 2C00  =>  Binary Value: 0b0000 0000 0000 0100 0010 1100 0000 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   13 |                  | ImageMapping                                       |
|   18 |                  | Activate Masking                                   |

Arcolor Settings


In [4]:
# Old < FPGA v1.3.0
#register_extract("00021C10", printModeSetup_def) #          Flip Y <- Used @ Arcolor 20170608
# New >= FPGA v1.3.0
#register_extract("10010C10", printModeSetup_def) # Flip X
#register_extract("10011C10", printModeSetup_def) # Flip X
#register_extract("10021C10", printModeSetup_def) #          Flip Y <- Used @ Arcolor 20170608
#register_extract("10031C10", printModeSetup_def) # Flip X + Flip Y

#register_extract("10001C10", printModeSetup_def) # Flip X + Flip Y


register_extract("10020C10", printModeSetup_def) #          Flip Y <- Used @ Arcolor 20170608


^ Hexadezimal Value: 0x1002 0C10  =>  Binary Value: 0b0001 0000 0000 0010 0000 1100 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |                  | Drop Multiplication                                |
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   17 |                  | Flip-Y                                             |
|   28 |                  | RS422 option [0] 0=HW_Enc, 1=Dropwatcher, 2=Cam_Sync, 3=NoOutput |

Krones Settings


In [5]:
register_extract("00040C00", printModeSetup_def) # Technikum Machine
register_extract("00070C00", printModeSetup_def) # DecoType + Flip X + Flip Y


^ Hexadezimal Value: 0x0004 0C00  =>  Binary Value: 0b0000 0000 0000 0100 0000 1100 0000 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   18 |                  | Activate Masking                                   |

^ Hexadezimal Value: 0x0007 0C00  =>  Binary Value: 0b0000 0000 0000 0111 0000 1100 0000 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   16 |                  | Flip-X                                             |
|   17 |                  | Flip-Y                                             |
|   18 |                  | Activate Masking                                   |

Steinemann DMAX CPI-Books Settings

DMAX CPI-Books default settings without Camera


In [6]:
register_extract("00051C10", printModeSetup_def) # Dmax (Printlack, Mainfranken)
register_extract("10051C10", printModeSetup_def) # Dmax (Printlack, Mainfranken)


^ Hexadezimal Value: 0x0005 1C10  =>  Binary Value: 0b0000 0000 0000 0101 0001 1100 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |                  | Drop Multiplication                                |
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   12 |                  | ImageRotation                                      |
|   16 |                  | Flip-X                                             |
|   18 |                  | Activate Masking                                   |

^ Hexadezimal Value: 0x1005 1C10  =>  Binary Value: 0b0001 0000 0000 0101 0001 1100 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |                  | Drop Multiplication                                |
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   12 |                  | ImageRotation                                      |
|   16 |                  | Flip-X                                             |
|   18 |                  | Activate Masking                                   |
|   28 |                  | RS422 option [0] 0=HW_Enc, 1=Dropwatcher, 2=Cam_Sync, 3=NoOutput |

DMAX CPI-Books settings with Camera Sync Output


In [7]:
register_extract("20051C10", printModeSetup_def) # Dmax @ Steinemann + Camera sync
register_extract("00061C10", printModeSetup_def)
register_extract("00071C10", printModeSetup_def)


^ Hexadezimal Value: 0x2005 1C10  =>  Binary Value: 0b0010 0000 0000 0101 0001 1100 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |                  | Drop Multiplication                                |
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   12 |                  | ImageRotation                                      |
|   16 |                  | Flip-X                                             |
|   18 |                  | Activate Masking                                   |
|   29 |                  | RS422 option [1] 0=HW_Enc, 1=Dropwatcher, 2=Cam_Sync, 3=NoOutput |

^ Hexadezimal Value: 0x0006 1C10  =>  Binary Value: 0b0000 0000 0000 0110 0001 1100 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |                  | Drop Multiplication                                |
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   12 |                  | ImageRotation                                      |
|   17 |                  | Flip-Y                                             |
|   18 |                  | Activate Masking                                   |

^ Hexadezimal Value: 0x0007 1C10  =>  Binary Value: 0b0000 0000 0000 0111 0001 1100 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |                  | Drop Multiplication                                |
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   12 |                  | ImageRotation                                      |
|   16 |                  | Flip-X                                             |
|   17 |                  | Flip-Y                                             |
|   18 |                  | Activate Masking                                   |

Steinemann DMAX WinTaiWoo Settings


In [8]:
register_extract("00051C10", printModeSetup_def) # Dmax @ Steinemann
register_extract("10051C10", printModeSetup_def) # Dmax @ Steinemann + Dropwatcher output
register_extract("10051C20", printModeSetup_def) # Dmax @ Steinemann + Dropwatcher output
register_extract("00041C10", printModeSetup_def) # DEM @ Gallus


^ Hexadezimal Value: 0x0005 1C10  =>  Binary Value: 0b0000 0000 0000 0101 0001 1100 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |                  | Drop Multiplication                                |
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   12 |                  | ImageRotation                                      |
|   16 |                  | Flip-X                                             |
|   18 |                  | Activate Masking                                   |

^ Hexadezimal Value: 0x1005 1C10  =>  Binary Value: 0b0001 0000 0000 0101 0001 1100 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |                  | Drop Multiplication                                |
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   12 |                  | ImageRotation                                      |
|   16 |                  | Flip-X                                             |
|   18 |                  | Activate Masking                                   |
|   28 |                  | RS422 option [0] 0=HW_Enc, 1=Dropwatcher, 2=Cam_Sync, 3=NoOutput |

^ Hexadezimal Value: 0x1005 1C20  =>  Binary Value: 0b0001 0000 0000 0101 0001 1100 0010 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   12 |                  | ImageRotation                                      |
|   16 |                  | Flip-X                                             |
|   18 |                  | Activate Masking                                   |
|   28 |                  | RS422 option [0] 0=HW_Enc, 1=Dropwatcher, 2=Cam_Sync, 3=NoOutput |

^ Hexadezimal Value: 0x0004 1C10  =>  Binary Value: 0b0000 0000 0000 0100 0001 1100 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |                  | Drop Multiplication                                |
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   12 |                  | ImageRotation                                      |
|   18 |                  | Activate Masking                                   |

XPrinter Settings


In [9]:
register_extract("00070C00", printModeSetup_def) # DecoType + Flip X + Flip Y


^ Hexadezimal Value: 0x0007 0C00  =>  Binary Value: 0b0000 0000 0000 0111 0000 1100 0000 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   16 |                  | Flip-X                                             |
|   17 |                  | Flip-Y                                             |
|   18 |                  | Activate Masking                                   |


In [10]:
register_extract("00060C00", printModeSetup_def)


^ Hexadezimal Value: 0x0006 0C00  =>  Binary Value: 0b0000 0000 0000 0110 0000 1100 0000 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   10 |                  | Activate Img Offset                                |
|   11 |                  | Activate Img Shift                                 |
|   17 |                  | Flip-Y                                             |
|   18 |                  | Activate Masking                                   |

CoE 0xA010:06 - Print Mode Register (aka Job Settings)

WpWiki CoE Registers

Link table doc PrintMode-Job


In [11]:
printMode_def =  ([ 8, 'SRC_NOTHING' , '-'],)
printMode_def += ([ 9, 'SRC_PATTERN' , 'Fix pattern'],)
printMode_def += ([10, 'SRC_GIGABIT' , 'Data taken from Ethernet Gigabit interface'],)
printMode_def += ([11, 'SRC_FOE'     , 'Data taken from File over EtherCAT interface'],)
printMode_def += ([13, 'ENDLESS'     , 'wrap mode is enabled in the JetMapping part'],)
printMode_def += ([16, 'INFINITE'    , '-'],)
printMode_def += ([17, 'PREPOSTBLANK', 'Added PrePost Blank on the image'],)
printMode_def += ([18, 'SEGMENTED'   , '-'],)
printMode_def += ([22, 'BPP_0'       , '-'],)
printMode_def += ([23, 'BPP_1'       , '-'],)
printMode_def += ([31, 'TEST'        , '-'],)

register_extract("ffffffff", printMode_def)
register_extract("00820800", printMode_def)
register_extract("00860400", printMode_def)

register_extract("00860800", printMode_def)


^ Hexadezimal Value: 0xffff ffff  =>  Binary Value: 0b1111 1111 1111 1111 1111 1111 1111 1111 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    8 |      SRC_NOTHING | -                                                  |
|    9 |      SRC_PATTERN | Fix pattern                                        |
|   10 |      SRC_GIGABIT | Data taken from Ethernet Gigabit interface         |
|   11 |          SRC_FOE | Data taken from File over EtherCAT interface       |
|   13 |          ENDLESS | wrap mode is enabled in the JetMapping part        |
|   16 |         INFINITE | -                                                  |
|   17 |     PREPOSTBLANK | Added PrePost Blank on the image                   |
|   18 |        SEGMENTED | -                                                  |
|   22 |            BPP_0 | -                                                  |
|   23 |            BPP_1 | -                                                  |
|   31 |             TEST | -                                                  |

^ Hexadezimal Value: 0x0082 0800  =>  Binary Value: 0b0000 0000 1000 0010 0000 1000 0000 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   11 |          SRC_FOE | Data taken from File over EtherCAT interface       |
|   17 |     PREPOSTBLANK | Added PrePost Blank on the image                   |
|   23 |            BPP_1 | -                                                  |

^ Hexadezimal Value: 0x0086 0400  =>  Binary Value: 0b0000 0000 1000 0110 0000 0100 0000 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   10 |      SRC_GIGABIT | Data taken from Ethernet Gigabit interface         |
|   17 |     PREPOSTBLANK | Added PrePost Blank on the image                   |
|   18 |        SEGMENTED | -                                                  |
|   23 |            BPP_1 | -                                                  |

^ Hexadezimal Value: 0x0086 0800  =>  Binary Value: 0b0000 0000 1000 0110 0000 1000 0000 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|   11 |          SRC_FOE | Data taken from File over EtherCAT interface       |
|   17 |     PREPOSTBLANK | Added PrePost Blank on the image                   |
|   18 |        SEGMENTED | -                                                  |
|   23 |            BPP_1 | -                                                  |

CoE 0x8041:02 - Test pattern config

WpWiki CoE Registers


In [12]:
pattern_def =  ([ 0, 'VOID'     , 'clear memory'],)
pattern_def += ([ 1, 'FULL'     , 'fill memory'],)
pattern_def += ([ 2, 'LINEX'    , 'lines in x'],)
pattern_def += ([ 3, 'LINEY'    , 'lines in y'],)
pattern_def += ([ 4, 'CHECK'    , 'check board'],)
pattern_def += ([ 5, 'NOZZLE'   , '?'],)
pattern_def += ([ 6, 'DIAG'     , '?'],)
pattern_def += ([ 7, 'GRAY'     , '?'],)
pattern_def += ([ 8, 'EVEN'     , '?'],)
pattern_def += ([ 9, 'ODD'      , '?'],)
pattern_def += ([ 10,'ROWTEST'  , '?'],)

register_extract("ffffffff", pattern_def)


^ Hexadezimal Value: 0xffff ffff  =>  Binary Value: 0b1111 1111 1111 1111 1111 1111 1111 1111 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    0 |             VOID | clear memory                                       |
|    1 |             FULL | fill memory                                        |
|    2 |            LINEX | lines in x                                         |
|    3 |            LINEY | lines in y                                         |
|    4 |            CHECK | check board                                        |
|    5 |           NOZZLE | ?                                                  |
|    6 |             DIAG | ?                                                  |
|    7 |             GRAY | ?                                                  |
|    8 |             EVEN | ?                                                  |
|    9 |              ODD | ?                                                  |
|   10 |          ROWTEST | ?                                                  |

CoE 0xA011:03 - Job status

WpWiki CoE Registers


In [13]:
job_status =  ([ 0, 'ERROR'                , 'Error exists in job preparing'],)
job_status += ([ 1, 'READY'                , 'Current job is ready for printing'],)
job_status += ([ 4, 'TRANSFER_ACTIVE'      , 'Data is being downloaded at the moment'],)
job_status += ([ 5, 'TRANSFER_25'          , 'Transfer progress, if both flags are active this means the transfer is at 50%'],)
job_status += ([ 6, 'TRANSFER_50'          , 'Transfer progress, transfer is at 50%'],)
job_status += ([ 7, 'TRANSFER_DONE'        , 'Active when job has been transferred completely'],)
job_status += ([ 16, 'TRANSFER_R0'         , 'file requested for channel 0'],)
job_status += ([ 17, 'TRANSFER_R1'         , 'file requested for channel 1'],)
job_status += ([ 18, 'TRANSFER_R2'         , 'file requested for channel 2'],)
job_status += ([ 19, 'TRANSFER_R3'         , 'file requested for channel 3'],)
job_status += ([ 20, 'TRANSFER_READY'      , 'Transfer ready for download'],)
job_status += ([ 28, 'LOCKED'              , 'Current job is locked'],)

register_extract("ffffffff", job_status)
register_extract("10100010", job_status)


^ Hexadezimal Value: 0xffff ffff  =>  Binary Value: 0b1111 1111 1111 1111 1111 1111 1111 1111 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    0 |            ERROR | Error exists in job preparing                      |
|    1 |            READY | Current job is ready for printing                  |
|    4 |  TRANSFER_ACTIVE | Data is being downloaded at the moment             |
|    5 |      TRANSFER_25 | Transfer progress, if both flags are active this means the transfer is at 50% |
|    6 |      TRANSFER_50 | Transfer progress, transfer is at 50%              |
|    7 |    TRANSFER_DONE | Active when job has been transferred completely    |
|   16 |      TRANSFER_R0 | file requested for channel 0                       |
|   17 |      TRANSFER_R1 | file requested for channel 1                       |
|   18 |      TRANSFER_R2 | file requested for channel 2                       |
|   19 |      TRANSFER_R3 | file requested for channel 3                       |
|   20 |   TRANSFER_READY | Transfer ready for download                        |
|   28 |           LOCKED | Current job is locked                              |

^ Hexadezimal Value: 0x1010 0010  =>  Binary Value: 0b0001 0000 0001 0000 0000 0000 0001 0000 ^^^
^  Bit ^     Registername ^ Comment                                            ^
|    4 |  TRANSFER_ACTIVE | Data is being downloaded at the moment             |
|   20 |   TRANSFER_READY | Transfer ready for download                        |
|   28 |           LOCKED | Current job is locked                              |