Create C++ RapidCodeRT Hello World project that runs on eRMP.
#include <iostream>
#include "rsi.h"
{
{
printf("%s\n", err->text);
}
}
{
if (controller->
NetworkStateGet() != RSINetworkState::RSINetworkStateOPERATIONAL)
{
std::cout << "Starting Network.." << std::endl;
}
if (controller->
NetworkStateGet() != RSINetworkState::RSINetworkStateOPERATIONAL)
{
for (int i = 0; i < messagesToRead; i++)
{
}
std::cout << "Expected OPERATIONAL state but the network did not get there." << std::endl;
}
else
{
std::cout << "Network Started" << std::endl;
}
}
int main(int argc, char* argv[])
{
MotionController* controller = MotionController::CreateFromSoftware(
nullptr,
"NodeB");
CheckErrors(controller);
printf("Hello, World!\n");
try {
CheckErrors(axis);
}
return 0;
}
catch (const std::exception& e)
{
printf("\n%s\n", e.what());
}
}
void HardwareNegLimitActionSet(RSIAction action)
Set the action that will occur when the Hardware Negative Limit Event triggers.
double CommandPositionGet()
Get the current command position.
void HardwarePosLimitActionSet(RSIAction action)
Set the action that will occur when the Hardware Positive Limit Event triggers.
void SoftwareNegLimitActionSet(RSIAction action)
Set the action that will occur when the Software Negative Limit Event triggers.
void HomeActionSet(RSIAction action)
Set the action that will occur when the Home Event triggers.
void ErrorLimitActionSet(RSIAction action)
Set the action that will occur when the Error Limit Event triggers.
void MotorTypeSet(RSIMotorType type)
Set the motor type.
void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct)
Command a relative point-to-point S-Curve motion.
void SoftwarePosLimitActionSet(RSIAction action)
Set the action that will occur when the Software Positive Limit Event triggers.
Represents a single axis of motion control. This class provides an interface for commanding motion,...
Axis * AxisGet(int32_t axisNumber)
AxisGet returns a pointer to an Axis object and initializes its internals.
RSINetworkState NetworkStateGet()
const char *const NetworkLogMessageGet(int32_t messageIndex)
int32_t NetworkLogMessageCountGet()
uint32_t SerialNumberGet(void)
Get the controller's serial number.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
void NetworkStart()
Start the network with RSINetworkStartupMethodNORMAL.
void ClearFaults()
Clear all faults for an Axis or MultiAxis.
void AmpEnableSet(bool enable)
Enable all amplifiers.
bool MotionDoneGet()
Check to see if motion is done and settled.
const RsiError *const ErrorLogGet()
Get the next RsiError in the log.
int32_t ErrorLogCountGet()
Get the number of software errors in the error log.
The RapidCode base class. All non-error objects are derived from this class.
Represents the error details thrown as an exception by all RapidCode classes. This class contains an ...