When writing a measuring program, you can use Spectrum Viewer as your data display with DDE. First save the data file, open a DDE connection to Spectrum Viewer and tell it to open the file automatically. Working this way has two advantages:
Your file has to be saved in order for SV to open it, so the data is already safe on disk when you see it displayed
You can instantly use all powerful SV features (smoothing, spike elimination) on your data
When opening a connection to SV, use the following parameters:
Server
name: "SV Server"
Topic: "SV Client 1"
Commands supported by the server:
SelectDS
(+ ds#,ds#,ds#)
SelectOneDS (+ ds#)
DeSelectDS (+ ds#)
GetSelectedDS (+ ds#)
GetDSInfo (+ ds#)
GetCursorPos
FileOpen
(+ file)
FileOpenAndDelete // opens a file and deletes it after opening (for temporary files)
FileClose // closes all data sets that came from the file
FileCloseSelected // closes all data sets that are selected
FileCloseAll // closes all data sets (ctrl-Q)
FileDelete // closes all data sets from a file and deletes it
FileLoadSession // loads a new session and deletes the current one
FileLoadSessionStyles // loads a new session and deletes the current one
FileSaveSession // saves the current session to a file. If you want
FileSaveSessionAsk // saves the current session to a file with file selection popup
EditUndo
EditCopyClipXYXY
EditCopyClipXYYY
EditCopyClipYYYY
EditPasteClipXYXY
EditPasteClipXYYY
EditPasteClipYYYY
EditMoveDS
EditSelectAll
EditDeSelectAll
PositionShiftX
PositionShiftY
PositionMultX
PositionMultY
PositionDivX
PositionDivY
PositionNormY
AverageAll
SmoothResample
SmoothResampleSourceYRep
SmoothResampleSourceYSrc
AnalyzeSubtract2Plots
(+ sourceDS1,sourceDS2,destDS)
AnalyzeAdd2Plots
AnalyzeMultiply2Plots
AnalyzeDivide2Plots
ViewZoomAutoscale // Auto scales (same as F5)
I have
included a C example file you
can use as a starting point to connect your own program with Spectrum Viewer.
To test DDE functionality, you can use the DDETest.exe program that is installed in the SpecView folder.
If you set "Show DDE communication info" in the help popups section of the SpecView.ini file to 1, Spectrum Viewer will open an extra window with the DDE communication, so you can test what SV receives over DDE.