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

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_DSP_FileInput.fcfx FC_Comp_Source_DSP_FileInput.fcfx]
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DSP_FileInput.fcfx FC_Comp_Source_DSP_FileInput.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 38: Line 40:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 58: Line 62:
  
 
==Macro reference==
 
==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;" | '''CloseFile'''
 +
|-
 +
| colspan="2" | Closes a file 
 +
|-
 +
|-
 +
| 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;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Filename
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| 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;" | '''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. 
 +
|-
 +
|-
 +
| 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;" | '''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. 
 +
|-
 +
|-
 +
| 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''
 +
|}
 +
 +
 +
 +
 +
==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-21-icon.png]]
 +
| width="90%" | Buffer Size 0
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Buffer Type 0
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | CSV File
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | LinkTo
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Filename
 +
|-
 +
| colspan="2" | Name of the file to read DSP data from. 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Number of Outputs
 +
|-
 +
| colspan="2" | The number of outputs the CSV reader can provide. Each output will be driven by the corresponding column of the CSV file. 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | End of File
 +
|-
 +
| colspan="2" | 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. 
 +
|}==Macro reference==
  
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"

Revision as of 15:13, 20 January 2023

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 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

Fc9-comp-macro.png CloseFile
Closes a file 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING Filename
 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png 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. 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png 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. 
Fc9-bool-icon.png - BOOL Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-21-icon.png Buffer Size 0
 
Fc9-type-16-icon.png Buffer Type 0
 
Fc9-conn-icon.png CSV File
Fc9-type-16-icon.png LinkTo
 
Fc9-type-10-icon.png Filename
Name of the file to read DSP data from. 
Fc9-type-16-icon.png 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. 
Fc9-type-16-icon.png 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. 

==Macro reference==

Fc9-comp-macro.png CloseFile
Closes a file 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING Filename
 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png 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. 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png 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. 
Fc9-bool-icon.png - BOOL Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-21-icon.png Buffer Size 0
 
Fc9-type-16-icon.png Buffer Type 0
 
Fc9-conn-icon.png CSV File
Fc9-type-16-icon.png LinkTo
 
Fc9-type-10-icon.png Filename
Name of the file to read DSP data from. 
Fc9-type-16-icon.png 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. 
Fc9-type-16-icon.png 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.