Embroidery format U

Machine embroidery

Module: Embroidery format
⚐ to finalize | ☸ avanced
⚒ 2018/07/24 |
See also

* Embroidery format DST‎
* Embroidery format EXP‎‎
* Embroidery format JEF‎‎
* Embroidery format PEC‎‎
* Embroidery format PES‎
* Embroidery format VP3

See also

* Embroidery format DST‎
* Embroidery format EXP‎‎
* Embroidery format JEF‎‎
* Embroidery format PEC‎‎
* Embroidery format PES‎
* Embroidery format VP3

* Quality: to finalize

* Difficulty: avanced

U?? is called FDR internally in some documentations. Barudan stitch information. Usually these are .u01 files, sometimes .u00 the scheme is apparently permitted to go up to .u99.

* .U01 contains command, stitch triplet data.
* .U01 contains commands for SLOW, FAST (in both stitched and unstitched forms)

## Contents

* 1 Header
* 1.1 Part A
* 1.2 Part B
* 2 Body
* 2.1 Teach Block
* 2.2 Unknown Functions

# 1 Header[edit | edit source]

The header comes in two parts.

## 1.1 Part A[edit | edit source]

Type | Bytes | Value | Description

|
|
|

`char` | 128 | "0" | 0x30 the ascii character 0, 128 times.

* 128 copies of 0x30 "0" characters for an unknown reason.

## 1.2 Part B[edit | edit source]

* Some basic extends information.
* Stitch Count
* Some unknown data for machine edited.
* Some flag and information pointing to teach commands

Type | Bytes | Value | Description

|
|
|

`s16` | 2 | -X | Left
`s16` | 2 | -Y | \- Bottom (in y-flipped)
`s16` | 2 | +X | Right
`s16` | 2 | +Y | \- Top (in y-flipped)
`u32` | 2 | 0 | Unknown only seen (0)
`u32` | 2 | count_commands | Stitch Data Count, (if multiplied by 3 will give the length of body)
`u16` | 2 | x_final | Final X position
`u16` | 2 | y_final | Final Y position (-Y if we're y-flipped)

Many software packages will write nothing else, just pad with zeros. However machine edited formatting will have some additional data.

Type | Bytes | Value | Description

|
|
|

`s16` | 2 | D0 07 | 2000 in little endian 16.
`s16` | 2 | 00 00 | 0
`u16` | 2 | unknown (01 00) | 1 ?
`u16` | 2 | (2B 00) | (01 00 ) | 44, 43, 1? (Several values seen)
`u16` | 2 | (23 00) | (0B 00) | 16, 35, 11 ? (Several values seen)
`u16` | 2 | unknown (0F 00) | 15 ?
`u16` | 2 | unknown 00 00 | Only seen 00 00

The 3rd row is more consistent.

Type | Bytes | Value | Description

|
|
|

`s16` | 2 | 01 FE | Dunno
`s16` | 2 | 02 FD | Dunno
`u16` | 2 | 04 00 | Dunno
`u16` | 2 | Mod_Count | little endian declaration of the number of modification commands.
`u16` | 2 | position_of_teach_block | Gives the position in the file of the commands in the mod_count

Note that in the Teach Block, the same 6 bytes are always repeated a little into the block. And the mod count. The position given by the position_of_teach_block is exactly to the commands within the teach block.

The remainder of the 128 byte section is padded with 0x00 data.

# 2 Body[edit | edit source]

The body starts at position 0x100 (256)

The body consists of encoded stitches. The stitches are in:

Control, X, Y form.

FDR (.u01) Encoding  BYTE | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0

|
|
|
|
|
|
|
|

1 | 1 | -y | -x | c | c | c | c | c
2 | y | y | y | y | y | y | y | y
3 | x | x | x | x | x | x | x | x

The control byte contains an always set value, followed by 2 bits of directional information for the Y, X values (whether they are + or -), then five bytes of control.

Value | Command | Operation

|
|

0 | Stitch | Normal Stitch
1 | Jump | Jump Stitch
2 | Fast | Fast invoke, Normal Stitch
3 | Fast, Jump | Fast invoke, Jump Stitch
4 | Slow | Slow invoke, Normal Stitch
5 | Slow, Jump | Slow invoke, Jump Stitch
6 | T1 | Top Thread Trim (this is not typically used)
7 | T2 Trim | This is what most all encodings use for trim.
8 | C00 STOP | Stop the machine.
9 | C01 Needle 1 | Use needle 1, color change if necessary
10 | C02 Needle 2 | Use needle 2, color change if necessary
11 | C03 Needle 3 | Use needle 3, color change if necessary
12 | C04 Needle 4 | Use needle 4, color change if necessary
13 | C05 Needle 5 | Use needle 5, color change if necessary
14 | C06 Needle 6 | Use needle 6, color change if necessary
15 | C07 Needle 7 | Use needle 7, color change if necessary
16 | C07 Needle 8 | Use needle 8, color change if necessary * Not typically used, some machines don't have this.
17 | C07 Needle 9 | Use needle 9, color change if necessary * Not typically used, some machines don't have this.
18 | End | This is often the terminal command.
19 | Gp1 | Group 1
20 | Gp2 | Group 2
21 | Gp3 | Group 3
22 | Gp4 | Group 4
23 | Afrm | May be Roll-to-Roll Stop. It stops but with the needle penetrated, which was useful for some BEVT machines that used that functionality.
31 | Rewind, Stop | Unsure what this properly does. But it is known to exist

## 2.1 Teach Block[edit | edit source]

This section is rare and usually results from editing a file on an embroidery machine. This is always seen when the optional header info isn't zeroed out.

The embroidery machines these files are for have a mode called Teach. Where it allows the machine to reprogram the various specific commands given in the file. Apparently reprogramming the stops. If non-stops are reprogrammed they become stops. These commands clearly include Sequin. It's unclear how this is precisely encoded.

Embroidery Machine dumps of the edited files contain post-file information which apparently through some means edits the data within the body. This is usually called after the stop. It buffers 32 0x2B "+" bytes then has some string of bytes that identically to some in the header that previously was entirely zeros. 0xA0 - 0xA7.

Type | Bytes | Value | Description

|
|
|

`char` | 32 | "+" | 0x2B the ascii character +, 32 times.
`s16` | 2 | 01 00 | Number 1 for some reason?
`s16` | 2 | 01 FE | Dunno (same as in header)
`s16` | 2 | 02 FD | Dunno (same as in header)
`u16` | 2 | 04 00 | Dunno (same as in header)
`u16` | 2 | Mod_Count | little endian declaration of the number of modification commands.
`u32` | 4 * Mod_Count | 02 00 00 00 | 04 00 00 00 | usually 1, 2, 4 (these are the same numbers as in the dunno and header), might be a clue.

## 2.2 Unknown Functions[edit | edit source]

There is some suggestion that the Group commands may be used to encode a lot of additional data setting a great many things on the embroidery machine. However it is not yet known how these are accessed, or if that belief is even warranted. The manuals suggest the following functions exist as functions and thus should be able to be encoded somehow. They can be put into the data but I dunno if that is in .u01 or some other format. There's a clear correlation with regard to known to exist commands. However since we only have 5 bits and 31 is the last possible command, there's nothing really to do here.

It has been confirmed that group commands do not use the subsequent command bytes to encode additional data. They may however use their own Y values in some regard.

The manual has an ambiguous footnote: *1 After G１：Group 1 ~ C15 are the Color Change Function Codes.

Function Codes | No. Code | Function

|
|

0 | 0 | Normal Stitch
1 | JP | Jump Stitch
2 | L | Low Speed
3 | LJ | Low Speed Jump
4 | H | High Speed
5 | HJ | High Speed Jump
6 | T1 | Top Thread Trimming
7 | T2 | Bobbin Threading
19 | G1 | Group 1 *footnote
20 | G2 | Group 2
23 | SE | Sub End
32 | C00 | Stop
33 | C01 | Needle Bar 1
34 | C02 | Needle Bar 2
35 | C03 | Needle Bar 3
36 | C04 | Needle Bar 4
37 | C05 | Needle Bar 5
38 | C06 | Needle Bar 6
39 | C07 | Needle Bar 7
40 | C08 | Needle Bar 8
41 | C09 | Needle Bar 9
42 | C10 | Needle Bar 10
43 | C11 | Needle Bar 11
44 | C12 | Needle Bar 12
45 | C13 | Needle Bar 13
46 | C14 | Needle Bar 14
47 | C15 | Needle Bar 15
64 | S0 | Sequin OFF
65 | S1 | Sequin ON
67 | SJ | Sequin Jump
68 | CC | Chain Stitch
69 | CL | Loop Stitch
70 | PR | Presser foot height
71 | SPL | Normal Embroidery
72 | ST1 | Taping & Cording Embroidery (R)
73 | ST2 | Taping & Cording Embroidery (L)
74 | SZ1 | Zigzag Embroidery (L)
75 | SZ2 | Zigzag Embroidery (R)
76 | SC1 | Coiling Embroidery (L)
77 | SC2 | Coiling Embroidery (R)
78 | LN | Nipple Movement
79 | LZ | Zigzag Movement
80 | HSP | Head Selection Pattern
81 | FMP | The point of flame moving

It's not clear what after means with regard to G1, these commands exist in the .u01 data and apparently the manual suggests there's an extended list.