DSCCR
Structure Definition
public struct DSCCR
{
public byte control_code; /* [INPUT] Counter command byte.- Refer Board manual for specifics */
public byte counter_number; /* [INPUT] Counter number to which the settings are being applied. */
public uint counter_data; /* [INPUT] Data to set the counter to */
public DSCCS counter0; /* [OUTPUT] Counter 0 data read */
public DSCCS counter1; /* [OUTPUT] Counter 1 data read */
public DSCCS counter2; /* [OUTPUT] Counter 2 data read */
public byte control_bit; /* [INPUT] Used in conjunction with control_code */
/// DSC_DIO_PORTS_MAX=8
[System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = System.Runtime.InteropServices.UnmanagedType.Struct)]
public DSCCS[] counter; /* [OUTPUT] Counter 2 data read */
public int CtrClock; //Clock source, must be 2 or 3 (see FPGA specification for usage)
public int CtrOutEn; //1= enable output onto corresponding I/O pin; 0 = disable output
public int CtrOutPol; //1= output pulses high, 0 = output pulses low; only used if CtrOutEn = 1
public int CtrCountDir; /*0 = down counting, 1 = up counting*/
public int CtrReload; /*0 = one-shot counting, 1 = auto-reload (repetitive counting, only works in count down mode)*/
public float Rate; // Desired output rate, Hz
public int ctrOutWidth; // 0-3 0 = 1 clocks, 1 = 10 clocks, 2 = 100 clocks, 3 = 1000 clocks , only used if CtrOutEn = 1 and CtrClock = 2 or 3
public int CtrCmd; /*Counter command, 0-15 (see FPGA specification for available commands)*/
public int CtrCmdData; /*Auxiliary data for counter command, 0-3 (see FPGA specification for usage)*/
public float ActRate; //Actual rate resulting from the closest divisor available for the desired rate
public int Start; //0 = don’t start counter after configuration; 1 = start counter after configuration
public int GateEn; //0 = no external gate; 1 = external gate enabled in RMM1616
}Structure Members
Last updated
Was this helpful?