<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://stationeers-wiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=64.178.254.175</id>
	<title>Stationeers Community Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://stationeers-wiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=64.178.254.175"/>
	<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/Special:Contributions/64.178.254.175"/>
	<updated>2026-04-04T22:11:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=Logic_Sorter&amp;diff=23966</id>
		<title>Logic Sorter</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=Logic_Sorter&amp;diff=23966"/>
		<updated>2025-11-09T07:54:24Z</updated>

		<summary type="html">&lt;p&gt;64.178.254.175: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Machines]]&lt;br /&gt;
[[Category:Import/Export]]&lt;br /&gt;
{{Structurebox&lt;br /&gt;
| name = Logic Sorter&lt;br /&gt;
| image = [[File:StructureLogicSorter.png]]&lt;br /&gt;
| prefab_hash = 873418029&lt;br /&gt;
| prefab_name = StructureLogicSorter&lt;br /&gt;
| power_usage = 5W&lt;br /&gt;
| placed_on_grid = Small Grid&lt;br /&gt;
| decon_with_tool1 = [[Hand Drill]]&lt;br /&gt;
| placed_with_item = [[Kit (Sorter)]]&lt;br /&gt;
| item_rec1 = [[Kit (Sorter)]]&lt;br /&gt;
}}&lt;br /&gt;
{{Distinguish|Sorter}}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;q&amp;gt;Contains an Internal Memory which is assessed to check whether something should be sorted. When an item is in the Import slot Slot, the stack is checked and if result is true the thing is moved to the Export2 slot slot, otherwise it is moved to the Export slot slot. The Mode is used in how the stack is assessed, by default the mode is ALL, so every instruction in the stack would need to return true.&amp;lt;/q&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;- Stationpedia&#039;&#039;&#039;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Logic sorter is similar in almost every way to the previous sorter but has a internal memory that can be configured with logic and bit shifting to sort items passing through. When an item enters the import slot, it is checked against the filters in memory.  If the Mode is 0(All) then every filter must return true for the item to be sent to the export 2 slot.  If the mode is 1(Any) then as long as one of the filters returns true, the item matches and will be sent to the export 2 slot.&lt;br /&gt;
&lt;br /&gt;
==Filter Instructions==&lt;br /&gt;
Check the in game Stationpedia [F1 on your keyboard] for formatting and instruction sizes to determine how to populate the memory.  Be warned that the stationpedia fails to document the endianness (bit 0 is the least significant bit).  While the stationpedia does document that the Logic Sorter has 256 bytes of memory, it is addressed as 32 x 8-byte (64-bit) numbers.&lt;br /&gt;
&lt;br /&gt;
If you wish your sorter to send [[Steel Ingot]]s to the second output you should place the value 0xd8f8af8d_01 ( = 931885190401 decimal ) into memory 0.  More complicated programs will have to consider whether they want to use Mode 0 (match All), Mode 1 (match Any), or Mode 2 (match None).&lt;br /&gt;
&lt;br /&gt;
It is more readable to calculate the instructions using [[IC10]] like this:&lt;br /&gt;
&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sorter d0&lt;br /&gt;
define steel HASH(&amp;quot;ItemSteelIngot&amp;quot;)&lt;br /&gt;
s sorter Mode 1 # Any&lt;br /&gt;
clr sorter # erase any stale instructions in RAM&lt;br /&gt;
sll r0 steel 8&lt;br /&gt;
or r0 r0 SorterInstruction.FilterPrefabHashEquals&lt;br /&gt;
put sorter 0 r0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Sorter Instruction !! OP Code !! Description&lt;br /&gt;
|-&lt;br /&gt;
| FilterPrefabHashEquals || 1 || Compares Hash of item in import slot to the set hash and returns true if equal.&lt;br /&gt;
|-&lt;br /&gt;
| FilterPrefabHashNotEquals || 2 || Compares Hash of item in import slot to the set hash and returns true if not equal.&lt;br /&gt;
|-&lt;br /&gt;
| FilterSortingClassCompare || 3 || Compares the sorting class of an object in input slot. Example would be all ores. &lt;br /&gt;
|-&lt;br /&gt;
| FilterSlotTypeCompare || 4 || Compares the item type of an object in the input slot. See slot type table below for item comparisons.&lt;br /&gt;
|-&lt;br /&gt;
| FilterQuantityCompare || 5 || Compares the stack size of the items in the import slot. &lt;br /&gt;
|-&lt;br /&gt;
|LimitNextExecutionByCount || 6 || Ensures the next executable instruction will only return true a specified number of times. Each time it returns true, it decrements by one. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Conditional Operation (CONDOP) !! Value !! Pre-shifted&lt;br /&gt;
|-&lt;br /&gt;
| Equals || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| Greater || 1 || 256&lt;br /&gt;
|-&lt;br /&gt;
| Less || 2 || 512&lt;br /&gt;
|-&lt;br /&gt;
| NotEquals || 3 || 768&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MSB                                                          LSB&lt;br /&gt;
6666555555555544444444443333333333222222222211111111110000000000&lt;br /&gt;
3210987654321098765432109876543210987654321098765432109876543210&lt;br /&gt;
FilterPrefabHashEquals&lt;br /&gt;
########################(                   PREFAB_HASH)(     1)&lt;br /&gt;
FilterPrefabHashNotEquals&lt;br /&gt;
########################(                   PREFAB_HASH)(     2)&lt;br /&gt;
FilterSortingClassCompare&lt;br /&gt;
################################( SORTING_CLASS)(CONDOP)(     3)&lt;br /&gt;
FilterSlotTypeCompare&lt;br /&gt;
################################(     SLOT_TYPE)(CONDOP)(     4)&lt;br /&gt;
FilterQuantityCompare&lt;br /&gt;
################################(      QUANTITY)(CONDOP)(     5)&lt;br /&gt;
LimitNextExecutionByCount&lt;br /&gt;
########################(                         COUNT)(     6)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Data Network Header}}&lt;br /&gt;
&lt;br /&gt;
{{Data Parameters|&lt;br /&gt;
{{Data Parameters/row|Power|Boolean|w=0|Can be read to return if the Logic Sorter is correctly powered or not, set via the power system, return 1 if powered and 0 if not|multiple=2|0|Unpowered|1|Powered}}&lt;br /&gt;
{{Data Parameters/row|Mode|Integer|The mode of the Logic Sorter.|multiple=3|0|All|1|Any|2|None}}&lt;br /&gt;
{{Data Parameters/row|Error|Boolean|w=0|1 if device is in error state, otherwise 0|multiple=2|0|&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;|1|Error}}&lt;br /&gt;
{{Data Parameters/row|Lock|Boolean|Disable manual operation of the Logic Sorter.|multiple=2|0|Unlocked|1|Locked}}&lt;br /&gt;
{{Data Parameters/row|On|Boolean|The current state of the Logic Sorter.|multiple=2|0|Off|1|On}}&lt;br /&gt;
{{Data Parameters/row|RequiredPower|Integer|w=0|Idle operating power quantity, does not necessarily include extra demand power}}&lt;br /&gt;
{{Data Parameters/row|ClearMemory|Integer|r=0|When set to 1, clears the counter memory (e.g. ExportCount). Will set itself back to 0 when actioned}}&lt;br /&gt;
{{Data Parameters/row|ExportCount|Integer|w=0|How many items exported since last ClearMemory}}&lt;br /&gt;
{{Data Parameters/row|ImportCount|Integer|w=0|How many items imported since last ClearMemory}}&lt;br /&gt;
{{Data Parameters/row|PrefabHash|Integer|w=0|The hash of the structure}}&lt;br /&gt;
{{Data Parameters/row|ReferenceId|Integer|w=0|Unique Reference Identifier for this object}}&lt;br /&gt;
{{Data Parameters/row|NameHash|Integer|w=0|Provides the hash value for the name of the object as a 32 bit integer.}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Data Slots ===&lt;br /&gt;
These are all parameters, that can be read with a [[Kit_(Logic_I/O)#Slots_Reader|Slots Reader]]. The outputs are listed in the order a Slots Reader&#039;s &amp;quot;VAR&amp;quot; setting cycles through them.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number || Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Import || Import slot.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Export (reject) || Export slot.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Export (accept) || Export slot.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Data Disk || Diskslot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Data Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| MaxQuantity || Integer || Returns maximum stacksize.&lt;br /&gt;
|-&lt;br /&gt;
| Damage || Integer || Item durability in percent.&lt;br /&gt;
|-&lt;br /&gt;
| Class || Integer || Item class ID for slot type comparison.&lt;br /&gt;
|-&lt;br /&gt;
| SortingClass || Integer || Class group of items. &lt;br /&gt;
|-&lt;br /&gt;
| Quantity || Integer || Size of item stack.&lt;br /&gt;
|-&lt;br /&gt;
| PrefabHash || Integer || Returns [[ItemHash]] of item in slot.&lt;br /&gt;
|-&lt;br /&gt;
| Occupied || Boolean || Returns whether the slot occupied. (0 for no, 1 for yes).&lt;br /&gt;
|-&lt;br /&gt;
| OccupantHash || Integer || Returns [[ItemHash]] of item in slot.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Item Slot Classes / Types ==&lt;br /&gt;
&lt;br /&gt;
Reading the &#039;&#039;class&#039;&#039; attribute of the input slot will give one of the following values:&lt;br /&gt;
&lt;br /&gt;
Note that you can use &amp;lt;pre style=&amp;quot;display: inline&amp;quot;&amp;gt;SlotClass.&amp;lt;Item&amp;gt;&amp;lt;/pre&amp;gt; directly in IC code instead of the numeric value&lt;br /&gt;
*NOTE The classes listed in this section are FilterSlotTypeCompare and NOT sorting class.  eg: SortingClass.Ores vs SlotClass.Ore&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Item values and descriptions&lt;br /&gt;
! Item !! Value !! Description !! Item !! Value !! Description !! Item !! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| None || 0 || || Helmet || 1 || || Suit || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| Back || 3 || || GasFilter || 4 || || GasCanister || 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| Motherboard || 6 || || Circuitboard || 7 || || DataDisk || 8 ||&lt;br /&gt;
|-&lt;br /&gt;
| Organ || 9 || || Ore || 10 || Includes reagent mixes from recycler and ices || Plant || 11 ||&lt;br /&gt;
|-&lt;br /&gt;
| Uniform || 12 || || Entity || 13 || || Battery || 14 ||&lt;br /&gt;
|-&lt;br /&gt;
| Egg || 15 || || Belt || 16 || || Tool || 17 ||&lt;br /&gt;
|-&lt;br /&gt;
| Appliance || 18 || || Ingot || 19 || || Torpedo || 20 ||&lt;br /&gt;
|-&lt;br /&gt;
| Cartridge || 21 || || AccessCard || 22 || || Magazine || 23 ||&lt;br /&gt;
|-&lt;br /&gt;
| Circuit || 24 || || Bottle || 25 || || ProgrammableChip || 26 ||&lt;br /&gt;
|-&lt;br /&gt;
| Glasses || 27 || || CreditCard || 28 || || DirtCanister || 29 ||&lt;br /&gt;
|-&lt;br /&gt;
| SensorProcessingUnit || 30 || || LiquidCanister || 31 || || LiquidBottle || 32 ||&lt;br /&gt;
|-&lt;br /&gt;
| Wreckage || 33 || || SoundCartridge || 34 || || DrillHead || 35 ||&lt;br /&gt;
|-&lt;br /&gt;
| ScanningHead || 36 || || Flare || 37 || || Blocked || 38 ||&lt;br /&gt;
|-&lt;br /&gt;
| SuitMod || 39 || || Crate || 40 || || Portables || 41 ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>64.178.254.175</name></author>
	</entry>
</feed>