Checks for a condition and sends a trace message out on the network if the condition is true.
The message can be displayed in the controller console by enabling the functionality on the
controller. Use fpcmd_enable_console_output to enable
FlexPendant logging.
Namespace:
ABB.Robotics.Diagnostics
Assembly:
ABB.Robotics (in ABB.Robotics.dll) Version: 6.5.129.0
Syntaxpublic static void WriteIf(
bool condition,
string message
)
Parameters
- condition
- Type: SystemBoolean
true to cause a message to be written; otherwise, false. - message
- Type: SystemString
A message to write.
ExamplesThis example sends a trace message containing the state of an object if the state is not RUNNING.
Trace.WriteIf(myobj.State!=RUNNING, string.Format("Object state: {0}\n", myobj.State.ToString()));
See Also