LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recommended Design Pattern in LabVIEW for SCPI Communication with Measurement Instruments

Hi everyone,

I have a question regarding which design pattern in LabVIEW is best suited for communication with measurement instruments using VISA. Specifically, I am working with various Keithley, Keysight instruments, power supplies, etc., that use the SCPI language for communication. I am looking for recommendations on which design pattern to learn and use for applications that, while not overly complex, require a responsive UI for the user. The UI should allow for switching functions of the measurement instruments and, of course, include data logging to a file, either in CSV or TDSM format. Additionally, I would like to simultaneously handle data logging in the background while independently displaying measured data in real-time on the UI.

 

I have some experience with patterns such as Producer-Consumer and Event-Driven State Machine. However, I need guidance on which pattern, any pattern, would be best to learn and implement for this specific use case. I have read various information on the internet and forums, but I am still uncertain which design pattern to use. Moreover, I haven't come across any examples in these patterns that handle VISA instrument communication along with data logging.

 

Could you please guide me on which design pattern would be most appropriate to start learning and using for these types of applications?

 

Thank you!

0 Kudos
Message 1 of 4
(302 Views)

What you are describing is not even remotely "specific".  Communicating with SCPI instruments, displaying data and logging results to file is the primary use for LabVIEW and probably accounts for over 90% of all LabVIEW programs.

 

Short answer:  Use a State Machine.  It's the meat and potatoes and will handle most tasks.

 

If you have lots of different instruments which perform a variety of functions, learn some OOP.

If you want to dive deeper into a very generalized HAL-based test station, get into the Actor Framework.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 2 of 4
(253 Views)

What is the goal of your application? to enable users to log data from various instruments?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 3 of 4
(231 Views)

Take a look at DQMH.

 

Install it and take a look at the Continuous Measurement and Logging (CML) Example

 

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
Message 4 of 4
(223 Views)