Motion Hold Move Released By Digital Input sample application.
- Warning
- This is a sample program to assist in the integration of the RMP motion controller with your application. It may not contain all of the logic and safety features that your application requires. We recommend that you wire an external hardware emergency stop (e-stop) button for safety when using our code sample apps. Doing so will help ensure the safety of you and those around you and will prevent potential injury or damage.
The sample apps assume that the system (network, axes, I/O) are configured prior to running the code featured in the sample app. See the Configuration page for more information.
📜 Motion Hold by Digital Input
This sample code is done in AKD Drive with Digital IO Inputs switches. A digital input switch triggers to release the HOLD set on the specified Motion. This functionality is available for all Drives but some changes to the sample app may be required.
const int DIGITAL_INPUTS_PDO_INDEX = 3;
Learn more in topic page.
📜 Motion Hold by Position
This sample code is done in AKD Drive with one Actual Axis and one Phantom Axis. It can be applied to two Phatom Axis or two Actual Axis with the slight changes of code which is guided in comment.
const double TRIGGER_POS = 1;
const int MOVING_AXIS_TARGET = 10;
const int HOLDINGAXIS_TARGET = 2;
Axis holdingAxis = controller.
AxisGet(Constants.HOLDING_AXIS_INDEX);
Axis movingAxis = controller.
AxisGet(Constants.MOVING_AXIS_INDEX);
Learn more in topic page.
📜 Motion Hold by Software Address
This sample code is done in AKD Drive with one Actual axis. There are a lots of available/free firmware address. Some are suggested in comment. Avaiable/free firmware addess can be found using vm3 as long as there is no label on address, it can be used.
int WAIT_TIME = 10;
int MOVE_DIST = 2;
if (controller.
MemoryGet(SOFTWARE_ADDRESS) != 0x0)
{
}
System.Threading.Thread.Sleep(WAIT_TIME);
System.Threading.Thread.Sleep(WAIT_TIME);
Learn more in topic page.