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 Render, which will generate an example harness that you can then edit.
Rendering 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. -
Harnice render it (
harnice -r). It should walk you through the following steps then render 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 lightweight render if you want to bypass some of the checks.
Lightweight Rendering a Product
If you need to build a KiCad block diagram quickly, without specifying channels and signals, you can with --lightweight.
Run harnice -l device or harnice --lightweight device from your device directory.
This will follow the same flowchart as --render, 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, render it again after you
cdinto the rev folder.
- 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("feature tree") |-- yourpn-revX-feature_tree.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.tsv
fileio.path("available network") |-- yourpn-revX-available_network.json
fileio.path("chosen network") L-- yourpn-revX-chosen_network.json