Create C++ RapidCodeRT Hello World project that runs on the INtime kernel.
#include <stdio.h>
#include "rsi.h"
{
bool hasErrors = false;
{
printf("%s\n", err->text);
hasErrors = true;
}
if (hasErrors)
{
printf("Exiting due to RapidCodeRT creation errors.\n");
exit(1);
}
}
int main(int argc, char* argv[])
{
CheckErrors(controller);
printf("Hello, RapidCodeRT!\n");
CheckErrors(axis);
try {
}
}
catch (const std::exception& e)
{
printf("\n%s\n", e.what());
}
printf("Exiting successfully.\n");
controller = nullptr;
return 0;
}
double CommandPositionGet()
Get the current command position.
void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct)
Command a relative point-to-point S-Curve motion.
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.
void Delete(void)
Delete the MotionController and all its objects.
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...
RapidCodeOS * OS
Provides access to operating system (Windows) features.
void ClearFaults()
Clear all faults for an Axis or MultiAxis.
int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
Enable all amplifiers.
bool MotionDoneGet()
Check to see if motion is done and settled.
void Sleep(int32_t milliseconds)
Put the current thread to sleep.
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 ...