Harnesses
A physical assembly that contains a set of electrical circuits that satisfies a channel map. Can also contain other parts and instructions about how to be built.
How to define a new harness
-
Make a folder for the part number of your harness somewhere on your computer. Run Harnice Build (
harnice -b), which will generate an example harness that you can then edit.Building a product
-
Navigate to your device folder (
cdin command line). You don't need to make a rev folder yet, just make sure your command line is in a folder you want to represent the device you're working on. -
Build it with Harnice (
harnice -borharnice --build). It should walk you through the following steps then produce an example:-
No valid Harnice file structure detected in 'your_part_number'. Create new PN here? [y]:hit enter -
Enter revision number [1]:hit enter for rev1 or type "A" or whatever you want your first rev to be called -
What product type are you working on? (harness, system, device, etc.):type "device" -
Enter a description of this device [DEVICE, FUNCTION, ATTRIBUTES, etc.]:self-explanatory -
Enter a description for this revision [INITIAL RELEASE]:hit enter, otherwise type the goal of the first revision
-
You can also use a lightweight build if you want to bypass some of the checks.
Lightweight build
If you need to build a KiCad block diagram quickly, without specifying channels and signals, you can with --lightweight.
Run
harnice -l deviceorharnice --lightweight devicefrom your device directory.This will follow the same flowchart as
--build, but truncate the validation process.You will not be able to map channels with
--lightweight. -
-
Edit the attributes of your new harness.
Editing the Attributes of a Product
- Navigate to the device folder, find the new rev folder you just made, open
*-attributes.json. - Change the default reference designator here, as well as any other attributes you may want to record.
- In the command line, build again after you
cdinto the rev folder (harnice -b).
- Navigate to the device folder, find the new rev folder you just made, open
-
Edit the formboard graph of your new harness.
Editing the Formboard Graph of a Product
How to edit formboard graph documentation needed
File Structure
Reference the files in your product by calling fileio.path("file key") from your script. They'll automatically use this structure:
fileio.dirpath("part_directory") |-- yourpn/
|-- earlier revs/
fileio.path("revision history") |-- revhistory.csv
fileio.dirpath("rev_directory") L-- your rev/
fileio.path("build instructions") |-- yourpn-revX-build_instructions.py
fileio.path("instances list") |-- yourpn-revX-instances_list.tsv
fileio.path("library history") |-- yourpn-revX-library_import_history.tsv
fileio.path("flattened network") |-- yourpn-revX-flattened_network.csv
fileio.path("available network") |-- yourpn-revX-available_network.json
fileio.path("chosen network") |-- yourpn-revX-chosen_network.json
fileio.path("chosen entity list") L-- yourpn-revX-chosen_entity_list.json