Instrument Control module

May 16, 2017

This post demonstrates how to get data from a measuring instrument in Scilab and display it using Equalis software. The pre-requirements are given below for this demo.

 

Pre-requirements

 

  • NI-VISA Software[1]

  • Scilab[2]

  • Equalis Instrument Control Module[3]

  • Rigol DS4024 Digital Oscilloscope[4]

  • Microchip MPLAB X[5]

  • Microchip MCLV Board and the associated BLDC Motor[6]

  • Microchip ICD 3 In-Circuit Debugger/Programmer[7]

 

At this point, please have a look at the blog post Embedded Coder Module [8], because we will use the system described in it as signal sources

 

Equalis Instrument Control Module[3] VISA[9] functions are given below which will be used in this demo

 

  • VISA_open(visa_id , resource_descriptor)

This function opens a VISA session

  • VISA_write(visa_id, text_message)

This function sends a text_message to the instrument connected with the visa_id

  • data = VISA_read(visa_id, buffer_size)

The function reads the data from an instrument after a command is sent to the instrument with VISA_write()


 

SCPI[10] commands of Rigol DS4024 Digital Oscilloscope[4] are given below which will be used in this demo

 

  • *IDN?

Return instrument id

  • :MEASure:VAVG? CHAN

Return average value of signal on selected channel

  • :MEASure:PERiod? CHAN

Return period of signal on selected channel

  • :WAV:MODE Mode

Select waveform reading mode

  • :WAVeform:FORMat Format

Select waveform return format

  • :WAV:SOURce CHAN

Select source channel to read waveform

  • :WAVeform:DATA?

Return waveform from previously selected channel by :WAV:SOURce


Perform Demonstration

 

Now we assume that Microchip MCLV board was loaded with the program as in the blog Equalis Embedded Coder Module Part 2 – Sensored Brushless DC Motor Control[8]

 

Overall system can be seen on Fig.-1

 

Figure-1 Overall system

 

 

Rigol DS4024 Digital Oscilloscope[4] is connected with USB and it can be checked if it is functional via NI MAX Measurement and Automation Explorer[1]. The instrument descriptor can be seen on Fig-2.

 

Figure-2 NI MAX Measurement and Automation Explorer

 

 

Now we can connect the instrument via connection GUI. This GUI can be found the demos in Equalis Instrument Control Module[3].

 

After start the GUI, two GUI will be opened, Connection GUI and Main GUI as in Fig.-3. We select connect item from the menu on Connection GUI, and enter instrument descriptor obtained from NI MAX[1], click OK then enter a VISA session ID between 1-30. Then instrument will be ready to data acquisition.

 

Figure-3 Connection GUI and Main GUI before connection

 

 

Now we can go to Main GUI, we selected to be displayed channels via check-boxes, and enter VISA session ID previously entered on Connection GUI. Now click Start button, we can see data on the GUI as displayed in the screen of the oscilloscope as in Fig.-4.

 

Figure-4 Connection GUI and Main GUI after established connection and data acquisition


When we click Stop button, data acquisition will be terminated and measured values will be stored in a file and in Scilab[2] Workspace. This data can be used for further analyzes or plotted.

 

A demo can be found like that in that blog on demos in Equalis Instrument Control Module[3]. Also you can find a demo regarding Embedded Code Generation in Equalis Xcos Coder and Embedded Coder Module[11].

 

 

References

  1. NI-VISA Software

  2. Scilab

  3. Equalis Instrument Control Module

  4. Rigol DS4024 Digital Oscilloscope

  5. Microchip MPLAB X

  6. Microchip MCLV Board and the associated BLDC Motor

  7. Microchip ICD 3 In-Circuit Debugger/Programmer

  8. Equalis Embedded Coder Module “Sensored Brushless DC Motor Control"

  9. VISA “Virtual Instrument Software Architecture"

  10. SCPI “Standard Commands for Programmable Instruments"

  11. Equalis Xcos Coder and Embedded Coder Module

 

Share on Facebook
Share on Twitter
Please reload

Featured Posts

Equalis Data Acquisition and Control Systems in action

May 10, 2019

1/2
Please reload

Recent Posts
Please reload

Archive
Please reload

Search By Tags

I'm busy working on my blog posts. Watch this space!

Please reload

Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square

© 2020 Equalis LLC

Columbus, OH, United States

513-266-3862

  • Facebook
  • LinkedIn Social Icon
  • Twitter