The RMP Motion Controller APIs

◆ StartTheNetwork()

public static void StartTheNetwork ( MotionController  controller)
static
Parameters
MotionControllercontroller
public static void StartTheNetwork(MotionController controller)
{
// Initialize the Network
if (controller.NetworkStateGet() != RSINetworkState.RSINetworkStateOPERATIONAL) // Check if network is started already.
{
Console.WriteLine("Starting Network..");
controller.NetworkStart(); // If not. Initialize The Network. (This can also be done from RapidSetup Tool)
}
if (controller.NetworkStateGet() != RSINetworkState.RSINetworkStateOPERATIONAL) // Check if network is started again.
{
int messagesToRead = controller.NetworkLogMessageCountGet(); // Some kind of error starting the network, read the network log messages
for (int i = 0; i < messagesToRead; i++)
{
Console.WriteLine(controller.NetworkLogMessageGet(i)); // Print all the messages to help figure out the problem
}
Console.WriteLine("Expected OPERATIONAL state but the network did not get there.");
//throw new RsiError(); // Uncomment if you want your application to exit when the network isn't operational. (Comment when using phantom axis)
}
else // Else, of network is operational.
{
Console.WriteLine("Network Started");
}
}
See also
CheckErrors
Examples
ControllerInterrupts.cpp, HardwareLimits.cpp, HelperFunctions.cs, Homing.cs, MotionHoldReleasedBySoftwareAddress.cpp, PathMotion.cpp, PVTmotionMultiAxis.cpp, SingleAxisSyncOutputs.cpp, Template.cs, TouchProbe.cs, UserLimitDigitalInputAction.cpp, and VelocitySetByAnalogInputValue.cs.

Definition at line 109 of file HelperFunctions.cs.

RSI::RapidCode::RSINetworkState
RSINetworkState
State of network.
Definition: rsienums.h:550
HelperFunctions.StartTheNetwork
static void StartTheNetwork(MotionController controller)
Start the controller communication/network.
Definition: HelperFunctions.cs:109