Jump to content

Component: Sheep Pen (Scenarios): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(10 intermediate revisions by 2 users not shown)
Line 16: Line 16:


==Component Source Code==
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_SheepPen.fcfx FC_Comp_Source_SheepPen.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_SheepPen.fcfx FC_Comp_Source_SheepPen.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_SheepPen.fcfx FC_Comp_Source_SheepPen.fcfx]


==Detailed description==
==Detailed description==




Line 32: Line 40:


==Examples==
==Examples==




Line 46: Line 60:
[[Sheep_Pen|Sheep Pen Scenario]]
[[Sheep_Pen|Sheep Pen Scenario]]


==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadSensor'''
|-
| colspan="2" | Checks to see if an object is on the Sensor. Returns 0 if nothing is on the Sensor, Returns 1 if an object is on the Sensor. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ControlGateB'''
|-
| colspan="2" | Allows gate B to be opened and closed. 
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
|-
| colspan="2" | 0 = Closed, 1 = Open 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
 
 
 
==Macro reference==
 
===ControlGateA===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ControlGateA'''
| width="90%" class="mtx-class-macrohead" | '''ControlGateA'''
|-
|-
| colspan="2" | Allows gate A to be opened and closed. 
| colspan="2" | Allows gate A to be opened and closed. 
Line 97: Line 91:




 
===ControlGateB===
 
{| class="mtx-class-macrotable wikitable"
==Property reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
|-
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Inactive Sensor
|-
| colspan="2" | Specifies the colour of the sensor's indicator when no sheep are present. 
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Active Sensor
|-
| colspan="2" | Specifies the colour of the sensor's indicator when sheep are present. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Num Objects
|-
| colspan="2" | Specifies the number of objects active in the simulation. 
|}==Macro reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadSensor'''
|-
| colspan="2" | Checks to see if an object is on the Sensor. Returns 0 if nothing is on the Sensor, Returns 1 if an object is on the Sensor. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ControlGateB'''
| width="90%" class="mtx-class-macrohead" | '''ControlGateB'''
|-
|-
| colspan="2" | Allows gate B to be opened and closed. 
| colspan="2" | Allows gate B to be opened and closed. 
Line 154: Line 110:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadSensor===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ControlGateA'''
| width="90%" class="mtx-class-macrohead" | '''ReadSensor'''
|-
|-
| colspan="2" | Allows gate A to be opened and closed. 
| colspan="2" | Checks to see if an object is on the Sensor. Returns 0 if nothing is on the Sensor, Returns 1 if an object is on the Sensor. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
|-
| colspan="2" | 0 = Closed, 1 = Open 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-

Latest revision as of 14:23, 13 July 2026

Author Matrix TSL
Version 1.0
Category Scenarios


Sheep Pen component

A simple sheep pen simulation with two gates and two sensors. Allows for simple logical control to try and move all the sheep from one pen to another.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_SheepPen.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_SheepPen.fcfx

Detailed description

No detailed description exists yet for this component

Examples

There is a detailed walk through of the scenario detailed at the link below to go with this component.

Sheep Pen Scenario






Macro reference

ControlGateA

ControlGateA
Allows gate A to be opened and closed. 
- BOOL State
0 = Closed, 1 = Open 
- VOID Return


ControlGateB

ControlGateB
Allows gate B to be opened and closed. 
- BOOL State
0 = Closed, 1 = Open 
- VOID Return


ReadSensor

ReadSensor
Checks to see if an object is on the Sensor. Returns 0 if nothing is on the Sensor, Returns 1 if an object is on the Sensor. 
- BOOL Return


Property reference

Properties
Inactive Sensor
Specifies the colour of the sensor's indicator when no sheep are present. 
Active Sensor
Specifies the colour of the sensor's indicator when sheep are present. 
Num Objects
Specifies the number of objects active in the simulation.