Component: EtherCAT Slave (EasyCAT) (Comms: IoT/Cloud)
Author | Matrix TSL |
Version | 1.0 (Release) |
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.
Examples
No additional examples
Downloadable macro reference
SetInt
Write a 16-bit value to the In receive buffer
Parameters
- BYTE Index
- Data Index
- UINT Data
Return value
- This call does not return a value
MainTask
Must be called as part of the application main program loop.
Parameters
- This macro has no parameters
Return value
SetLong
Write a 32-bit value to the In receive buffer
Parameters
- BYTE Index
- Data Index
- ULONG Data
Return value
- This call does not return a value
GetFloat
Read a 32-bit floating point value from the Out receive buffer
Parameters
- BYTE Index
- Data Index
Return value
GetLong
Read a 32-bit value from the Out receive buffer
Parameters
- BYTE Index
- Data Index
Return value
GetInt
Read a 16-bit value from the Out receive buffer
Parameters
- BYTE Index
- Data Index
Return value
SetByte
Write an 8-bit value to the In receive buffer
Parameters
- BYTE Index
- Data Index
- BYTE Data
Return value
- This call does not return a value
GetByte
Read a 8-bit value from the Out receive buffer
Parameters
- BYTE Index
- Data Index
Return value
SetFloat
Write a 32-bit floating point value to the In receive buffer
Parameters
- BYTE Index
- Data Index
- FLOAT Data
Return value
- This call does not return a value
Initialise
Starts up the SPI connection to the EasyCAT board and configures the board.
Returns 1 for a sucessful initialise.
Parameters
- This macro has no parameters
Return value
- BOOL : Returns true if the operation is a success, else false
Simulation macro reference
This component does not contain any simulation macros
Property reference
Synchronisation Mode
This property is of type Fixed list of ints and can be referenced with the variable name SyncMode.
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
This property is of type Filename and can be referenced with the variable name HeaderFile.
Used to load a header file from Easy CAT Configurator tool to describe the units inputs and outputs
Total Byte Num Out
This property is of type Unsigned integer and can be referenced with the variable name TotalByteNumOut.
Total number of bytes to come out from the EtherCAT master
Total Byte Num In
This property is of type Unsigned integer and can be referenced with the variable name TotalByteNumIn.
Total bytes to come in from the EtherCAT master
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_spi1::CHANNEL.
SPI Channel selector
MOSI
This property is of type Single digital pin and can be referenced with the variable name cal_spi1::MOSI.
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
MISO
This property is of type Single digital pin and can be referenced with the variable name cal_spi1::MISO.
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
CLK
This property is of type Single digital pin and can be referenced with the variable name cal_spi1::CLK.
SPI Clock Pin CLK - The Clock signal is driven by the SPI master.
CS / SS
This property is of type Single digital pin and can be referenced with the variable name cal_spi1::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
This property is of type Fixed list of ints and can be referenced with the variable name cal_spi1::PR_SCALE.
Prescale option selector
Scope Traces
This property is of type True or false and can be referenced with the variable name cal_spi1::ScopeTraces.
Selects if the scope traces are automatically generated or not
Console Data
This property is of type True or false and can be referenced with the variable name cal_spi1::ConsoleData.
Selects if the console data is automatically generated or not
Injector
This property is of type Fixed list of ints and can be referenced with the variable name cal_spi1::Injector.
No additional information