DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

Automation of Test Procedures using Flowcode 6 and a 2208 PicoScope

One of the new features of version 6 is the ability to control 3rd party test equipment through DLL support. In this article we will demonstrate how the use of Flowcode and a PicoScope has improved an internal test procedure for our own developed hardware; the EB013 – SPI E-block (889-2765). In the picture below you will see the test hardware configuration. First, we have our EB006 (889-2747) Multi-programmer board which is connected to the EB083 Combo Development Board (889-2933) , and the EB013 SPI Board (889-2765). Attached is a 2208 PicoScope USB Oscilloscope, with Channel A RS: (749-4948) connected to the amplifier output of the SPI board.

Our existing test procedure of the EB013 utilises a PicoScope connected to our test PC and using the official PicoScope software. Our test engineers are previously required to follow a static script based on a Microsoft Word document. The script guides the test engineer through a series of steps in order to determine whether the EB013 has passed QA testing based on the measured waveforms in the PicoScope software. The test procedure requires the test engineer to decide whether a series of AC waveforms generated by the microcontroller are amplified correctly by the SPI E-block. A potentiometer on the EB013 is used to alter the amplitude of the waveform, which the test engineer must adjust until the waveform reaches the maximum amplitude, without clipping. This test procedure relies on the skill of the test engineer, and their interpretation of waveforms and whether they are acceptable.

The task, therefore, was to create an automated test environment within Flowcode. The aim was to reduce the requirement for a static test script, which can become dated, and also improve the accuracy with which we can test our hardware before it is allocated as saleable stock. This was to be achieved through removing the requirement for personal judgement on acceptable waveforms.

The first step was to configure Flowcode to talk to our 2208 PicoScope, which utilises the PS2000a.dll. The API programmers guide was used to call the necessary functions to talk to the PicoScope for the measurements we required. The PicoScope functions required for this example Flowcode program are;

  • OpenUnit
  • SetSimpleTrigger
  • GetTimebase
  • SetChannel
  • RunBlock
  • IsReady
  • SetDataBuffer
  • GetValues


Utilising these Pico functions, we configured the scope to return a block of 1000 data samples. Placing the necessary DLL calls into a Flowcode macro allows us to repeatedly take a buffer of 1000 measurements and display the data on the SoftScope within Flowcode.

Once Flowcode was configured to talk to the PicoScope, the next step was to create an automated test routine within Flowcode to work in parallel with the PicoScope functionality. Flowcode v6 offers a set of over 300 API commands, which allow users to interface and program the windows side of the Flowcode environment. For example, in this program we were able to change the text displayed within the simulation panel at specific points within the program to provide the end user with dynamic instruction sets on screen.

In order to change the text located within the simulation panel the Simulation macro ‘Component-Property-SetValue’ was used. This API call has three argument parameters to set; first we need to address the handle of the text label we want to change. Second we need to set which parameter we will be changing, here the text. (In this argument we can also change the colour of both the foreground and background, and the font style). Finally, the third argument we send is the value. Since we are updating the text, we send a string to change the message displayed on the screen. Below are several screenshots showing the API calls, and how they change the text label within the simulation panel.

Below are a selection of screenshots from the Flowcode test procedure we created, which demonstrate the use of the automated test procedure. The automated test procedure provides the user with a sequential list of tests to perform in order to QA the E-block. The program monitors the amplitude of the waveform measured via the PicoScope in near real-time and presents this data on the SoftScope within Flowcode. This data is also used to determine the amplitude of the waveform, and whether this amplitude is within a certain acceptable threshold level, removing the requirement for personal judgement. Therefore, the test environment utilises a set of LEDs in the simulation panel to alert the test engineer whether the measured waveform is acceptable. If the green 'Pass' LED is illuminated the test engineer can proceed to the next step. If the red 'Fail' LED is illuminated the test engineer must adjust the potentiometer until the waveform is acceptable. If the engineer cannot create a waveform which passes, the board will fail the test.

Implementing an automated test procedure has removed the requirement for a static text based test script and has allowed for us to create a more aesthetically pleasing test routine, but more importantly one which has also allowed us to remove personal judgement on whether each SPI board has passed the QA test. Over the next few weeks we will be considering our other internal test routines to determine whether they are suitable to be upgraded to utilise the benefits offered by Flowcode and test automation.

 

Flowcode 6 is available directly from Matrix, and more information can be found here.

none

16 Jul 2014, 9:54