ECAT_Slave_in_ПЧ2П_c402  0.8
Реализация EtherCAT Slave для CM TMS320F28388D
Файл cia402appl.c

Implementation This file contains all ciA402 specific functions. Подробнее...

#include "ecat_def.h"
#include "applInterface.h"
#include "esc.h"
#include "coeappl.h"
#include "sysctl.h"
#include "cia402appl.h"
Граф включаемых заголовочных файлов для cia402appl.c:

См. исходные тексты.

Макросы

#define _CiA402_
 
#define ESC_PHY_ADDRESS_OFFSET   0x0512
 
#define ESC_PHY_REG_ADDRESS_OFFSET   0x0513
 
#define ESC_PHY_DATA_OFFSET   0x0514
 
#define ESC_MII_CTRL_STATUS_1_OFFSET   0x0510
 
#define ESC_MII_CTRL_STATUS_2_OFFSET   0x0511
 
#define ESC_MII_ECAT_ACCESS_OFFSET   0x0517
 

Функции

UINT16 CiA402_Init (void)
 This function initializes the Axes structures. Подробнее...
 
void CiA402_DeallocateAxis (void)
 CiA402_DeallocateAxis. Подробнее...
 
void CiA402_StateMachine (void)
 CiA402-Statemachine This function handles the state machine for devices using the CiA402 profile. called cyclic from MainLoop() All described transition numbers are referring to the document "ETG Implementation Guideline for the CiA402 Axis Profile" located on the EtherCAT.org download section. Подробнее...
 
void CiA402_LocalError (UINT16 ErrorCode)
 CiA402_LocalError. Подробнее...
 
void CiA402_DummyMotionControl (TCiA402Axis *pCiA402Axis)
 CiA402_DummyMotionControl. Подробнее...
 
BOOL CiA402_TransitionAction (INT16 Characteristic, TCiA402Axis *pCiA402Axis)
 CiA402-TransitionAction. Подробнее...
 
void CiA402_Application (TCiA402Axis *pCiA402Axis)
 CiA402-Application. Подробнее...
 
UINT8 Write0xF030 (UINT16 index, UINT8 subindex, UINT32 dataSize, UINT16 MBXMEM *pData, UINT8 bCompleteAccess)
 This function writes "Configured Modules" Object 0xF030. Подробнее...
 
UINT16 APPL_StartInputHandler (UINT16 *pIntMask)
 The function is called in the state transition from PREOP to SAFEOP when all general settings were checked to start the input handler. This function informs the application about the state transition, the application can refuse the state transition when returning an AL Status error code. The return code NOERROR_INWORK can be used, if the application cannot confirm the state transition immediately, in that case the application need to be complete the transition by calling ECAT_StateChange. Подробнее...
 
UINT16 APPL_StopInputHandler (void)
 The function is called in the state transition from SAFEOP to PREEOP to stop the input handler. This functions informs the application about the state transition, the application cannot refuse the state transition. Подробнее...
 
UINT16 APPL_StartOutputHandler (void)
 The function is called in the state transition from SAFEOP to OP when all general settings were checked to start the output handler. This function informs the application about the state transition, the application can refuse the state transition when returning an AL Status error code. The return code NOERROR_INWORK can be used, if the application cannot confirm the state transition immediately, in that case the application need to be complete the transition by calling ECAT_StateChange. Подробнее...
 
UINT16 APPL_StopOutputHandler (void)
 The function is called in the state transition from OP to SAFEOP to stop the output handler. This functions informs the application about the state transition, the application cannot refuse the state transition. Подробнее...
 
UINT16 APPL_GenerateMapping (UINT16 *pInputSize, UINT16 *pOutputSize)
 This function calculates the process data sizes from the actual SM-PDO-Assign and PDO mapping. Подробнее...
 
void APPL_InputMapping (UINT16 *pData)
 This function will copies the inputs from the local memory to the ESC memory to the hardware. Подробнее...
 
void APPL_OutputMapping (UINT16 *pData)
 This function will copies the outputs from the ESC memory to the local memory to the hardware. Подробнее...
 
void APPL_Application (void)
 This function will called from the synchronisation ISR or from the mainloop if no synchronisation is supported. Подробнее...
 
int main (void)
 This is the main function. Подробнее...
 

Переменные

TCiA402Axis LocalAxes [MAX_AXES]
 

Подробное описание

Implementation This file contains all ciA402 specific functions.

Автор
Ether.nosp@m.catS.nosp@m.SC@be.nosp@m.ckho.nosp@m.ff.co.nosp@m.m
Версия
5.13


Changes to version V5.12:
V5.13 CIA402 2: write profile info to 0xF010.x bit15-0 (was bit16-31 before)
V5.13 CIA402 3: change define "CIA402_DEVICE" to "CiA402_SAMPLE_APPLICATION"

Changes to version V5.11:
V5.12 COE3: update entry access right handling

Changes to version V5.10:
V5.11 ECAT11: create application interface function pointer, add eeprom emulation interface functions

Changes to version V5.01:
V5.10 CIA402 1: Update complete access handling for 0xF030
V5.10 ECAT6: Add "USE_DEFAULT_MAIN" to enable or disable the main function

Changes to version V5.0:
V5.01 ESC2: Add missed value swapping

Changes to version V4.40:
V5.0 CIA402 1: Syntax bugfix in dummy motion controller
V5.0 CIA402 2: Handle 0xF030/0xF050 in correlation do PDO assign/mapping objects
V5.0 CIA402 3: Trigger dummy motion controller if valid mode of operation is set.
V5.0 CIA402 4: Change Axes structure handling and resources allocation.
V5.0 ECAT2: Create generic application interface functions. Documentation in Application Note ET9300.

Changes to version V4.30:
V4.40 CoE 6: add AL Status code to Init functions
V4.40 CIA402 2: set motion control trigger depending on "Synchronisation", "mode of operation" and "cycle time"
V4.40 CIA402 1: change behaviour and name of bit12 of the status word (0x6041) (WG CIA402 24.02.2010)
V4.30 : create file (state machine; handling state transition options; input feedback)

См. определение в файле cia402appl.c