20 Gear Drive, Plymouth Ind. Park, Terryville, CT 06786
Tel: (860) 585-1254 Fax: (860) 584-1973 http://www.amci.com
Networked Indexer/Driver User Manual
E
THER
CAT S
YSTEM
C
ONFIGURATION
103
2.3 Create a DUT
AMCI sample programs use a DUT (Defined User Type) to group the I/O variables associated with each Net-
worked Driver. Once the DUT is defined, a separate variable is created for each device on the machine.
1) If needed, create a PLC for the project.
2) Expand out the PLC tree until the DUT field is available.
3) Right click on DUT and select Add
DUT.
4) In the window that opens, name the DUT and give it a Structure data type.
5) The following is the variable layout used in the sample programs. This layout can be used as is, or can be
modified to fit your specific application.
TYPE DUT_AMCI_SD17060E-K :
STRUCT
//Outputs:
nCMD0 AT %Q*
: UINT;
nCMD1 AT %Q*
: UINT := 16#8000;
nTargetPos AT %Q*
: DINT;
nTargetVel AT %Q*
: UDINT;
nAccel AT %Q*
: UINT;
nDecel AT %Q*
: UINT;
nMtrCurr AT %Q*
: UINT;
nJerk AT %Q*
: UINT := 0;
//Inputs:
nStatus0 AT %I*
: UINT;
nStatus1 AT %I*
: UINT;
nMotorPos AT %I*
: DINT;
nEncPos AT %I*
: DINT;
nTrappedEnc AT %I*
: DINT;
nLastCurrent AT %I* : UINT;
nLastJerk AT %I*
: UINT;
END_STRUCT
END_TYPE
2.4 Create Variables Based on the DUT
The location of the actual variable(s) used in the system’s program depends on programming style and pro-
gram complexity. Typically, variables are declared in the Main program or in a Global Variable List.
st_Axis1_SD17060E-K : DUT_AMCI_SD17060E-K;
st_Axis2_SD17060E-K : DUT_AMCI_SD17060E-K;
2.5 Link Variable Names to I/O Words
1) From the menu, select
Build
Build Solution
. (Ctrl+Shift+B). The build will fail with a message that at
least one variable must be linked to a task variable. Click [OK] to close the message.
2) In the I/O tree, expand the Networked Driver until the input and output words are visible.
3) Right click on the STATUS_word0 input word. In the pop up menu that opens, select “Change Link...”
Figure T2.5 Change Link Pop up Menu