20 Gear Drive, Plymouth Ind. Park, Terryville, CT 06786
Tel: (860) 585-1254 Fax: (860) 584-1973 http://www.amci.com
SMD34K User Manual
E
THER
CAT S
YSTEM
C
ONFIGURATION
93
2.3 Create a DUT
AMCI sample programs use a DUT (Defined User Type) to group the I/O variables associated with each
SMD34K. 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_SMD34K :
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_SMD34K : DUT_AMCI_SMD34K;
st_Axis2_SMD34K : DUT_AMCI_SMD34K;
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 SMD34K 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
Summary of Contents for SMD34K
Page 1: ...MICRO CONTROLS INC ADVANCED U s e r M anual Manual 940 0S280 ...
Page 6: ...TABLE OF CONTENTS SMD34K User Manual ADVANCED MICRO CONTROLS INC 6 Notes ...
Page 50: ...CALCULATING MOVE PROFILES SMD34K User Manual ADVANCED MICRO CONTROLS INC 50 Notes ...
Page 62: ...CONFIGURATION DATA FORMAT SMD34K User Manual ADVANCED MICRO CONTROLS INC 62 Notes ...
Page 80: ...COMMAND DATA FORMAT SMD34K User Manual ADVANCED MICRO CONTROLS INC 80 Notes ...
Page 100: ...LEADERS IN ADVANCED CONTROL PRODUCTS ADVANCED MICRO CONTROLS INC ...