Necessary software download links
Installation of Software and Connecting that to the tools
- Install the Keysight Connection Expert
- Install the M8195A soft front panel
- To add the chassis (M9502A) to the Instruments List in the Keysight Connection Expert Software for the first time
- Connect the chassis with the PC with the USB port.
- Turn on the chassis or the power button at the front.
- Then, turn on the PC, after that go to the software.
- There, hit Add in the My Instruments tab, and then LAN Instrument. If your device M9502A is connected to your PC, the device should show up. Hit on that option.
- After you add the chassis for the first time, it’ll stay there in the My Instruments list. If there is a green check mark, it indicates that the hardware is connected. If not, you might need to restart the software, or maybe the PC.
- To send signals from the M8195A soft panel
- Open the M8195A soft panel, uncheck the Simulate option.
- Select the device in the list, it should be readily available there. If it’s not, you may need to restart the PC.
- Hit Connect.
- To generate a standard waveform in the AWG, go to the Standard Waveform tab, then edit the Basic Waveform Parameters as per your application.
- Go to the Output tab, check the Enabled option in Channel 1.
- Go to the Sequence/Control tab, hit Send to Instrument.
- Hit Run button at the bottom.
- If you want to change the signal or the signal specifications on the fly, just change them in the Standard Waveform option, and hit Send to Instrument button.
Controlling the AWG through the MATLAB class ClassAWG created by Dr. Dima
- Creating an object from an existing class in MATLAB, for example, ClassAWG
- obj.AWG = ClassAWG.getInstance()
- To connect the AWG with MATLAB
- obj.AWG.connect() This command will activate the Dual Channel with Markes mode in the AWG
- If you only plan to use one channel, then it’s better to connect only with one channel by writing the following command:
- obj.AWG.connect(1) This command will activate the Single Channel with Marker mode in the AWG
- If you do that for the first time in your PC, it shows an error about VISA. After googling that error, we found that we need 2 additional softwares to be installed. These are:
- R&S VISA (Rohde & Schwarz)
- National Instruments (NI) Visa
- You don’t need the Keysight Connection Expert software open for connecting to the chassis. After turning on the machine, wait a bit for the Access LED to turn green, and the M8195A Soft Panel software will recognize the tool.
- You need the M8195A soft front panel software open in order to control the AWG by MATLAB
- If you have already connected to the AWG, and then delete the object that has been already been created for some reasons, you have to reopen both (or maybe not both, just for the sake of mental peace let’s say) the M8195A Soft Panel and the MATLAB.
- Example Code (Square Wave): Let’s say you want to create a square waveform in channel 1 on the AWG:
- Times = [500, 1000]; % The default time scale is ns
- Types = {‘dc’, ‘dc’};
- Params{1}.Offset = 0;
- Params{2}.Offset = 1;
- SignalVec = obj.AWG.CreateWaveform(Times, Types, Params, 1);
- Segment{1} = SignalVec;
- obj.AWG.UploadSegment(Segment)
- obj.AWG.RunSegment(Segment)
- To terminate the connection with the AWG, type:
- obj.AWG.CloseConnection()
- Example Code (Sinusoidal Wave):
- EndTime = 10; %Corresponding to the period of 100 MHz signal, default time scale is ns
- Types = {‘cos’};
- Params{1}.Offset = 0;
- Params{1}.Amplitude = 1;
- Params{1}.Frequency = 100e6;
- Params{1}.Phase = 0;
- Params{1}.Frame = ‘lab’;
- SignalVec = obj.AWG.CreateWaveform(Times, Types, Params, 1);
- Segment{1} = SignalVec;
- obj.AWG.UploadSegment(Segment)
- obj.AWG.RunSegment(Segment)