Component: Port Matrix (Misc)

From Flowcode Help
Jump to navigationJump to search
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.

FC6 Icon.png Industrial Tanks






Macro reference

AllOff

Fc9-comp-macro.png AllOff
Turn off all used pins of the port (unused port pins are unaffected) 
Fc9-void-icon.png - VOID Return


AllOn

Fc9-comp-macro.png AllOn
Turn on all of the pins in the array (unused port pins are unaffected) 
Fc9-void-icon.png - VOID Return


BarGraph

Fc9-comp-macro.png BarGraph
Turns on the first N pins of the array - for generating bar graph meters etc. 
Fc9-u8-icon.png - BYTE Length
How many pins to enable. 
Fc9-void-icon.png - VOID Return


GetHandle

Fc9-comp-macro.png GetHandle
Retrieves the object handle of the indexed clone. Returns zero for out of range indexes. 
Fc9-u8-icon.png - BYTE Index
Index of the object to get a handle for. 
Fc9-h32-icon.png - HANDLE Return


GetPin

Fc9-comp-macro.png GetPin
Read the state of the selected pin of the port. Returns false if the index is out of range (0..7) 
Fc9-u8-icon.png - BYTE Index
Index of the pin to read. 
Fc9-bool-icon.png - BOOL Return


PinOff

Fc9-comp-macro.png PinOff
Turn off the chosen pin of the port. 
Fc9-u8-icon.png - BYTE Index
Index of the pin to set within the port. 
Fc9-void-icon.png - VOID Return


PinOn

Fc9-comp-macro.png PinOn
Turn on the selected pin of the port. 
Fc9-u8-icon.png - BYTE Index
Index of the pin to set within the port. 
Fc9-void-icon.png - VOID Return


PinToggle

Fc9-comp-macro.png PinToggle
Toggles the state of the selected pin of the port. 
Fc9-u8-icon.png - BYTE Index
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Simulation
Fc9-type-17-icon.png 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. 
Fc9-type-21-icon.png Count
Number of objects in the matrix. They will be assigned pins from the chosen port sequentially, beginning with pin0. 
Fc9-type-16-icon.png Alignment
Which 3D axis the cloned objects will be arranged along. 
Fc9-type-15-icon.png Spacing
The distance between cloned objects in the matrix. 
Fc9-conn-icon.png Connections
Fc9-type-4-icon.png 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.