Jump to content

Component: EtherCAT Slave (EasyCAT) (Comms: IoT/Cloud): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(6 intermediate revisions by 2 users not shown)
Line 17: Line 17:
==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_temp/EasyCat.fcfx FC_Comp_Source_temp/EasyCat.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_EasyCat.fcfx FC_Comp_Source_EasyCat.fcfx]


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


==Detailed description==
==Detailed description==
Line 73: Line 73:


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




Line 86: Line 88:


===GetByte===
===GetByte===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''GetByte'''
| width="90%" class="mtx-class-macrohead" | '''GetByte'''
|-
|-
| colspan="2" | Read a 8-bit value from the Out receive buffer&nbsp;
| colspan="2" | Read a 8-bit value from the Out receive buffer&nbsp;
Line 105: Line 107:


===GetFloat===
===GetFloat===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''GetFloat'''
| width="90%" class="mtx-class-macrohead" | '''GetFloat'''
|-
|-
| colspan="2" | Read a 32-bit floating point value from the Out receive buffer&nbsp;
| colspan="2" | Read a 32-bit floating point value from the Out receive buffer&nbsp;
Line 124: Line 126:


===GetInt===
===GetInt===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''GetInt'''
| width="90%" class="mtx-class-macrohead" | '''GetInt'''
|-
|-
| colspan="2" | Read a 16-bit value from the Out receive buffer&nbsp;
| colspan="2" | Read a 16-bit value from the Out receive buffer&nbsp;
Line 143: Line 145:


===GetLong===
===GetLong===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''GetLong'''
| width="90%" class="mtx-class-macrohead" | '''GetLong'''
|-
|-
| colspan="2" | Read a 32-bit value from the Out receive buffer&nbsp;
| colspan="2" | Read a 32-bit value from the Out receive buffer&nbsp;
Line 162: Line 164:


===Initialise===
===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Starts up the SPI connection to the EasyCAT board and configures the board. Returns 1 for a sucessful initialise.&nbsp;
| colspan="2" | Starts up the SPI connection to the EasyCAT board and configures the board. Returns 1 for a sucessful initialise.&nbsp;
Line 176: Line 178:


===MainTask===
===MainTask===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''MainTask'''
| width="90%" class="mtx-class-macrohead" | '''MainTask'''
|-
|-
| colspan="2" | Must be called as part of the application main program loop.&nbsp;
| colspan="2" | Must be called as part of the application main program loop.&nbsp;
Line 190: Line 192:


===SetByte===
===SetByte===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''SetByte'''
| width="90%" class="mtx-class-macrohead" | '''SetByte'''
|-
|-
| colspan="2" | Write an 8-bit value to the In receive buffer&nbsp;
| colspan="2" | Write an 8-bit value to the In receive buffer&nbsp;
Line 214: Line 216:


===SetFloat===
===SetFloat===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''SetFloat'''
| width="90%" class="mtx-class-macrohead" | '''SetFloat'''
|-
|-
| colspan="2" | Write a 32-bit floating point value to the In receive buffer&nbsp;
| colspan="2" | Write a 32-bit floating point value to the In receive buffer&nbsp;
Line 238: Line 240:


===SetInt===
===SetInt===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''SetInt'''
| width="90%" class="mtx-class-macrohead" | '''SetInt'''
|-
|-
| colspan="2" | Write a 16-bit value to the In receive buffer&nbsp;
| colspan="2" | Write a 16-bit value to the In receive buffer&nbsp;
Line 262: Line 264:


===SetLong===
===SetLong===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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;" | '''SetLong'''
| width="90%" class="mtx-class-macrohead" | '''SetLong'''
|-
|-
| colspan="2" | Write a 32-bit value to the In receive buffer&nbsp;
| colspan="2" | Write a 32-bit value to the In receive buffer&nbsp;
Line 287: Line 289:
==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 303: Line 305:
| colspan="2" | Used to load a header file from Easy CAT Configurator tool to describe the units inputs and outputs&nbsp;
| colspan="2" | Used to load a header file from Easy CAT Configurator tool to describe the units inputs and outputs&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;" | Data Rx
| width="90%" class="mtx-class-propfolder" | Data Rx
|-
|-
|-
|-
Line 312: Line 314:
| colspan="2" | Total number of bytes to come out from the EtherCAT master&nbsp;
| colspan="2" | Total number of bytes to come out from the EtherCAT master&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;" | Data Tx
| width="90%" class="mtx-class-propfolder" | Data Tx
|-
|-
|-
|-
Line 321: Line 323:
| colspan="2" | Total bytes to come in from the EtherCAT master&nbsp;
| colspan="2" | Total bytes to come in from the EtherCAT master&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;" | SPI Properties
| width="90%" class="mtx-class-propfolder" | SPI 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;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 359: Line 361:
| colspan="2" | Prescale option selector&nbsp;
| colspan="2" | Prescale option selector&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;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-

Latest revision as of 14:36, 13 July 2026

Author Matrix TSL
Version 1.0
Category Comms: IoT/Cloud


EtherCAT Slave (EasyCAT) component

Provides support for the EtherCAT Slave industrial protocol using an EasyCAT Arduino shield. The shield can be driven from a Flowcode compatible Arduino type board or can be driven using an Arduino using the SCADA Slave firmware to drive EtherCAT from the Flowcode simulation runtime. Compatible with the EasyCAT Easy Configurator tool.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

GetByte

GetByte
Read a 8-bit value from the Out receive buffer 
- BYTE Index
Data Index 
- BYTE Return


GetFloat

GetFloat
Read a 32-bit floating point value from the Out receive buffer 
- BYTE Index
Data Index 
- FLOAT Return


GetInt

GetInt
Read a 16-bit value from the Out receive buffer 
- BYTE Index
Data Index 
- UINT Return


GetLong

GetLong
Read a 32-bit value from the Out receive buffer 
- BYTE Index
Data Index 
- ULONG Return


Initialise

Initialise
Starts up the SPI connection to the EasyCAT board and configures the board. Returns 1 for a sucessful initialise. 
- BOOL Return


MainTask

MainTask
Must be called as part of the application main program loop. 
- BYTE Return


SetByte

SetByte
Write an 8-bit value to the In receive buffer 
- BYTE Index
Data Index 
- BYTE Data
 
- VOID Return


SetFloat

SetFloat
Write a 32-bit floating point value to the In receive buffer 
- BYTE Index
Data Index 
- FLOAT Data
 
- VOID Return


SetInt

SetInt
Write a 16-bit value to the In receive buffer 
- BYTE Index
Data Index 
- UINT Data
 
- VOID Return


SetLong

SetLong
Write a 32-bit value to the In receive buffer 
- BYTE Index
Data Index 
- ULONG Data
 
- VOID Return


Property reference

Properties
Synchronisation Mode
ASYNC = free running i.e. no synchronization between master and slave (default) DC_SYNC = interrupt is generated from the distributed clock unit SM_SYNC = interrupt is generated from the syncronisation manager 
Header File
Used to load a header file from Easy CAT Configurator tool to describe the units inputs and outputs 
Data Rx
Total Byte Num Out
Total number of bytes to come out from the EtherCAT master 
Data Tx
Total Byte Num In
Total bytes to come in from the EtherCAT master 
SPI Properties
Connections
Channel
SPI Channel selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Prescale
Prescale option selector 
Simulation
Simulation Comms