Loading [MathJax]/extensions/Safe.js

Author Topic: Automated Testing  (Read 14930 times)

0 Members and 1 Guest are viewing this topic.

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Automated Testing
« on: June 25, 2012, 09:20:16 am »
Just joined EEVblog forum today and I have a question already!

I'm setting out to automate some hardware testing.  This will involve simulating external input(s) as well as monitoring output(s) of the DUT.  These I/O will be serial comms, contacts, voltages, pulses, etc.

For example, the PC may send out some serial data and then check (or log) how the hardware responded or time an event, etc.  There would need to be some sort of scripting to drive the events and judge the results.

Writing the PC software should be possible for me, but I was interested to see if such software already exists apart from Labview which seems to be > $3000 for the event driven version.  If so, is there a standard interface method?

The plan is to develop hardware and software plugins as the need arises and have them integrate on a common platform.
 

Offline Thomas

  • Regular Contributor
  • *
  • Posts: 136
  • Country: no
Re: Automated Testing
« Reply #1 on: June 25, 2012, 05:04:09 pm »
For automatic testing, http://www.ni.com/modularinstruments/ is used a lot.

But, as you have discovered, prices are not hobbyist-friendly.
There are ways of accomplishing something like this at a lower price, though. Using standard instruments with more traditional computer interfaces (USB, RS-232 etc.) would be a good start.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28692
  • Country: nl
    • NCT Developments
Re: Automated Testing
« Reply #2 on: June 26, 2012, 12:21:48 am »
There are many cheap PLC systems on the market. From these its easy to build an automated test system without much programming.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #3 on: June 26, 2012, 12:59:32 am »
I am looking at a PC based system as I want to output many different types of data / signals.  Serial comms, DMX, E1.31 streams, contacts, voltages, pulses, etc.

Though I have already written quite a few software tools, a lot of them overlap in functionality and I can see that a more universal approach could be better.

Coming up with a somewhat common API for USB interfaced hardware is one area that I need to look hard at.

I've just downloaded the evaluation version of LabVIEW to see if that's a viable option of if it gives me ideas on the direction to take.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8549
  • Country: us
    • SiliconValleyGarage
Re: Automated Testing
« Reply #4 on: June 26, 2012, 02:46:23 am »
Forget USB if you need a standards based tests system then LXI is the way to go. plenty of manufacturers have machinery that has LXI on board. you can easily find pattern generators to do all your digital work in the form of a PCI or PCI-x card that you can drop in a standard pc. Installing VISA , either from National instruments or Agilent, then gives you a uniform way to access any kind of test equipment, whether GPIb , LXI , USB , Serial ,printeport or anything else.

The Visa API exposes a visa class. you instantiate the VISA core and pull the instruments as objects. in a few lines of code you control all the machinery you want.
I have large automated testsystems that run automatic test for device validationa nd characterisation. it's just a couple of 19 inch racks full with stuff from Agilent / keithley , or sometimes even simply a bench setup. some of the stuff sits on USB most on GPIB and some scopes go through the network.

As for development system : Visual basic express 2010. Don't laugh at it. It serves me well. It's free , code development is a snap. Most examples in the programming manuals of test equipment are given in basic anyway ... if an unexpected event happens i can go in break mode and drive it from the interactive window. Been running for years without a single hiccup.


Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #5 on: June 26, 2012, 03:13:37 am »
I don't wish to go with anything that requires adding cards inside a PC.  This is for use on various desktop and laptop PCs.

The reason I am thinking USB as it's easier (for me at least) to develop hardware for than Ethernet.  Creating various modules with with USB interfaces would be within the grasp of many more people.

As for PC software, I use Delphi on an almost daily basis so I'd probably develop in that.  The plugins could be done as dll's though.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8549
  • Country: us
    • SiliconValleyGarage
Re: Automated Testing
« Reply #6 on: June 26, 2012, 03:41:58 am »
fine, VISA can be called from delphi as well. no problem.
it wan't clear that you want to develop hardware a well. i though test system as in buy a bunch of test equipment connect it together and focus on the test scripts...
if you do USB ... make sure you isolate everything !
Real testquipment has isolation....
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #7 on: June 26, 2012, 04:31:44 am »
No problem.  As per my first post, I am willing (and able) to develop the custom hardware as well.

Isolation of the signal side from USB is a given, though I should have said it explicitly I guess.

Coming up with my own API will be a challenge, but at least that's easy to change in firmware / software.   :)
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Automated Testing
« Reply #8 on: June 26, 2012, 06:57:56 am »
No problem.  As per my first post, I am willing (and able) to develop the custom hardware as well.

Isolation of the signal side from USB is a given, though I should have said it explicitly I guess.

Coming up with my own API will be a challenge, but at least that's easy to change in firmware / software.   :)
You definitely can set up some automated test without spending big $$$'s.

You will probably need to set up some kind of dual pole relay matrix. Always try and add series resistors wherever possible. Also add protection for your instruments, particularly signal sources. You are testing faulty boards, and that means that the nodes you are testing can easily have a big fault like a short to a power rail. You have to make sure that the autotest hardware can survive the board faults.

A big issue you will have is convincing everyone that the autotest measurements are accurate, particularly if every second board fails marginally. People are more like to believe the results of a high end Agilent meter attached to the test system, then your own micro-based A/D board. Definitely keep a reference test board along with the test jig. This is a board that has the bench test results recorded, and it is used to verify that the autotest jig is working correctly. It is really important that you can work out very quickly if production boards are failing, or if the Autotest hardware has a problem, like a stuck relay.

Richard.

« Last Edit: June 26, 2012, 07:08:12 am by amspire »
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #9 on: June 26, 2012, 08:51:50 am »
There is no issue with result certification in my case.  The testing is for in-house use and I own the company!   ;D

My main use is to poke the DUT with data and check that it's doing the right thing(s).  It will get used during product development just as much as post manufacture testing.

The design of the DUT side of the interfaces is not a problem.  I've been a board designer for many years (over 700 PCB designs so far) so that's reasonably trivial for me.

What I do need to get a handle on the the best way to do the PC side of the interfaces (addressing, protocol, etc) and how to approach the PC software design.  I want to make it as extendible as possible as well as easy to set up tests.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Automated Testing
« Reply #10 on: June 26, 2012, 10:09:56 am »
There are many cheap PLC systems on the market. From these its easy to build an automated test system without much programming.
friend... example pls... the best that you know.

Quote
Writing the PC software should be possible for me, but I was interested to see if such software already exists apart from Labview which seems to be > $3000 for the event driven version
how do you like if its a handheld standalone instrument, can communicate/controlled to PC by USB. costing maybe somewhere $100-500? i'm thinking a project of somesort similar like this, but very early stage and it looks not easy, the logic and hardware... but if you still thinking of PC based, then you should "know it all" the many comm protocols and work around to make your project more generic.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28692
  • Country: nl
    • NCT Developments
Re: Automated Testing
« Reply #11 on: June 26, 2012, 10:34:44 am »
There are many cheap PLC systems on the market. From these its easy to build an automated test system without much programming.
friend... example pls... the best that you know.
For example:
http://www.xlogic-plc.com/
http://www.aboutplcs.com/
http://www.starting-point-systems.com/specs.html
Quote
Quote
Writing the PC software should be possible for me, but I was interested to see if such software already exists apart from Labview which seems to be > $3000 for the event driven version
how do you like if its a handheld standalone instrument, can communicate/controlled to PC by USB. costing maybe somewhere $100-500? i'm thinking a project of somesort similar like this, but very early stage and it looks not easy, the logic and hardware... but if you still thinking of PC based, then you should "know it all" the many comm protocols and work around to make your project more generic.
I've been down this road. In many cases I just want to repeat the same test for a long time to see if a circuit keeps working. I found out that if I have some relais to switch a circuit on/off, change loads etc and a dual channel AWG with digital outputs (like a Lecroy LW420) I could cover 99% of my test needs without trying to re-invent the wheel. The PLC can generate logic signals, analog levels, measure analog levels (pass/fail) but its not fast. With the AWG I can create fast signals and digital patterns like serial, SPI and I2C. By using triggering and marker outputs I can make them work together. I could include a scope to do pass/fail testing on signals.

If making hardware is fun to you (raise your hands... Okay I see a lot of hands... thank you) then try to put your energy into a novel new product you can sell or learn something new. That time is much better spend than trying to make trivial stuff.
« Last Edit: June 26, 2012, 10:37:07 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #12 on: June 26, 2012, 10:40:17 am »
I am envisaging a collection of interface modules (contact I/O, Serial, etc) all connected back to the PC via USB.  How many and what type of module would be dependent of the task at hand.

There would be some low cost test equipment already out there with comms capabilities (DMM, etc) and the rest would need to be scratch built.

If I had a huge budget, I'd just buy LabVIEW and $100K of shiny new equipment.  I don't, so the DIY approach with incremental capabilities is the way I'll have to go.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28692
  • Country: nl
    • NCT Developments
Re: Automated Testing
« Reply #13 on: June 26, 2012, 12:36:20 pm »
Again, if I where you I'd look very closely to available modules and PLCs! What you want isn't very special.

The 'not invented here syndrome' can be very expensive. My former boss suffered from that severily. For instance he insisted on designing a relais board for a one-of project and writing our own project management system. All because he didn't want to learn / understand something build by others. Its money and time down the drain.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Automated Testing
« Reply #14 on: June 26, 2012, 08:22:45 pm »
For example:
http://www.xlogic-plc.com/
http://www.aboutplcs.com/
http://www.starting-point-systems.com/specs.html
i will look at the 3rd option, the 2nd is look expensive. the first one i've came across, its expensive. thanks for your suggestion.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28692
  • Country: nl
    • NCT Developments
Re: Automated Testing
« Reply #15 on: June 26, 2012, 08:59:17 pm »
The ELC12 economy version of Xlogic is very affordable. Only the analog output modules are quite expensive though. Here is a pricelist (excluding VAT): http://www.plcshop.nl/xlogic-prijslijst.htm
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #16 on: July 02, 2012, 09:26:26 am »
Now that I have a Rigol DS1022 signal generator on the way, I've been thinking about a standard way of interfacing with it and other (possibly DIY) items.

I know very little about LabVIEW and VISA drivers so far.  Is it realistic for a reasonably competent programmer to write VISA compatible drivers?

EDIT: Grammar error.
« Last Edit: July 05, 2012, 10:15:20 am by David_AVD »
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Automated Testing
« Reply #17 on: July 02, 2012, 04:41:36 pm »

I know very little about LabVIEW and VISA drivers so far.  Is it realistic for a reasonably competent programmer to write VISA compatible drivers?

Writing drivers? That is the job of the device manufacturer and the VISA implementation supplier (for standardized protocols). VISA is an API that then shields you from many device details, and you are supposed to program on top (applications), not below (drivers), of VISA.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #18 on: July 02, 2012, 09:40:48 pm »
Yes, I am talking about writing drivers for DIY test equipment or controllable equipment that doesn't have a VISA driver.

I'm only at the start of my VISA and IVI investigations but I think* I understand how it basically works.

* could be totally wrong!  :D
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8549
  • Country: us
    • SiliconValleyGarage
Re: Automated Testing
« Reply #19 on: July 02, 2012, 11:35:29 pm »
you don;t need to write a visa driver. that is the key behind visa.
VISa is a gateway manager. that does two things
1) it provides the application programmer with a pipe to the machine.
2) it provides the instrument maker with a transport bus of choice. rs232 , gpib , lxi , lan.

all messages being thrown in to the pipe are plaintext ASCII following the SCPI commandset.

if you make a system that exposes a serial port ( over usb for example ) you can plug this in the computer. tell visa to connect to COMx and off you go. as an instrument mker you only have to implement a command parser that can read ascii streams terminated by a LF or CRLF pair , parse them and respond.
the absolute must-be-implemented commands are the ones that begin with a * in the SCPI commandset. the rest is up to you.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #20 on: July 02, 2012, 11:46:02 pm »
Ah, I understand now.  Thanks for that.   :)
 

Offline thmjpr

  • Regular Contributor
  • *
  • Posts: 178
  • Country: ca
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8549
  • Country: us
    • SiliconValleyGarage
Re: Automated Testing
« Reply #22 on: July 03, 2012, 05:05:25 am »
Essentially what VISA does is probe all the ports of the computer ( usb , gpib , ethernet, serial , printeport )  and figure out what is there. it does this by sending the *IDN? command to which a machine must reply with its manufacturer name, model number and firmware / hardware revision

As an application programmer you simply tell VISA 'there should be a machine at ::USB0:DEV0:VID3476:PID2341' or ::COM3::DEV0 or ::GPIB0:DEV22:
visa will poke around , and if a machine is found it will give you a 'handle'. This is a 32 bit number.

so you create

int32 my_voltmeter = Visa_Open("::USB0:DEV0::VIs...")

visa_write (my_voltmeter,":DISP:TEXT 'hello world'")

in object oriented languages you can do this :

dim my_voltmeter as new VISA_instrument( "::blabla::)
my_voltmeter.send ":disp:text 'hello world'"

VISA has all the protocols and transport mechanisms and can talk GPIB , LXI , PXI , VXI , MXI , whatever you want. it is a true 'pipe'
as an application programmer you throw in an ascii string and VISA cooperates with the hardware, the hardware drivers  (like ethernet drivers , gpib board drivers etc ) to get the string sent to the endpoint.
You as a device simply get a string. when you have something to say you just send it back and done.

VISA has an internal API toward the GPIB boards . a GPIB board aker needs to provide a VISA driver. The instrument maker doesn't need to do that.

VISA is available from either national instruments or Agilent. In general if you buy a GPIB board from either one they give you a runtime licence for VISA. You can also purchase VISA without such a board.

I have 'objectified' all my testequipment.
i can very quickly make testprograms. There is a number of base classes like 'multimeter' , 'supply, ' scope, ' generator' ,'spectrumanalyzer' etc. Each has subclasses that are instrument specific and extend/overload the base class.

i can write testprograms in Visual basic like this

Code: [Select]
dim dvm as new HP34401 (gpib22)   ' give a voltmeter
dim vdigital as new HP3432(GPIB7,2)  ' gpib adress 7 channel 2 of the supply
dim vanalog as new hp3432(gpib7,1) ' gpib adress 7 channel 1 of the supply
dim device as new chip_under_test ' gvive me a chip to test
dim dac7 as new device.register(&h307) ' bind this to a register located at adress 307 in the chip
dim document as new xl.workbook ("logfile.xls") ' ope a excel logbook
dim sheet as document.sheet ("sheet1") ' grab a sheet
dim chamber as new Tenney310(gpib4)

vanalog.voltage=3.3
vanalog.current=0.1
vanalog.output=true
vdigital.voltage = 1.8
vdigital.current = 0.5
vdigital.output = true.
dvm.measure = voltsdc
dvm.range = volts3

sheet.rowcol("A1") ="Testsweep"
sheet.nextrow
for temperature = -25 to 125 step 25
  chamber.temperature = temperature
  chamber.soak  ' this waits for the chamber to settle
  for sweep = 3.0 to 3.6 step 0.3
    vanalog.voltage = sweep
     for x = 0 to 1023
        dac7.value = x
      result =  dvm.read
     sheet.addrow (temperature  & "," & sweep & "," & x & "," & result)
   next x
next sweep
next temperature


I have a framework where the instrument connections are defined in a file called 'benchsetup.bas'. Since the equipment on a bench is static i only need to focus on writing my code.
a coupe of lines of nested for-nexts bobmbar excel with a table of data.

I have excel spreadsheet templates for all kinds of plots . the graphics are pre-made in excel. all the script does is update the table. you see the excel plot change in realtime as the measurement is running.

Since the script calls the correct spreadsheet i don't even have to worry about that. i haev a library of 'golden' scripts with their accompanying excel files. if i need that kind of sweep i simply open that project and run it . the script asks me for a new filename , copies the golden excel file to that filename and then plumps the data in there. by the time i am back in my cubicle i can remotely open the output file through the network.

Since we run vnc i can actually launch teh test form my cubicle , do something else while is keep an eye on the screen to see if all is well.
i have links to matlab as well. There is even powerpoint files with links to the embedded exel sheets.
If the boss asks me to prepare a new plot of a dac and prepare a few slides for this afternoons presentation i simply open Visual Basic Express ,run the script and set the filename. when done the slides are created uncluding time dat , who did the test , sample number and everything. I don't even get up... unless i need to go to the lab to change a chip ... we don't have an ATE handler ... -yet ---  ;D
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #23 on: July 05, 2012, 10:25:10 am »
I've installed the NI VISA software and plugged my Rigol DG1022 into a convenient USB port.  The DG1022 was detected correctly and Device Manager shows it under the USB Test & Measurement Devices section.

If I were to design my own USB interfaced instrument (with suitable parser), what type of USB driver is best?  For example, could I use an FTDI USB chip and have the VISA interface connect to it?
 

Offline David_AVDTopic starter

  • Super Contributor
  • ***
  • Posts: 2878
  • Country: au
Re: Automated Testing
« Reply #24 on: July 05, 2012, 10:38:48 am »
Hmmm... I may have (partially) answered my own question.

There's a Driver Wizard as part of the NI VISA software.  Plugging my FT232RL based USB-RS485 interface in and selecting it in the driver wizard allows me to create a inf file.

So it seems like I should be able to use either the FTDI USB chip or a USB enabled PIC and create suitable inf files for the VISA software to use.

I'm guessing that I'll have to be careful with using the generic VID/PID as using the VISA inf file will prevent other devices using the FTDI USB chip from being used normally (non VISA).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf