25using RSI.RapidCode.dotNET;
34class Recorder_Sample : StaticMemoryTestBase
38 public void Recorder()
41 const int VALUES_PER_RECORD = 2;
42 const int RECORD_PERIOD_SAMPLES = 1;
43 const int RECORD_TIME = 250;
44 const int INPUT_INDEX = 0;
51 Axis axis = CreateAndReadyAxis(Constants.AXIS_NUMBER);
70 controller.
OS.
Sleep(RECORD_TIME);
74 Console.WriteLine(
"There are {0} Records available.", recordsAvailable);
76 for (
int i = 0; i < recordsAvailable; i++)
86 Console.WriteLine(
"Your encoder position was: " + positionRecord +
" when the input triggered.");
uint64_t AddressGet(RSIAxisAddressType addressType)
Get the an address for some location on the Axis.
Represents a single axis of motion control. This class provides an interface for commanding motion,...
uint64_t AddressGet()
Get the Host Address for the I/O point.
static IOPoint * CreateDigitalInput(Axis *axis, RSIMotorDedicatedIn motorDedicatedInNumber)
Create a Digital Input from an Axis' Dedicated Input bits.
int32_t MaskGet()
Get the bit mask for the I/O point.
Represents one specific point: Digital Output, Digital Input, Analog Output, or Analog Input....
int32_t RecorderRecordCountGet()
Get the number of records that are stored and ready for reading.
void RecorderStart()
Start recording data.
void RecorderCircularBufferSet(bool enable)
Configure recorder as circular buffer (or not).
void RecorderRecordDataRetrieve()
Retrieve one record of recorded data.
void RecorderDataCountSet(int32_t count)
Set the number of data values to be recorded.
uint64_t AddressGet(RSIControllerAddressType type)
Get the an address for some location on the MotionController.
int32_t RecorderRecordDataValueGet(int32_t index)
Get one value from a retrieved record.
void RecorderStop()
Stop recording data.
void RecorderReset()
Reset the recorder.
void RecorderDataAddressSet(int32_t index, uint64_t address)
Setup the addresses to be recorded.
void RecorderPeriodSet(uint32_t samples)
Set the number of samples between records.
void RecorderCountSet(int32_t recorderCount)
Set the number of processed Recorders in the controller.
bool RecorderEnabledGet()
Determine if the recorder is recording.
void AxisCountSet(int32_t axisCount)
Set the number of allocated and processed axes in the controller.
RapidCodeOS * OS
Provides access to operating system (Windows) features.
double RecorderRecordDataDoubleGet(int32_t index)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void Sleep(int32_t milliseconds)
Put the current thread to sleep.
RSIControllerAddressType
Used to get firmware address used in User Limits, Recorders, etc.
RSIAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.