TG Motion  version 502 - 4034/906 cnc 126
OSC Struct Reference

Oscilloscope control. More...

#include <tgm.h>

Public Attributes

volatile uint32_t Control
 Oscilloscope control, written by application.
 
volatile uint32_t Status
 Oscilloscope status, read by application.
 
uint32_t Number_Periods
 Number of periods for one sample, must be written by application.
 
uint32_t Number_Chanels
 Number of channels [ 1 - 32 ], must be written by application.
 
SHARED_MEMORY Memory_Type_Trigger
 Type memory of trigger value, must be written by application.
 
uint32_t Offset_Trigger
 Offset of trigger value [ byte ], must be written by application.
 
uint32_t Mode_Trigger
 Trigger mode 0 = off 1 = rising edge 2 = falling edge, must be written by application.
 
OSC_DATA_TYPE Type_Trigger
 Type of trigger value 0 - 3 = int32_t, 4 - 9 = float64_t, must be written by application.
 
float64_t Level_Trigger
 Trigger level, must be written by application.
 
CHANNEL Channel [N_OSC_CHANNELS]
 all the channels
 
uint32_t Number_Samples
 Number of samples per channel R.
 
uint32_t Actual_Samples
 Actual number of samples per channel R.
 
uint32_t Sample_Time
 Actual time of one sample [us] R.
 
uint32_t Trigger_Start_Position
 

Static Public Attributes

static constexpr uint32_t CONTROL_STOP_RECORDING { 0U }
 Stop the recording by setting the Control item to zero.
 
static constexpr uint32_t CONTROL_START_RECORDING_BIT { 0x01 }
 
static constexpr uint32_t CONTROL_PAUSE_RECORDING_BIT { 0x04 }
 Temporarily pause the recording.
 
static constexpr uint32_t CONTROL_INFINITE_RECORDING_BIT { 0x08 }
 
static constexpr uint32_t CONTROL_STORE_PACKED_DATA_BIT { 0x10 }
 
static constexpr uint32_t CONTROL_PRETRIGGER_MASK { 0xFFFFFF00 }
 
static constexpr uint32_t CONTROL_PRETRIGGER_SHIFT { 8U }
 
static constexpr uint32_t STATUS_READY_TO_CAPTURE_DATA_00 { 0U }
 Values that are valid for Status.
 
static constexpr uint32_t STATUS_CAPTURING_DATA_01 { 1U }
 
static constexpr uint32_t STATUS_WAIT_FOR_TRIGGER_02 { 2U }
 
static constexpr uint32_t STATUS_PAUSE_04 { 4U }
 
static constexpr uint32_t STATUS_INFINITE_RECORDING_BIT { CONTROL_INFINITE_RECORDING_BIT }
 
static constexpr uint32_t STATUS_STORE_PACKED_DATA_BIT { CONTROL_STORE_PACKED_DATA_BIT }
 
static constexpr uint32_t STATUS_PRETRIGGER_MASK { CONTROL_PRETRIGGER_MASK }
 
static constexpr uint32_t STATUS_PRETRIGGER_SHIFT { CONTROL_PRETRIGGER_SHIFT }
 
static constexpr uint32_t TRIGGER_TYPE_NONE { 0U }
 Valid values for Mode_Trigger.
 
static constexpr uint32_t TRIGGER_TYPE_RISING { 1U }
 
static constexpr uint32_t TRIGGER_TYPE_FALLING { 2U }
 

Detailed Description

Oscilloscope control.

Member Data Documentation

◆ CONTROL_INFINITE_RECORDING_BIT

constexpr uint32_t OSC::CONTROL_INFINITE_RECORDING_BIT { 0x08 }
staticconstexpr

set this bit with CONTROL_START_RECORDING to perform oscilloscope-like recording.

◆ CONTROL_PRETRIGGER_MASK

constexpr uint32_t OSC::CONTROL_PRETRIGGER_MASK { 0xFFFFFF00 }
staticconstexpr

For the pretrigger the amount of prior samples can be written to high 24 bits of control. If non-zero and the Mode_Trigger below is also set, the pretriggering is active.

◆ CONTROL_START_RECORDING_BIT

constexpr uint32_t OSC::CONTROL_START_RECORDING_BIT { 0x01 }
staticconstexpr

Start the recording. This bit must be active during any capture, i.e. also with the pause bit, etc.

◆ CONTROL_STORE_PACKED_DATA_BIT

constexpr uint32_t OSC::CONTROL_STORE_PACKED_DATA_BIT { 0x10 }
staticconstexpr

when this bit is set, all the data are stored packed together. Data are always aligned to 4 bytes. In the case of 8 byte data, take care of reading only 4 bytes at a time. The bit can be changed only when during STOP/START sequence.

◆ Trigger_Start_Position

uint32_t OSC::Trigger_Start_Position

Data start when triggering is active. Can be zero for normal trigger or any positive value when pre-triggger is active


The documentation for this struct was generated from the following file: