Delta EtherCAT Programming Manual page 67

Table of Contents

Advertisement

EtherCAT Operation Example
(4) When selecting DA Channel and DA Mode (as shown in figure 3.10.2.3), the following
program is executed:
RetCode = _ECAT_Slave_AIO_Set_Output_RangeMode(gESCCardNo, gNodeID,
3
gSlotID, Mode);
/* Set DA output range */
When the Apply key (as shown in 3.10.2.3) is pressed, the following program will be
executed:
RetCode = _ECAT_Slave_AIO_Set_Output_Value(gESCCardNo, gNodeID, gSlotID,
Value);
/* Set DA output value */
If the Get button in the Return Code section (as shown in 3.10.2.3) is pressed, the
following program will be executed:
RetCode = _ECAT_Slave_R1_EC9144_Get_Output_ReturnCode(gESCCardNo,
gNodeID, gSlotID, &RtCode);
/* Get DA status. */
To acquire the value of analog output module and display in Out Value field (as shown in
3.10.2.3), execute the program below.
RetCode = _ECAT_Slave_AIO_Set_Output_Value(gESCCardNo, gNodeID, gSlotID,
Value);
/* Acquire the value of the analog output module. */
(5) Exit program
Press the Exit key to exit and close the program.
Execute "_ECAT_Master_Reset" and "_ECAT_Master_Close" to exit the function. Detailed
description about these two API is presented in section 3.1.2 Exit program.
3-46
EtherCAT Programming Guide
March, 2017

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents