Building a functional gas consumable calculator requires many moving parts. In this guide, each part will be broken down into subsections, with the key direction in bold.
Lookup Table
To build a gas consumable calculator, the first step is to gather your consumable rates. For the most accurate times, each material type and thickness should have a consumable rate. Gather data from your fab shop, or the laser manufacturer can provide their rates. Once rates are gathered, assemble the rates in a csv for each type of gas as follows. At minimum, you need a thickness column and a column for the consumable rates. In the example below, rates vary by material, so they are split accordingly. Additionally, the customer purchases nitrogen by the cubic meter, so the unit is set to cubic meter per hour. Before proceeding, make sure that a table exists for each gas, and that the tables have a thickness column and at least one consumable column.
Material Thickness | Thickness Units | SS_rate Nitrogen |
MS_rate Nitrogen |
AL_rate Nitrogen |
Consumable Units |
Thickness #1 | Inch | Meter3/hour | |||
Thickness #2 | Inch | Meter3/hour | |||
… | Inch | Meter3/hour | |||
Thickness # | Inch | Meter3/hour |
Gas Separated Equipment
To account for multiple gases, a copy of the laser equipment needs to be made for each gas (i.e., Laser 1-Nitrogen, Laser 1-Oxygen). Each laser will be linked to a different gas specific calculator. Before moving on, ensure that each gas consumable laser has been split into separate, gas-specific equipment.
Gas Cost
For each gas-consumable, create a new cost. The cost type is "perUnit." Treat one unit as the unit for purchase. In this example, the user purchases nitrogen by cubic foot, so it is noted in the cost name. If the nitrogen was purchased by the cubic foot, the cost would be built the same. The only thing that would change is the market cost and the note in the name. If market cost changes, all you need to do is return to this cost and edit the cost and price values. Before proceeding, make sure that you have a cost created for each gas type, and that they are perUnit cost types.
Gas Specific Calculator
In our example, our single Laser 1 is broken into two pieces of equipment in SecturaFab. These two pieces of equipment should share any calculators unrelated to gas consumption. So, there should just be one shared setup calc, runtime calc, and sheet time calc. To factor in gas consumption, create a new calculator for each gas type and build as shown above. The relevant field are as follows:
- Calculator Type: Per Unit Time
- Base Units: Second
- Conversion: 1, Default Value: 0
- Cost Category: This will be the cost created in the previous step.
- Equipment: The relevant Laser equipment
- Expression: *See next step*
- Lookup: Upload the lookup table created earlier and select it from the drop down
Before continuing, ensure that both versions of the laser are linked to the setup, runtime, and other general calculators. Additionally, make sure that there are gas consumption calculators linked only to the relevant laser.
Lookup Expression
IfThen(Item.MaterialGroup = "SS", (Floor(GetResult("Laser - Run time"))*Lookup("NitrogenLookUp",Item.Thickness, 2))/3600, IfThen(Item.MaterialGroup = "MS", (Floor(GetResult( "Laser - Run time" ))*Lookup("NitrogenLookUp",Item.Thickness, 3))/3600, IfThen(Item.MaterialGroup = "AL", (Floor(GetResult("Laser - Run time"))*Lookup("NitrogenLookUp",Item.Thickness, 4))/3600, 13)))
The full expression can be read as three nested IfThen statements, which look to the line item’s material type. The calculator uses the material type and the thickness to select which consumable rate to use. The expression is long and hard to read, so copy and paste it into the calculator expression field, but replace certain values as follows:
"Laser - Run time" : Replace this with the name of your run time calculator. Don’t forget the quotes.
"NitrogenLookUp" : Replace this with the name of your consumable look up table. Don’t forget the quotes.
# : Replace this value with the index number of your different consumable rate columns. In this example the first number is the stainless steel index, the second number is the mild steel index, and the third number is the aluminum index. When counting indices, remember that SecturaFab considers the first column as index 0, the second column as index 1, and so forth.
Finally, each IfThen statement has a factor of /3600. This is because the calculator is in units of seconds, but the consumable rates are per hour.
If your consumable table only has one consumable rate per thickness, use the default expression below:
Floor(GetResult("Laser - Run time"))*Lookup("NitrogenLookUp",Item.Thickness, 2))/3600
To Quote
Before adding a flat part, if you have multiple gases, you must know which gas you want to use. Typically, this corresponds to thickness. Pick the appropriate laser with that in mind.