Note: at present, VISA library has been added.
4. Add the Text, Edit and Button controls as shown in the figure below.
5. Add the control variables.
Open the Member Variables tab in View→ClassWizard and add the following
three variables: Instrument address: CString m_strInstrAddr
Command: CString m_strCommand
Return Value: CString m_strResult
6. Encapsulate the read and write operations of VISA.
1) Encapsulate the write operation of VISA for easier operation.
bool CDemoForDGDlg::InstrWrite(CString strAddr, CString strContent) //Write
//operation
{
ViSession defaultRM,instr;
ViStatus status;
ViUInt32 retCount;
char * SendBuf = NULL;