Expand description
The component catalogue as the simulator uses it: a part named by its article number puts its catalogue values into a config, and a search tries every motor (and every axis) on a machine’s cycle.
The tables of catalog/ (schema 1: SI units, see catalog/README.md) are compiled in, so a front end needs no
path to them; use_directory reads them from another copy of the catalogue instead (--catalog DIR).
Structs§
- Candidate
- One combination of parts tried on a machine’s cycle: a motor with its drive, with or without a gearbox, on the config’s axis or one of the catalogue’s.
- Options
- What a search tries beside the motors (
search):gearboxesa series to try with each motor (fitting_gearboxes),axesevery axis of the catalogue (search_axes),motorone motor of a machine with several (search_motor),driveswhich drives with each motor (Drives), anddutiesthe duty mix: each duty’s config and weight (how many of its cycles to one of weight 1), the first the config searched on; empty for that config alone. With a mix each candidate runs every duty and is judged bysearch::mix_verdicts. - Parts
- The parts a config names in
[parts], “” for none: motor and its supply, gearbox, drive, belt and axis. - Price
List - The user’s prices by part number (
--prices): a CSVpart_number,pricewith the header,#notes and blank lines passed over as the catalogue’s tables are. The currency is the user’s; the file carries none. No shipped table has a price (docs/catalogue.md).
Enums§
- Drives
- Which drives the search tries with each motor: the one the catalogue pairs with it (
paired_drive), that one and the next size down and up (drive_neighbours), or every drive of the supply (drives_for).
Constants§
- CASCADE_
MARGIN - The least position-cascade margin (
cascade_margins) a retune leaves a motor [rule chosen from a sweep]: a quarter above the edge of stability, or the config’s own margin where that is smaller. Swept on 17 November 2026 on the cases ofbounded_gain’s comment (Kv alone lowered; Tn alone or both together settled worse at every floor): 1.0 left the EXCT-30 with the 1FK2104-5AF warm-start drifts of 0.3 to 2.1 K (not periodic) under Kp x0.9 and x1.1, frame compliance or tool flex off; 1.5 took the ELZ-125 with its own motor, which passes at 1.07, to 0.175 mm settling (limit 0.1 mm); 1.25 keeps it passing (0.077 mm) and the 1FK2104-5AF calm in every variation. - DRIVE_
CONDITION_ KEYS - The keys of a drive’s installation conditions in
[ratings]: the ambient temperature of the drive itself (the cabinet’s air inlet, not the motor’s), the installation altitude and the pulse frequency. A config that lacks one has the drive at its rated condition (40 degC, 1000 m, the rated pulse frequency). - GUIDE_
CARRIAGES - The carriages a guide set has when the config does not say (
guide_carriages): two rails with two carriages each, the layout every shipped screw, rack and linear motor config states. - GUIDE_
STATIC_ SAFETY - The static safety factor a guide set’s highest load is held to, C0 / P: HIWIN’s catalogue asks 1.0 to 3.5 for normal loading and 2.0 to 5.0 with vibration or impact [estimate: the middle of normal loading].
- PART_
KEYS - The keys of
[parts], in the order ofParts. - PER_
MOTOR_ TABLES - The tables a config may give one motor its own values in, as
[<table>.<motor id>](a machine file’s motors that differ: a smaller Z motor, another gearbox; an arm’s smaller strain wave gear and lighter joint friction in its wrist). Seemotor_config. - S210_
BASE_ LOAD_ SHARE - The base load current of an S210 converter per its rated current [estimate]: the lowest share of the S120 Motor
Modules of up to 30 A, the range of the S210, in
motor_modules_s120.csv(15.3 A of 18 A; 0.85 to 0.87 there). - SCHEMA_
VERSION - The catalogue’s schema version this simulator reads. A catalogue of another version is refused.
- SUPPLIES
- The supplies a motor can be named for: the S210 data at 230 V or 400 V, or the motor on a SINAMICS S120
(400 V line). “s120” takes the 1FK7 and 1FT7 of
motors_s120.csvand the 1FK2 and 1FT2 of their S120 manuals. “s210new-230v” and “s210new-400v” are the same 1FK2 and 1FT2 data with the “SINAMICS S210 (New)” converters (6SL5310) the D 32 pairs them with. The others are another maker’s motors and drives at a line voltage, “- v” ( vendor_of): the rows of<vendor>/motors_*.csvand<vendor>/drives_*.csvwith thatvendorandline_voltage_v.every_supply_has_motors_and_every_vendor_table_a_supplykeeps this list and the tables together.
Functions§
- apply_
axis - Puts an axis of the catalogue into a config (
axis_names): pulley radius, the belt (asapply_beltfor the Megadyne belt of its profile and width; EA from the maker’s own stretch where it states one, Festo), the teeth in mesh (half the pulley’s), the torque the pulley allows (Festo’s maximum torque; Bahr’s peak feed force times the radius) where the config rates it, and the moved masses. The config’s strokes stay, except that an EXCT gets the shortest Z stroke Festo offers that holds the config’s. A stroke the axis does not have is refused, and so is an axis for another kind of machine (an X/Z gantry axis on a config without a Z stroke). - apply_
belt - Puts a belt into a config by profile and width in mm, e.g. “AT5-25”: an open-ended Megadyne MEGALINEAR belt
with standard steel cords (
belts.csv), profiles T5, AT3, AT5, AT10, MTD3, MTD5, MTD8 (MTD: HTD-compatible). Sets the belt’s EA (allowable pull over the stretch at it), mass per metre and tooth pitch, and, where the config has them, the allowable belt tension (the allowable pull, a quarter of the breaking strength), the width and the tooth load table ofratings. A width between the standard ones is interpolated (belt_values). - apply_
drive - Puts a drive into a config: an S210 converter of
converters_s210.csvor an S120 Motor Module ofmotor_modules_s120.csv, by article number. It sets the drive’s rated and maximum output current asratings.drive_rated_current_aanddrive_max_current_a, where the config has them;verdictsjudges the cycle’s RMS and peak motor current against them (checksdrive-current,drive-peak-current). The currents of a Double Motor Module are per axis. With effects.drive_current_limit the maximum current also limits the simulated current (DriveParams::torque_range): a cycle that asks more of the drive lags behind and fails the check. - apply_
gearbox - Puts a gearbox of the catalogue into a config. The name is size, motor frame (for the gearboxes fitted through an
adapter plate the clamping hub’s bore in mm) and ratio, e.g. “NRK070-04-5” or “SP+100MF-19-20”, with “-r” after it
for the maker’s reduced backlash (“SP100-05-20-r”). Sets ratio, efficiency, torsional stiffness, backlash and the
gearbox’s own inertia, and sets the torque ratings where the config has them. Where the row has them and the config
the keys: the torque the efficiency holds at (the rated torque: makers give the efficiency at full load), the
no-load running torque and its speed, and the stiffness curve (a strain wave gear’s K1 to K3 with its knees T1 and
T2 and its hysteresis; a gearbox without one is linear, both knees at its rated torque and K2 = K3 = its stiffness,
as
docs/config-reference.mdsays for a planetary gearbox). - apply_
motor - Puts a motor of the catalogue into a config, for a supply of
SUPPLIES(“230v”, “400v”, “s120”, …): rotor inertia, torque constant and saturation, rated current, thermal time constant, and the drive’s torque and speed limits. The peak torque stays within what the machine’s pulley allows, where the config rates that. - apply_
prices - Sets each candidate’s price (
Candidate::price): the sum over its parts of the count times the list’s price, only where every part has one. Returns the part numbers the list lacks, each once, in order of first need. - axes_
for - The axes of the catalogue a config’s machine can be built from, each with why it is refused (“” where it is not)
by its catalogue numbers alone: the belt axes of its kind (
axis_names,axis_refusal) and the mechanical axes (mech_axes: ball screws, and guide sets where the config rates guides). The question the search asks before it tries motors on them. - axis_
names - The axes of the catalogue by name: the Festo EXCT sizes (“EXCT-30”), the Bahr axes and X/Z gantries
(“ELZI-40”, “ELZ-60S”: series and size) and the other makers’ single belt axes (
<maker>/belt_axes_*.csv: Festo “EGC-TB-KF-70”, “ELGA-TB-G-80”, Rexroth “CKR-110”). The Bahr XY gantries (no machine of that kind) and the DLZPVI (a gear unit built in, whose ratio is not extracted) are left out. - belt_
names - The standard belts of the catalogue as
apply_belttakes them: profile and width in mm, “AT5-25”, one per row ofmegadyne/belts.csv(the Gates table is not read by name). Other widths are taken too, interpolated. - candidate_
config - The config a candidate of a search on
cfgran with (its axis, motor, gearbox and drive put in, the velocity gain retuned): for judging it further, in the error bands (search::robust_ranking) or on its own. - condition_
without_ drive - The first installation condition (
DRIVE_CONDITION_KEYS) a config gives though it names no catalogue drive in[parts]or a motor’s[parts.<id>]: its drive is hand-entered, the condition would derate nothing and the drive would be judged at its rated condition. Read from the config as written:resolveempties the names. - drive_
derating - The share of its rated output current a catalogue drive gives at the installation conditions of the config
(
DRIVE_CONDITION_KEYS); 1 for a config that gives none, and for an article that is neither an S210 converter nor an S120 Motor Module. A drive of another maker with a condition given is refused (error-drive-derating-none): its rows state no derating, and silently ignoring the condition would judge it at rated conditions. - drive_
neighbours - The paired drive (
paired_drive) and the next size down and up by rated output current among the supply’s drives (drives_for): the largest with a lower rated current and the smallest with a higher one (of two alike, the higher maximum current). Smallest first; the paired one alone where it is not in the list, none where there is none. - drives_
for - The drives of a supply (
SUPPLIES) with their rated and maximum output current, smallest rated current first (of two alike, the higher maximum current first): the S210 converters for “230v” (1 AC and 3 AC) and “400v” (3 AC), the new 6SL5310 ones for “s210new-…”, the Single and Double Motor Modules for “s120” (a Double, “6SL3120-2…”, with its per axis currents), another maker’s drives at the line voltage. A maker that prints no maximum current (Mitsubishi) has NaN there. - estimated_
data - What a motor and drive of the catalogue leave to the config’s estimates, by name: “motor-winding” (no phase
resistance and inductance: Siemens prints them for the 1FK7 and 1FT7 only), “motor-thermal-time” (no thermal time
constant), “motor-pole-pairs” (none printed), “drive-max-current” (the maker prints no peak current, the motor’s
stands for it), “drive-base-load” (no base load current:
S210_BASE_LOAD_SHAREof the rated one), and for another maker’s motor “motor-standstill” or “motor-rated” where it prints no standstill or no rated values (the other ones stand for them, seemotor_data). Empty: everything from the catalogue. - estimated_
derating estimated_data’s “drive-derating”: the drive’s rated and base load current are derated by installation conditions that are not the rated ones. Siemens states the factors per condition, not how they combine (they are multiplied), and not whether the maximum current is derated too (it is not).- estimated_
gearbox_ data - What a gearbox of the catalogue leaves to estimates, by name (see
estimated_data): “gearbox-efficiency” (a strain wave gear:STRAIN_WAVE_EFFICIENCY) and “gearbox-mass” (no mass printed; the search ranks by the motor’s alone). - fitting_
gearboxes gearboxes_for_motorwith a ratio between half and twiceratio.- gearbox_
mass - Mass of a gearbox by name (
apply_gearbox): a Siemens one’s from the 01/2023 configuration manual (gearbox_mass.csv), another maker’s from its own row;Nonefor a name the catalogue does not have or a gearbox whose mass it has not. - gearboxes_
for_ motor - The catalogue gearboxes that fit a motor, at every ratio, named as
apply_gearboxtakes them: the question the search asks before it sweeps ratios.seriespicks makers and series: “” all of them, a maker (“wittenstein”, “neugart”, “siemens”), a maker’s table (“wittenstein-sp”, “neugart-ple”, “siemens-nrk”, “harmonicdrive-csf”), or a prefix of the size (“NRK”, “NRK070”). Siemens’ NRB, NRK and NLC fit the 1FK2 and 1FT2 of their frame (1FK2104 and 1FK2204 have frame “04”), its SP+ the 1FT2 only, as Siemens sells them; another maker’s gearbox fits a motor whose shaft its clamping hub takes (motor_shaft_diameter; one hub per size and ratio, the smallest that does). - guide_
carriages - The carriages of a config’s guide set:
ratings.guide_carriages, elseGUIDE_CARRIAGES. A value that is not a whole number of at least 1 is refused. - inertia_
ratios - The inertia ratio of each motor, load over motor, at the middle of the travel: the inertia the motor turns
besides its rotor (the load, and the gearbox’s own inertia with it) over the rotor’s inertia, where the rotor’s is
that of the motor’s own config (
motor_config). Per axis the inertia the motor turns is the torque the rigid machine needs per unit of that axis’s acceleration (torque_per_acceleration) over the motor’s acceleration it takes (fromMachine::inverse, standing: no speed, so no term of the speed squared); of the axes that move the motor the largest. NaN for a motor no axis moves. Assumes the machine’s feedforward has the rotors in, as every machine’s has. - is_
linear_ motor - Whether a config is a linear motor machine: it has
[linear_motor](a linear motor axis). - linear_
motor_ articles_ for - The part numbers of the linear motors a supply runs (
linear_rows) that have a coil mass, force constant, forces and currents: what a linear motor machine’s search tries in place of rotary motors. - magnet_
track_ weight - The weight of a linear motor’s magnet track at a config’s stroke, kg: the stroke and the coil’s length of track.
- mech_
axes - The mechanical axes of the catalogue a config’s machine can be built from, as (name for
parts.axis, why it is refused, “” where it is not; installed weight in kg): for a machine with ball screws every catalogue screw (screw_refusal), and where the config rates guides (a screw, rack or linear motor machine withratings.guide_*) with each guide set (guide_carriagescarriages; per series and carriage type theGUIDE_SIZES_TRIEDsmallest that passguide_refusal). A screw refused is listed once on its own. Empty for a machine of another kind. A linear motor machine’s motors are the linear motors (linear_motor_articles_for). - motor_
articles - Article numbers of the SINAMICS S210 motors, e.g. “1FK2205-4AF”.
- motor_
articles_ for - Article numbers of the motors that can be named for a supply (
SUPPLIES): the S210 motors for “230v” and “400v” (not every one is offered at both), and for “s120” the 1FK7 and 1FT7 that have a data sheet and the 1FK2 and 1FT2 of the S120 manuals that have a rotor inertia. - motor_
config - The config one motor sees: each table of
PER_MOTOR_TABLESwith that motor’s[<table>.<id>]over it, and the motor, gearbox and drive its[parts.<id>]names applied from the catalogue over that. A key there has to be one the shared table has (motor.<id>.rotor_inertia_kgm2overridesmotor.rotor_inertia_kgm2). Without such tables the config as it is. The drives, the machine files’ drive trains and the per-motor verdicts read their motor’s. shortcut: the drives’ cycle times, the noise seed and a shared DC link stay those of the shared[drive]. (The velocity gain of a motor with parts of its own is retuned byretuned_per_motor.) - motor_
mass - Weight of a motor without brake, for the supply its data is taken for (
SUPPLIES). - motor_
mass_ for - Weight of a motor with the brake option a config chooses (
parts.motor_brake, seeapply_motor);Nonefor a motor the catalogue does not have, or has no brake data of where the brake is chosen. - motor_
max_ speed - The motor’s highest speed in rad/s from the catalogue (the lower of the mechanical limit and what the converter
allows, where both are given);
Nonewhere the catalogue has none. - motor_
shaft_ diameter - The shaft diameter of a motor in m: the row of the
<maker>/motor_shafts.csvtables with the longestpart_number_prefixthe article starts with;Nonewhere no table has it. - paired_
drive - The drive the catalogue pairs with a motor at a supply: for the S210 the converter the D 32 lists beside the
motor (at 230 V the single-phase one where there is one); for a 1FK7 or 1FT7 on S120 the Single Motor Module
D 21.4 names. The 1FK2 and 1FT2 on S120 have no pairing in their manuals: theirs is the smallest Single Motor
Module whose rated current carries the motor’s stall current, the rule D 21.4 pairs the 1FK7 and 1FT7 by
(
siemens_s120_motors_are_plausible_and_their_motor_modules_existchecks it); of two such, the one with the higher maximum current. For “s210new-…” the 6SL5310 converter the D 32 lists beside the motor. - rank
- The order of a search: passing first, by cost, then mass, then motor and gearbox (so that equal weights come out the same every run); the rest by how far beyond their tightest check they are.
- resolve
- The config with the catalogue values of the parts it names:
[parts]withmotor = "<article>",motor_supply(SUPPLIES),gearbox = "<size-frame-ratio>",drive = "<article>",belt = "<profile-width>"andaxis = "<name>", “” for none. A named part overwrites the numbers the config has for it, and the velocity gain is retuned for it (seewith_parts).Simdoes this with every config it is given, so every front end gets it; the functions that read a config beside aSimdo it too. - search
search_supplieswith every option ofOptions: the drives beside the paired one, and a duty mix. With a mix,cfgis the first duty’s config (Options::duties).- search_
axes - The motor search on every axis of the catalogue that is of the config’s kind (
axis_names: the EXCT sizes and Bahr’s X/Z gantries for a config with a Z stroke, Bahr’s single axes for one with one stroke), keeping the config’s cycle and payload. An axis that cannot carry the machine by its catalogue numbers (axis_refusal: stroke, payload, speed) is listed once, witharticle“” and the reason inrefused, and no motor is tried on it. The rest are ranked together, cheapest first: the axis’s weight counts intocost. A screw, rack or linear motor machine is tried on the mechanical axes as well (mech_axes: every ball screw, with the guide sets where the config rates guides), a linear motor machine with the linear motors of the supply in place of rotary motors. - search_
motor search_motorsfor one motor of a machine with several (a machine file’smachine.motorof idmotor): each candidate becomes that motor’s own parts,[parts.<motor>](with_motor_part), and the other motors stay as the config has them. Withgearboxesthe motor’s own gearbox ratio picks the fitting ones. The cost is that one motor’s and gearbox’s weight; the axis is the config’s.- search_
motors - Tries every catalogue motor that
wantedaccepts and that is offered at the supply (SUPPLIES; “s120” the S120 motors) on the cycle of the config, each with the drive the catalogue pairs with it (paired_drive) and retuned aswith_partssays, on all processors, and returns them ranked (rank): the passing ones first, cheapest first, then the others, nearest to passing first. No catalogue file has a price; the weight of motor and gearbox stands in for it (Candidate::cost). - search_
supplies - The search at several supplies (
SUPPLIES;vendor_oftells a supply’s maker), ranked together (rank): withmotora machine’s one motor of that id (search_motor), else withaxesevery axis (search_axes), else the config’s (search_motors). Each candidate says its supply, and with it its maker (vendor_of). An axis refused before any motor was tried is listed once. - use_
directory - Reads the catalogue from a directory in place of the compiled-in one, for the rest of the process: a copy of
catalog/(its own repository, or a newer edition of it). Every table the simulator reads must be there, andcatalog.tomlmust have theschema_versionthis simulator reads. Call it before any part is looked up; a second call is refused. - vendor_
of - The maker of a supply’s motors and drives (
SUPPLIES): “siemens” for the Siemens ones, else the part before “-”. - with_
motor_ part - The config with the catalogue motor
articleatsupply, its drivedriveand the gearboxgearbox(“” each: the motor’s own) as motormotor’s own parts,[parts.<motor>](motor_configputs them in), and that motor’s velocity gaindrive.<motor>.velocity_kp_nm_s_radretuned for them aswith_namedretunes the shared one: by the square root of the ratio of the inertia that motor turns (inertia_seen, its column alone) times that of its rotor’s, and itskv_1_slowered where its position cascade needs it (cascade). - with_
named - The config with the parts of
partsin it, retuned aswith_partssays. - with_
parts - The config with a candidate’s parts in it and the velocity loop retuned for them. Without this a
motor with a much lighter rotor fails by oscillating, not by being too small.
gearbox“” keeps the config’s own; the drive, belt and axis the config names are put in as well. - with_
value - A config with one value changed that moves what the motors turn (
gearbox.ratio,geometry.pulley_radius_m), the velocity gain retuned for it aswith_partsretunes it for a part.cfghas its parts in (resolve).