Page 1
Programmer’s Guide
DDS-3X25 USB
Page 2
Content
1. BRIEF............................................................................................................................................1
2. INTERFACE DESCRIPTION.....................................................................................................2
2.1. DDSSEARCH ..........................................................................................................................2
2.2. DDSSET FREQUENCY .............................................................................................................2
2.3. DDSGET MEASURE ................................................................................................................2
2.4. DDSSET SINGLE WAVE............................................................................................................3
2.5. DDSRESET COUNTER .............................................................................................................3
2.6. DDSSET TRIGGER ..................................................................................................................3
2.7. DDSGET DIGITAL IN ...............................................................................................................4
2.8. DDSSET DIOMODE ................................................................................................................4
2.9. DDSSET DIGITAL OUT ............................................................................................................4
2.10. DDSDOWNLOAD ....................................................................................................................5
2.11. DDSCHECK............................................................................................................................5
2.12. DDSSETP OWERON O UTPUT ...................................................................................................5
Page 3
Programmer’s Guide
1. Brief
DDS-3X25 USB offers the agile interface of second time development for
users, and offers examples for many languages and the editor .Users can use
the functions interface in DDS-3X25Dll.DLL to implement all functions of
DDS-3X25 USB, and to be inserted into other auto-measuring systems.
Let’s explain every function interface using VC6.0. Interface of any
language implement complete same functions. It’s used to reference. The
declaration of interface can reference second time development that our
company offers for you. Users pay attention to the questions of the variable
type and address’s transfer.
1
Page 4
Programmer’s Guide
2. Interface Description
2.1. DDSSearch
Description: Search the current computer-connected devices, and
initialization..
Function: Int DDSSearch()
Parameters: NULL
Return: The number of devices connected to computer.
2.2. DDSSetFrequency
Description: Set the frequency of waveform
Function: BOOL DDSSetFrequency(
int index,
double frequency,
int* wavePointNum,
int* TNum
);
Parameters: int index: device serial number
double frequency: frequency
int* wavePointNum: the number of points of the current
waveform to download
int* TNum: The periods of the waveform to
download
Return: If return true ,it express successful operation ,else express
failing operation.
2.3. DDSGetMeasure
Description: Get the value of frequency or counter
Function: BOOL DDSGetMeasure(
int index,
BOOL bFreq,
double* measure
);
Parameters: int index: device serial number
BOOL bFreq: 0: frequency, 1:counter
Double* measure: the value of frequency or counter
Return: If return true ,it express successful operation ,else express
2
Page 5
Programmer’s Guide
failing operation.
2.4. DDSSetSingleWave
Description: Set the type of waveform output.
Function: BOOL DDSSetSingleWave(
int index,
BOOL bSingle
);
Parameters: int index: device serial number
BOOL bSingle: 1: Single waveform, 0: Continuous
waveform
Return: If return true ,it express successful operation ,else express
failing operation.
2.5. DDSResetCounter
Description: Reset the counter
Function: BOOL DDSResetCounter(
int index
);
Parameters: int index: device serial number
Return: If return true ,it express successful operation,else express
failing operation.
2.6. DDSSetTrigger
Description: Set the type of trigger
Function: BOOL DDSSetTrigger(
int index,
BOOL bInter,
BOOL bEdge
);
Parameters: int index; device serial number
BOOL bInter: 1: External trigger, 0: Inner trigger
BOOL bEdge: 0:Rise edge, 1:Fall edge, (Only
effective when external trigger)
Return: If return true ,it express successful operation,else express
failing operation.
3
Page 6
Programmer’s Guide
2.7. DDSGetDigitalIn
Description: Read Digital In ports
Function: BOOL DDSGetDigitalIn(
int index,
unsigned short* In
);
Parameters: int index; device serial number
unsigned short* in: The value of digital in, only low six bits
effected.
Return: If return true ,it express successful operation,else express
failing operation.
2.8. DDSSetDIOMode
Description: Switch the mode of DDS
Function: BOOL DDSSetDIOMode(
int index,
BOOL mode
);
Parameters: int index; device serial number
BOOL mode: 1: Programmable output 0: Generator
output
Return: If return true ,it express successful operation ,else express
failing operation.
2.9. DDSSetDigitalOut
Description: Set the programmable output ports, only affected in
programmable output.
Function: BOOL DDSSetDigitalOut(
int index,
unsigned short Out
);
Parameters: int index; device serial number
unsigned short Out: the value of digital output, only low
12 bits effected.
Return: If return true ,it express successful operation ,else express
failing operation..
4
Page 7
Programmer’s Guide
2.10. DDSDownload
Description: Download waveform to DDS
Function: BOOL DDSDownload(
int index,
unsigned short* buf,
int number
);
Parameters: int index; device serial number
unsigned short* buf: the pointer to the buffer of
waveform int hardware
int number: the size of waveform buffer.
Return: If return true ,it express successful operation ,else express
failing operation.
2.11. DDSCheck
Description: Check the status of the device
Function: BOOL DDSCheck(
int index
);
Parameters: int index; device serial number
Return: If return true ,it express successful operation,else express
failing operation.
2.12. DDSSetPowerOnOutput
Description: Set whether output the waveform when power on.
Function: BOOL DDSSetPowerOnOutput(
int index,
BOOL bOpen
);
Parameters: int index; device serial number
BOOL bOpen: 1: open output waveform when power
on, 0:Close output when power on.
Return: If return true ,it express successful operation ,else express
failing operation.
5