Jump to content

Component: Port Matrix (Misc): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead""
Undid revision 48421 by SteveT (talk)
Tag: Undo
 
(4 intermediate revisions by the same user not shown)
Line 83: Line 83:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''AllOff'''
| width="90%" class="mtx-class-macrohead" | '''AllOff'''
|-
|-
| colspan="2" | Turn off all used pins of the port (unused port pins are unaffected) 
| colspan="2" | Turn off all used pins of the port (unused port pins are unaffected) 
Line 97: Line 97:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''AllOn'''
| width="90%" class="mtx-class-macrohead" | '''AllOn'''
|-
|-
| colspan="2" | Turn on all of the pins in the array (unused port pins are unaffected) 
| colspan="2" | Turn on all of the pins in the array (unused port pins are unaffected) 
Line 111: Line 111:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''BarGraph'''
| width="90%" class="mtx-class-macrohead" | '''BarGraph'''
|-
|-
| colspan="2" | Turns on the first N pins of the array - for generating bar graph meters etc. 
| colspan="2" | Turns on the first N pins of the array - for generating bar graph meters etc. 
Line 130: Line 130:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''GetHandle'''
| width="90%" class="mtx-class-macrohead" | '''GetHandle'''
|-
|-
| colspan="2" | Retrieves the object handle of the indexed clone. Returns zero for out of range indexes. 
| colspan="2" | Retrieves the object handle of the indexed clone. Returns zero for out of range indexes. 
Line 149: Line 149:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''GetPin'''
| width="90%" class="mtx-class-macrohead" | '''GetPin'''
|-
|-
| colspan="2" | Read the state of the selected pin of the port. Returns false if the index is out of range (0..7) 
| colspan="2" | Read the state of the selected pin of the port. Returns false if the index is out of range (0..7) 
Line 168: Line 168:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''PinOff'''
| width="90%" class="mtx-class-macrohead" | '''PinOff'''
|-
|-
| colspan="2" | Turn off the chosen pin of the port. 
| colspan="2" | Turn off the chosen pin of the port. 
Line 187: Line 187:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''PinOn'''
| width="90%" class="mtx-class-macrohead" | '''PinOn'''
|-
|-
| colspan="2" | Turn on the selected pin of the port. 
| colspan="2" | Turn on the selected pin of the port. 
Line 206: Line 206:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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;" | '''PinToggle'''
| width="90%" class="mtx-class-macrohead" | '''PinToggle'''
|-
|-
| colspan="2" | Toggles the state of the selected pin of the port. 
| colspan="2" | Toggles the state of the selected pin of the port. 
Line 226: Line 226:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-
Line 253: Line 253:
| colspan="2" | The distance between cloned objects in the matrix. 
| colspan="2" | The distance between cloned objects in the matrix. 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-

Latest revision as of 15:38, 13 July 2026

Author Matrix Ltd
Version 1.1
Category Misc


Port Matrix component

Create an accurately spaced array of up to eight components, each corresponding to a pin of the chosen port. If the cloned component has a property called 'pin', this will be set the the corresponding pin of the matrix port, and the component will behave as if it were connected directly to that pin. If there are less than eight clones, the unused upper bits of the port will be masked out to allow them to be used by other components.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Industrial Tanks

A simple example showing the hoppers, valves and pipes working together. Each tank automatically empties in turn.

Industrial Tanks






Macro reference

AllOff

AllOff
Turn off all used pins of the port (unused port pins are unaffected) 
- VOID Return


AllOn

AllOn
Turn on all of the pins in the array (unused port pins are unaffected) 
- VOID Return


BarGraph

BarGraph
Turns on the first N pins of the array - for generating bar graph meters etc. 
- BYTE Length
How many pins to enable. 
- VOID Return


GetHandle

GetHandle
Retrieves the object handle of the indexed clone. Returns zero for out of range indexes. 
- BYTE Index
Index of the object to get a handle for. 
- HANDLE Return


GetPin

GetPin
Read the state of the selected pin of the port. Returns false if the index is out of range (0..7) 
- BYTE Index
Index of the pin to read. 
- BOOL Return


PinOff

PinOff
Turn off the chosen pin of the port. 
- BYTE Index
Index of the pin to set within the port. 
- VOID Return


PinOn

PinOn
Turn on the selected pin of the port. 
- BYTE Index
Index of the pin to set within the port. 
- VOID Return


PinToggle

PinToggle
Toggles the state of the selected pin of the port. 
- BYTE Index
 
- VOID Return


Property reference

Properties
Simulation
Target Object
Choose an object that will be duplicated for each required pin of the chosen port. The object should have a property called 'pin' to which the pins of the port will automatically be attached. 
Count
Number of objects in the matrix. They will be assigned pins from the chosen port sequentially, beginning with pin0. 
Alignment
Which 3D axis the cloned objects will be arranged along. 
Spacing
The distance between cloned objects in the matrix. 
Connections
Port
Choose a port to connect the matrix of objects to. Each will be assigned a single pin of the port automatically by the Port Matrix component.