Automation of Test Procedures using Flowcode 6

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. In the picture below you will see test hardware configuration. First, we have our EB006 Multi-programmer board which is connected to the EB083 Combo Development Board, and the EB013 SPI Board. Attached is a 2208 PicoScope USB Oscilloscope, with Channel A connected to the amplifier output of the SPI board.

20140321_120020_small

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 then 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 abilities 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 program are;

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

Utilising these 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 set 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.

In order to change the text located within the simulation panel the Simulation macro ‘Component-Property-SetValue’. 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, so here we are sending a text 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.

Sim2
Sim3

Sim1 Sim4

 

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 and presents this data on the SoftScope. 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.

Screen1 Screen2 Screen3

 

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. It 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 all our internal test routines to determine whether they are suitable to be upgraded to utilise the benefits offered by Flowcode and test automation.

11,993 total views, 4 views today

Leave a Reply