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
Forum MULTICOMP PRO MP750065 Function Generator - Programming Pt5: LabVIEW Driver Lib Read, Write and Close blocks
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 0 replies
  • Subscribers 351 subscribers
  • Views 1066 views
  • Users 0 members are here
  • MP750065
  • function_generator
  • labview
  • scpi
Related

MULTICOMP PRO MP750065 Function Generator - Programming Pt5: LabVIEW Driver Lib Read, Write and Close blocks

Jan Cumps
Jan Cumps over 3 years ago

In this 5th post in this Program the Device series I develop a Virtual Instrument Read, Write and Close block.
It's the follow up of MULTICOMP PRO MP750065 Function Generator - Programming Pt4: LabVIEW Driver Lib Init block.
For the MP750668, UTG900C-II, UTG1010 owners: this will very likely work for you too.

image image image  

I'm designing LabVIEW Virual Instrument blocks (Init, Close, basic Read and Write, and some advanced blocks to set and get favourite values, e.g. Set Freq, Get Freq, Set Waveform, ...)
The previous post, with the first block, was detailed. In this one I'm flying over the designs.

Read block design

Read a setting from the instrument.

image

In post #2 I used the raw uci_ReadX() api call. This block does the same, and transforms the dll errors into LabVIEW errors.

The inputs are the same:

  • session in: handle to an open device session
  • timeout in

The outputs have one signal less. The DLL error handling is no longer a status you have to check for.
It's encapsulated and becomes part of the error signal. It's separately handled in the Error block that I describe below.

  • session out: a pass-through of to the UCI session. 
  • data out: the raw 8 bit 
  • timeout out: a pass-through of the input value.


In a design, this is how you'd use this (The double out block will be documented in the next post, but you can see how it works in post #2):

image

All rp@ calls return a 8 bit array that represents a double.
Some other calls (such as IDN? that returns a 54 char string) return a different output.

Write block design

Change a setting on the instrument.

image

In post #2 I used the raw uci_WriteSimple() api call. This block does the same, and transforms the dll errors into LabVIEW errors.

The inputs are the same:

  • session in: handle to an open device session
  • command string that includes channel, parameter and value, all correctly formatted please
  • timeout in

The outputs have one signal less. The DLL error handling is no longer a status you have to check for.
It's encapsulated and becomes part of the error signal. It's separately handled in the Error block that I describe below.

  • session out: a pass-through of to the UCI session.
  • timeout out: a pass-through of the input value.

In a design, this is how you'd use this:

image

Close block design

Close the active instrument session, close all handles and release memory.
Call this at the end of your flow, to allow other programs to use the instrument.

image

In post #2 I used the raw uci_Close() api call. This block does the same, and transforms the dll errors into LabVIEW errors.

The input is the same:

  • session in: handle to an open device session

In a design, this is how you'd use this:

image

What you can see in each of these blocks, is that I was able to reuse the dll-to-LabVIEW error handling block in all of my new blocks.
This is an efficiency booster during design and test. Once that block is known to work correctly, you can just rely on it and save brain space.

Here's a flow that uses all of these blocks:

image

Next post: the high level functional blocks that know how to talk to a channel and understand the instrument's registers.

Related blog:

MULTICOMP PRO MP750065 Function Generator - 1st impressions
Programming Pt1: SDK Demo
Programming Pt2: LabVIEW tryout (a)
Programming Pt3: LabVIEW tryout (b)
Programming Pt4: LabVIEW Driver Lib Init block
Programming Pt5: LabVIEW Driver Lib Read, Write and Close blocks
Programming Pt6: LabVIEW Driver Lib: High Level Functional blocks
  • Sign in to reply
  • 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