The work was to be done in groups of 2 and we had the opportunity to choose what instrument we would use. The choice was basically between a TDS210 Oscilloscope and a random multimeter which I don't remember the brand and model anymore.
The choice was a little unfair, since the oscilloscope had much more functionalities than the multimeter, but since I love challenges, me and my colleague Fábio Guerreiro, opted for the oscilloscope. Our teacher told us that we didn't need to capture the graph, to be more fair, but he also said that no one of his students ever made the virtual oscilloscope with the graph before. Me and my colleague looked at each other and thought "Challenge Accepted!". We knew from that moment that we wanted to do this work properly.
This was the oscilloscope we were "virtualizing", the Tektronix TDS210:
I'm not going into details about the programming because it's quite complex and extensive but I'll present the results. Here is the main looks of our application:
Since we didn't have much time, we decided to keep it simple and functional, so we separated the different oscilloscope menus with the following tabs: Main, Trigger, Measure, Cursor and Display. Additionally there were 2 buttons on the top right corner: About and Stop.
The Stop button stops the application, while the About button shows a small window with informations about this work:
To test it, we used the oscilloscope's calibration terminal, which is a 1 kHz square wave signal, and we also used a function generator producing a 1 kHz triangular wave. Each of these signals was connected to a different channel:
On the Main tab of the virtual instrument, we put all the general commands like the vertical and horizontal position and scale, as well as the channel options like coupling, probe gain, signal inversion, among others, there was also available the "math" option for the channels. The GPIB address is also configured here, in this case is the address 12:
All tabs have the communication button on the bottom, sometimes called "send" other times "receive" (in Portuguese). The Main tab however, has also a second communication button for the "Autoset" function. The graph is updated when the communication button or the autoset button are pressed.
The Trigger tab has all the trigger functions, like the slope, the source, the mode and the coupling:
When the communication button (Enviar) is pressed, the commands on the current tab are all sent to the scope, which then changes its configuration. This is valid for all tabs.
The Measure tab allows us to get the different values of each channel, like frequency, period, mean value, RMS value and peak to peak voltage:
In this case the communication button is called "Receber" (receive) since it's not changing any configuration on the scope, instead is just asking for information.
The next tab is the Cursor. Here you can determine values for specific intervals. To help understand the location of the cursors, we added this functionality on the graph, that allows you to drag a line to the desired location. The current position will be noted on those text box beneath the graph. For example, in the next image, if you look closely, the line was dragged to the base of the channel 1 wave, its position value is indicated on the box beneath the graph with the name "Tensão" (Voltage) with the values 0 and 2 for X and Y, respectively. What we want is the Y value, since we're calculating voltage, so we can copy the value 2 to the text box on the cursor tab on the right, either for cursor 1 or 2 as desired:
The same can be done for the time axis.
The final tab is the Display tab. Here we can change basic settings of the oscilloscope, like the data format and contrast for example:
In the image above, you can also notice that when the application is communicating with the oscilloscope, the "Busy" LED comes on.
Now let's take a look at the block diagram. We organized it like this to be easier to understand, to export and print. Each one of the white blocks on the right, is a separate function that we created, to simplify the design:
- Main programming;
- Trigger programming;
- Display programming;
- Cursor programming;
- Measure programming;
- Graph programming;
This work was done using LabVIEW 7, and of course the fundamental tool: the oscilloscope communication manual.
The application was developed in Windows 7 and tested on a Windows XP computer with a GPIB card. It must be noted that, the computer Language/keyboard configuration should be set as English, or similar, because of the punctuation system, otherwise there might be a confusion between points and commas, and the requests won't affect the oscilloscope properly.