Jump to content

Component: Input CSV (DSP Inputs): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(10 intermediate revisions by 2 users not shown)
Line 73: Line 73:


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''




Line 79: Line 89:
==Macro reference==
==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===CloseFile===
{| 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;" | '''CloseFile'''
| width="90%" class="mtx-class-macrohead" | '''CloseFile'''
|-
|-
| colspan="2" | Closes a file&nbsp;
| colspan="2" | Closes a file&nbsp;
Line 92: Line 103:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===OpenFile===
{| 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;" | '''OpenFile'''
| width="90%" class="mtx-class-macrohead" | '''OpenFile'''
|-
|-
| colspan="2" | Opens a file ready for reading. Returns 1 if file opened correctly. Automatically called by the ReadValue/ReadArray macros with the default values set by the component properties if not already called by the program.&nbsp;
| colspan="2" | Opens a file ready for reading. Returns 1 if file opened correctly. Automatically called by the ReadValue/ReadArray macros with the default values set by the component properties if not already called by the program.&nbsp;
Line 110: Line 122:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadArray===
{| 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;" | '''ReadArray'''
| width="90%" class="mtx-class-macrohead" | '''ReadArray'''
|-
|-
| colspan="2" | Reads an array of values to fill up the specified buffer. FAT component must be initialised before calling this macro. Returns 0 when we are at the end of the file, else returns 1.&nbsp;
| colspan="2" | Reads an array of values to fill up the specified buffer. FAT component must be initialised before calling this macro. Returns 0 when we are at the end of the file, else returns 1.&nbsp;
Line 123: Line 136:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadValue===
{| 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;" | '''ReadValue'''
| width="90%" class="mtx-class-macrohead" | '''ReadValue'''
|-
|-
| colspan="2" | Reads a value from the current row in the CSV file. FAT component must be initialised before calling this macro. Returns 0 when we are at the end of the file, else returns 1.&nbsp;
| colspan="2" | Reads a value from the current row in the CSV file. FAT component must be initialised before calling this macro. Returns 0 when we are at the end of the file, else returns 1.&nbsp;
Line 134: Line 148:
| 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'''  
|-
|-
|-
|-
Line 156: Line 168:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| 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;" | CSV File
| width="90%" class="mtx-class-propfolder" | CSV File
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author Matrix Ltd
Version 1.2
Category DSP Inputs


Input CSV component

Allows the values from a buffer to be collected directly from a CSV file. Either a value at a time or from an array.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples








Macro reference

CloseFile

CloseFile
Closes a file 
- VOID Return


OpenFile

OpenFile
Opens a file ready for reading. Returns 1 if file opened correctly. Automatically called by the ReadValue/ReadArray macros with the default values set by the component properties if not already called by the program. 
- STRING Filename
 
- BOOL Return


ReadArray

ReadArray
Reads an array of values to fill up the specified buffer. FAT component must be initialised before calling this macro. Returns 0 when we are at the end of the file, else returns 1. 
- BOOL Return


ReadValue

ReadValue
Reads a value from the current row in the CSV file. FAT component must be initialised before calling this macro. Returns 0 when we are at the end of the file, else returns 1. 
- BOOL Return


Property reference

Properties
Buffer Size 0
 
Buffer Type 0
 
CSV File
LinkTo
 
Filename
Name of the file to read DSP data from. 
Number of Outputs
The number of outputs the CSV reader can provide. Each output will be driven by the corresponding column of the CSV file. 
End of File
Determines what happens when we hit the end of the input file. The return value from the ReadValue/ReadArray can be checked to allow the file end to be caught and actioned.