Difference between revisions of "Component: EtherCAT Slave (EasyCAT) (Comms: IoT/Cloud)"
From Flowcode Help
Jump to navigationJump to searchLine 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/ | + | 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 view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | 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] |
==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 81: | Line 83: | ||
==Macro reference== | ==Macro reference== | ||
− | === | + | ===GetByte=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetByte''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Read a 8-bit value from the Out receive buffer |
|- | |- | ||
|- | |- | ||
Line 94: | Line 96: | ||
|- | |- | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
Line 119: | Line 102: | ||
− | === | + | ===GetFloat=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetFloat''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Read a 32-bit floating point value from the Out receive buffer |
|- | |- | ||
|- | |- | ||
Line 133: | Line 116: | ||
| 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'' | ||
|} | |} | ||
− | === | + | ===GetInt=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetInt''' |
|- | |- | ||
− | | colspan="2" | Read a | + | | colspan="2" | Read a 16-bit value from the Out receive buffer |
|- | |- | ||
|- | |- | ||
Line 157: | Line 135: | ||
| 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'' | ||
|} | |} | ||
Line 181: | Line 159: | ||
− | === | + | ===Initialise=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' |
+ | |- | ||
+ | | colspan="2" | Starts up the SPI connection to the EasyCAT board and configures the board. Returns 1 for a sucessful initialise. | ||
+ | |- | ||
|- | |- | ||
− | | | + | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===MainTask=== | ||
+ | {| 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;" | '''MainTask''' | ||
|- | |- | ||
− | | | + | | colspan="2" | Must be called as part of the application main program loop. |
− | |||
|- | |- | ||
− | |||
|- | |- | ||
− | | 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'' | ||
|} | |} | ||
Line 224: | Line 211: | ||
− | === | + | ===SetFloat=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFloat''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Write a 32-bit floating point value to the In receive buffer |
|- | |- | ||
|- | |- | ||
Line 238: | Line 225: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT |
+ | | width="90%" | Data | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | 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'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | === | + | ===SetInt=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetInt''' |
|- | |- | ||
− | | colspan="2" | Write a | + | | colspan="2" | Write a 16-bit value to the In receive buffer |
|- | |- | ||
|- | |- | ||
Line 257: | Line 249: | ||
| colspan="2" | Data Index | | colspan="2" | Data Index | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| width="90%" | Data | | width="90%" | Data | ||
|- | |- | ||
Line 267: | Line 259: | ||
− | === | + | ===SetLong=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLong''' |
+ | |- | ||
+ | | colspan="2" | Write a 32-bit value to the In receive buffer | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Index | ||
+ | |- | ||
+ | | colspan="2" | Data Index | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG |
+ | | width="90%" | Data | ||
|- | |- | ||
+ | | colspan="2" | | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | 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'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} |
Revision as of 12:00, 3 February 2023
Author | Matrix TSL |
Version | 1.0 |
Category | Comms: IoT/Cloud |
Contents
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_temp/EasyCat.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_temp/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 |