Component: EtherCAT Slave (EasyCAT) (Comms: IoT/Cloud): Difference between revisions
Appearance
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (12 intermediate revisions by 2 users not shown) | |||
| Line 16: | Line 16: | ||
==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_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_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_EasyCat.fcfx FC_Comp_Source_EasyCat.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
| Line 40: | Line 48: | ||
==Examples== | ==Examples== | ||
| Line 61: | Line 75: | ||
==Macro reference== | |||
{| class="wikitable | ===GetByte=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetByte''' | ||
|- | |- | ||
| colspan="2" | Read a | | colspan="2" | Read a 8-bit value from the Out receive buffer | ||
|- | |- | ||
|- | |- | ||
| Line 171: | Line 101: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===GetFloat=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetFloat''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Read a 32-bit floating point value from the Out receive buffer | ||
|- | |- | ||
|- | |- | ||
| Line 189: | Line 120: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===GetInt=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetInt''' | ||
|- | |- | ||
| colspan="2" | Read a | | colspan="2" | Read a 16-bit value from the Out receive buffer | ||
|- | |- | ||
|- | |- | ||
| Line 212: | Line 139: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===GetLong=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetLong''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Read a 32-bit value from the Out receive buffer | ||
|- | |- | ||
|- | |- | ||
| Line 230: | Line 158: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===Initialise=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | 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. | | colspan="2" | Starts up the SPI connection to the EasyCAT board and configures the board. Returns 1 for a sucessful initialise. | ||
| Line 253: | Line 177: | ||
===MainTask=== | |||
{| class="mtx-class-macrotable wikitable" | |||
== | |||
{| class=" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" class="mtx-class-macrohead" | '''MainTask''' | |||
| width="90%" | |||
|- | |- | ||
| colspan="2" | Must be called as part of the application main program loop. | | colspan="2" | Must be called as part of the application main program loop. | ||
| Line 375: | Line 191: | ||
{| class="wikitable | ===SetByte=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetByte''' | ||
|- | |- | ||
| colspan="2" | Write | | colspan="2" | Write an 8-bit value to the In receive buffer | ||
|- | |- | ||
|- | |- | ||
| Line 388: | Line 205: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9- | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| width="90%" | Data | | width="90%" | Data | ||
|- | |- | ||
| Line 398: | Line 215: | ||
{| class="wikitable | ===SetFloat=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetFloat''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Write a 32-bit floating point value to the In receive buffer | ||
|- | |- | ||
|- | |- | ||
| Line 411: | Line 229: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
| width="10%" align="center | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
| width="90% | | width="90%" | Data | ||
|- | |- | ||
| | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
{| class="wikitable | ===SetInt=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetInt''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Write a 16-bit value to the In receive buffer | ||
|- | |- | ||
|- | |- | ||
| Line 447: | Line 253: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
| width="10%" align="center | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| width="90%" | Data | | width="90%" | Data | ||
|- | |- | ||
| Line 475: | Line 263: | ||
{| class="wikitable | ===SetLong=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetLong''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | Write a 32-bit value to the In receive buffer | ||
|- | |- | ||
|- | |- | ||
| Line 488: | Line 277: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG | |||
| width="10%" align="center" | [[File:Fc9- | |||
| width="90%" | Data | | width="90%" | Data | ||
|- | |- | ||
| Line 514: | Line 285: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| Line 549: | Line 305: | ||
| colspan="2" | Used to load a header file from Easy CAT Configurator tool to describe the units inputs and outputs | | colspan="2" | Used to load a header file from Easy CAT Configurator tool to describe the units inputs and outputs | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Data Rx | ||
|- | |- | ||
|- | |- | ||
| Line 558: | Line 314: | ||
| colspan="2" | Total number of bytes to come out from the EtherCAT master | | colspan="2" | Total number of bytes to come out from the EtherCAT master | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Data Tx | ||
|- | |- | ||
|- | |- | ||
| Line 567: | Line 323: | ||
| colspan="2" | Total bytes to come in from the EtherCAT master | | colspan="2" | Total bytes to come in from the EtherCAT master | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | SPI Properties | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| Line 605: | Line 361: | ||
| colspan="2" | Prescale option selector | | colspan="2" | Prescale option selector | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | 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 | |
| Index | |
| Data Index | |
| Return | |
GetFloat
| GetFloat | |
| Read a 32-bit floating point value from the Out receive buffer | |
| Index | |
| Data Index | |
| Return | |
GetInt
| GetInt | |
| Read a 16-bit value from the Out receive buffer | |
| Index | |
| Data Index | |
| Return | |
GetLong
| GetLong | |
| Read a 32-bit value from the Out receive buffer | |
| Index | |
| Data Index | |
| Return | |
Initialise
| Initialise | |
| Starts up the SPI connection to the EasyCAT board and configures the board. Returns 1 for a sucessful initialise. | |
| Return | |
MainTask
| MainTask | |
| Must be called as part of the application main program loop. | |
| Return | |
SetByte
| SetByte | |
| Write an 8-bit value to the In receive buffer | |
| Index | |
| Data Index | |
| Data | |
| Return | |
SetFloat
| SetFloat | |
| Write a 32-bit floating point value to the In receive buffer | |
| Index | |
| Data Index | |
| Data | |
| Return | |
SetInt
| SetInt | |
| Write a 16-bit value to the In receive buffer | |
| Index | |
| Data Index | |
| Data | |
| Return | |
SetLong
| SetLong | |
| Write a 32-bit value to the In receive buffer | |
| Index | |
| Data Index | |
| Data | |
| Return | |