Using Trio Motion Perfect, we will show to to initialize the EtherCAT network using a Trio Motion MC4N and a Control Techniques Unidrive SP. We will show the one line commanded needed to initialize the network, then command motion to a drive with only a few additional lines.
Setting up the EtherCAT Network
Our first command “ethercat (0,0)” will initialize the ethernet network in the MC4N to go out on the network and find all devices in the network to assign them a node ID on the network. This process can take only a few seconds depending on the number of nodes on the network.
Commands for Motion
We use a few commands to begin motion with the Unidrive SP. The first is “wdog = 1” and “servo = 1” which will enable the drive for motion. Next we enter a “fo” command which is the short of forward. Once the enter button is pressed the drive will begin moving the motor in the forward direction depending on the speed and settings of your Axis which i quickly added to the startup program ran in the video. We can run the same command “re” for reverse direction and use “cancel” anytime to stop the motion selected. Please note before a new command can be entered you must cancel the current command. Our last command entered is the moveabs command which again depending on your axis units will move the motor to an absolute position as defined by your units. In our case we entered “moveabs(10)” which is moving the motor to the absolute position of 10 Revs.
Used to cancel current or buffered axis commands on an axis or an interpolating axis group. Velocity profiled moves, for example; FORWARD , REVERSE , MOVE , MOVEABS , MOVECIRC , MHELICAL , MOVEMODIFY , will be ramped down at the programmed DECEL or FASTDEC rate then terminated. Other move types will be terminated immediately.
CANCEL can be called manually, but also automatically by software limits, hardware limits and MOTION_ERRORs .
MOVEABS(position1[, position2[, position3[, position4…]]])
Absolute position move. Move one axis or multiple axes to position(s) referenced with respect to the zero (home) position. The first parameter in the list is sent to the axis specified with the AXIS command or to the current BASE axis, the second to the next axis, and so on.
In the multi-axis form, the speed, acceleration and deceleration employed for the movement are taken from the first axis in the BASE group. The speeds of each axis are controlled so as to make the resulting vector of the movement run at the SPEED setting.
Uninterpolated, unsynchronised multi-axis motion can be achieved by simply placing MOVEABS commands on each axis independently. If needed, the target axis for an individual MOVEABS can be specified using the AXIS () command. This overrides the BASE axis setting for one MOVEABS only.
The values specified are scaled using the unit conversion factor axis parameter; UNITS . Therefore if, for example, an axis has 400 encoder edges/mm the UNITS for that axis is 400. The command MOVEABS(6)would then move to a position 6 mm from the zero position. When MERGE is set to ON , absolute and relative moves are merged together to make a continuous path movement.
The position of the axes’ zero(home) positions can be changed by the commands: OFFPOS , DEFPOS , REP_DIST , REP_OPTION , and DATUM .
Multi-axis interpolation uses the UNITS, SPEED, ACCEL and DECEL of the BASE axis. For correct XYZ vector operation, the UNITS of all 3 axes must be the same.
Sets continuous forward movement. The axis accelerates at the programmed ACCEL rate and continues moving at the SPEED value until either a CANCEL or RAPIDSTOP command are encountered. It then decelerates to a stop at the programmed DECEL rate.
If the axis reaches either the forward limit switch or forward soft limit, the FORWARD will be cancelled and the axis will decelerate to a stop.
Sets continuous reverse movement. The axis accelerates at the programmed ACCEL rate and continues moving at the SPEED value until either a CANCEL or RAPIDSTOP command are encountered. It then decelerates to a stop at the programmed DECEL rate.
If the axis reaches either the reverse limit switch or reverse soft limit, the REVERSE will be cancelled and the axis will decelerate to a stop.