Delta EtherCAT Programming Manual page 64

Table of Contents

Advertisement

EtherCAT Programming Guide
Set NodeID: Specify the Node ID to be executed. The parameters "AxisNo" and "SlotNo"
in the API function.
Timer: Check the Timer box to display the current contact status.
(3) Select AD Channel, AD Mode, Avg Range, and Conversion Time.
AD Channel: Select the AD channel (CH 0 ~ 3). The parameter "SlotNo" in the API
function.
AD Mode: Select the AD range. The parameter "RangeMode" in the API function.
Avg Range: Select the sample rate for the wave display. The parameter "AvgMode" in the
API function.
Conversion Time: Select the conversion time. The parameter "Mode" in the API function.
(4) When selecting AD Channel and AD Mode (as shown in figure 3.9.2.3), the following
program is executed:
RetCode = _ECAT_Slave_AIO_Set_Input_RangeMode(gESCCardNo,gNodeID, gSlotID,
Mode);
// SlotID is the channel of analog input
When selecting Avg Range (as shown in figure 3.9.2.3), the following program is
executed:
RetCode = _ECAT_Slave_R1_EC8124_Set_Input_AverageMode(gESCCardNo,
gNodeID, gSlotID, AvgMode);
When selecting Conversion Time (as shown in figure 3.9.2.3), the following program is
executed:
RetCode = _ECAT_Slave_AIO_Set_Input_ConvstFreq_Mode(gESCCardNo, gNodeID,
gSlotID, Mode);
To display Data field (as shown in figure 3.9.2.3), execute the following program:
RetCode = _ECAT_Slave_AIO_Get_Input_Value(gESCCardNo,gNodeID,gSlotID,
&Value);
(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.
March, 2017
Figure 3.9.2.3
EtherCAT Operation Example
3
3-43

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents