The RMP Motion Controller APIs
Log.cs
1
20using RSI.RapidCode.dotNET; // Import our RapidCode Library.
21using NUnit.Framework;
22using System;
23
25[TestFixture]
26[Category("Software")]
27class Log : SampleAppTestBase
28{
29 [Test]
30 public void ErrorLog()
31 {
33 // Turn off exceptions. Exceptions will be logged as RsiError objects.
34 axis.ThrowExceptions(false);
35 // Do something that will cause an error (zero acceleration).
36 axis.MoveVelocity(0.0, 0.0);
37
38 while (axis.ErrorLogCountGet() > 0)
39 {
40 RsiError error = axis.ErrorLogGet();
41 Console.WriteLine(error.Message);
42 }
44 }
45}
void MoveVelocity(double velocity)
void ThrowExceptions(bool state)
Configure a class to throw exceptions.
const RsiError *const ErrorLogGet()
Get the next RsiError in the log.
int32_t ErrorLogCountGet()
Get the number of software errors in the error log.