element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test & Tools
  • Technologies
  • More
Test & Tools
Blog Keithley DMM6500: Script Example - Externally Triggered Measurements
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 24 Jun 2020 3:40 PM Date Created
  • Views 3487 views
  • Likes 3 likes
  • Comments 2 comments
Related
Recommended

Keithley DMM6500: Script Example - Externally Triggered Measurements

Jan Cumps
Jan Cumps
24 Jun 2020

A small script for the DMM6500 to take a number of measurements, triggered by an external signal.

This can be useful when you're automating a test setup. On a production line, on a binning desk, in a setup with a foot pedal, ...

I've deliberately kept the script as simple as possible, to make it easy to grasp.

You get a lot of functionality with just 8 lines of code.

image

 

Let's get straight to business. The TSP code:

buffer_size = 10

app_buffer = buffer.make(buffer_size, buffer.STYLE_STANDARD)
app_buffer.fillmode = buffer.FILL_ONCE
display.activebuffer = app_buffer

trigger.model.load("LogicTrigger", 7, 7, buffer_size, 0, app_buffer)
trigger.model.initiate()
waitcomplete()

display.activebuffer = defbuffer1

 

I've indicated that the script is short. But it could have been shorter.

These two lines work too, but then I'd have nothing to blog about:

trigger.model.load("LogicTrigger", 7, 7, 10, 0, defbuffer1)
trigger.model.initiate()

 

External Triggering

 

The DSS6500 has a Trigger In BNC connection at the backside. It accepts TTL level signals.

You can (as the label indicates) use this input to trigger activities in the DMM6500.

In this case, I want to take a measurement when 5 V appears on that input.

 

image

 

The way to react to the external trigger is to use the LogicTrigger model.

trigger.model.load("LogicTrigger", 7, 7,

 

This trigger strategy allows to trigger on digital I/O signals. If you have the I/O extension card for the meter, you have loads of options.

I don't ave such a card, so only the Trigger In is available as digital I/O. It's known as I/O #7 in the command interpreter.

The load() command also requires an output channel that it'll pulse when the trigger activity is done.

I don't need this here, but the parameter is mandatory. So I selected Trigger Out (also #7). An easy choice because it's the only I/O output available in my basic configuration.

 

The call has 3 more parameters:

trigger.model.load("LogicTrigger", 7, 7, buffer_size, 0, app_buffer)

 

  • the number of times the instrument has to react on a signal on Trigger in
  • wait time after the Trigger In fired
  • the buffer to store the data in (more later)

 

Then you need to activate the trigger model.

trigger.model.initiate()

 

This arms the trigger. It will now perform a measurement each time the Trigger In detects a rising edge.

The result is stored in the buffer I passed as parameter.

 

The last line to complete the trigger behaviour is  a wait:

waitcomplete()

 

The instrument allows to run code while it's in trigger mode. That's useful because you may want to expect results, update screens, do calculations...

But some things you want to happen only after the complete exercise is done. You guard that section with the waitcomplete() command.

The downstream of the script will only be executed when the whole process is done.

 

Application Specific Buffer

 

Although not essential, I prefer to define a dedicated buffer in my script.

There are 2 default buffers that always exist on the DMM6500, and you can use those.

But it's easy to have this little dataset available with exactly the data and format you need.

buffer_size = 10

app_buffer = buffer.make(buffer_size, buffer.STYLE_STANDARD)
app_buffer.fillmode = buffer.FILL_ONCE
display.activebuffer = app_buffer

--

display.activebuffer = defbuffer1

 

At the start of the script, the buffer is defined and we ask the instrument to display the buffer values while measuring.

When all is done, we reset the instrument to show the default buffer again.

A better way could have been to store the buffer that was active before we started the script.

origBuffer = display.activebuffer
display.activebuffer = origBuffer

 

Once the data is in the buffer (10 pulses on the Trigger In connector), the instrument has some nice functions that you can do with the data.

image

You can display it in table form. The little graph top right shows that same data. When you set the cursor in the graph to a specific data point, that line in the table is highlighted.

You can also load that data in the graph display:

image

 

Run it through the histogram view (this is useful when you're matching components, ...):

image

.... and get statistics:

image

 

Additional to that, you can also download the buffer, write it to USB. Or do custom calculations, aggregations within your script.

 

How Did I Test?

 

I've used the Test Script Builder to write and debug the application.

image

You can step through the code, view variables.

To simulate activity on the Trigger In, I used a function generator in TTL mode, set to approx. 1 Hz.

As soon as the trigger model is initiated, it takes a measurement at each rising edge of the TTL signal, then stop after the 10th sample.

The input for the measurement was a fixed 5 V DC power supply.

 

With this little post I try to show that it's easy to start automating things on the DMM6500. Little steps to learn the basics.

 

Related Blog
Keithley Bench Digital Multimeter - Review
Software Control Options Pt 1 - TSP Script Builder, LabVIEW, Web Interface
TSP Script Example - Measure Power
How to Create a Bitmap for a Custom App
Verify a µCurrent Manually
Verify a µCurrent in an Automated Setup
Measure Amp-Hours of a microcontroller with a µCurrent
Trigger from External Trigger Input
Trigger from External Trigger Input in LabVIEW
Software Control Options Pt 2 - Test Commands with Communicator
App to Hold Measurements

Store Multiple Measurements Manually

Script Example - Externally Triggered Measurements
  • Sign in to reply

Top Comments

  • Andrew J
    Andrew J over 5 years ago +1
    Sweet. I'm busy with LabviewNXG creating reusable classes and parts to automate testing using the DMM6500 - unfortunately there are no instrument drivers for the NXG version but to be honest, I'm finding…
  • DAB
    DAB over 5 years ago +1
    Very good update Jan. DAB
  • DAB
    DAB over 5 years ago

    Very good update Jan.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Andrew J
    Andrew J over 5 years ago

    Sweet.  I'm busy with LabviewNXG creating reusable classes and parts to automate testing using the DMM6500 - unfortunately there are no instrument drivers for the NXG version but to be honest, I'm finding it interesting working through the programming and picking up NXG.  I have to get in-depth with the SCPI commands to do it properly.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube