Page 804 - ExtendSim User Guide
P. 804

Data Management and Exchange
Blocks for data management and exchange
Output variables
Output Variable
DBQ record rank DBQ halt query DBQ next record DBQS record rank DBQS attribute
DBQS item quantity DBQS item priority DBQS 3D object ID
Rank result for the current record
A True value halts the current query cycle Tells block which record to query next
X Spawn rank for the current record
X For assigning attribute values to a spawned item. If the record's spawn rank is good enough to merit a spawn- ing, then results from that record can be attached to the spawned item in the form of DBQS attributes. See “Spawned items” on page 775.
X Item quantity to be placed on spawned item. Also see DBQS attribute, above.
X Item priority to be placed on spawned item. Also see DBQS attribute, above.
X 3D object ID to be placed on spawned item. Also see DBQS attribute, above.
As mentioned earlier, while you can specify other equation results, at least one of the output variables has to be of the type DBQ record rank. Furthermore:
• Only the results for the record ranked best will be output.
• You can use more than one DBQ record rank variable; the secondary ranking variable will be used to arbitrate in the case of tied ranking. This is useful if you are concerned with tie breaking for two or more records having the same primary. What constitutes a tie can also be defined on the Options tab with the parameter Records ranked within +/- X are equal.
• IftheSpawningoptionisenabled,atleasttwooutputvariablesarerequired–onevariableof DBQ record rank type plus one variable of DBQS record rank type.
Ranking rules
The rules that determine which record is selected are given on the block’s Options tab:
For a pass-through item
• Highest pass-through record rank. Each record’s rank value is calculated by the equation. The one with the highest rank is chosen.
• Lowestpass-throughrecordrank.Eachrecord’srankvalueiscalculatedbytheequation.The one with the lowest rank is chosen.
• FirstTruerecordrank.Theequationwillbecalculatedonceforeachrecorduntileither:
How To
Query Equation Query Equation(I)

   802   803   804   805   806