Switch operation mode
The operation modes of the control system include teach mode, run mode, and remote mode.
Add NRC_SetOperationMode(NRC_TEACH_);
to the main function to switch the operation mode to the teach mode.
int main()
{
SystemStartup();//System startup
NRC_SetOperationMode(NRC_TEACH_);//Set the operation mode
while(1)//Keep the program running
{
NRC_Delayms(1000);
}
}
In the code, we used NRC_TEACH_
which can be found defined in the nrcAPI.h file. It means teach mode.
enum NRC_OperationMode
{
NRC_TEACH_ = 0, ///< Teach mode
NRC_REMOTE_ = 1, ///< Remote mode
NRC_RUN_ = 2 ///< Run mode
};