LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up logical names for IVI class drivers

I am developing a LabVIEW (2015) application that implements highly customizable test sequences for various test setups. It should be able to communicate with various types of instruments from different vendors. Hence, I decide to go with the generic IVI class drivers. I want to avoid using instrument-specific drivers as much as possible.

 

Now I am trying to run a DC power supply from Agilent (E3644A) using a VI I wrote with the IVI DC Power Supply VIs (those green ones). I need to set up a logical name for the instrument as the VI does not accept a VISA resource name. If I try to create a new logical name on MAX, I have to select something for the Driver Session but there is nothing suitable. How can I let the program know that the user-defined logical name "Agilent E3644A" is associated with, say, a COM3 device? Oddly, I haven't come across a single example that uses the generic green class VIs yet.

0 Kudos
Message 1 of 6
(5,502 Views)

IVI is an Hardware Abstraction Layer (HAL). IVI defines device class specific methods which build the Application Separation Layer (ASL). The logical name defines the ASL in your user application.

The device however has to be called by device specific drivers. These drivers implement the IVI ASL methods with device specific commands. This layer is called Device Specific Software Plugin (DSSP).

The DSSP of IVI is the "driver session".

 

In the driver session (in MAX) you have to configure what the exact instrument is you are going to use. The logical name is hence a "modifiable DSSP selector".

Please refer to MAX documentation and IVI white papers to learn more about driver sessions (for example here).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 6
(5,485 Views)

Thanks, Norbert.

 

I chose 'hpe364xa' for the driver session under the logical name.

I added COM3 as a hardware asset for that driver session.

Now COM3 is associated with the hpe364xa driver session, which is associated with the logical name.

Everything else was left as default.

Then, I tried running the DC Power Supply Driver VI as shown in the OP.

I get no error message but nothing really happens to the power supply.

 

Do you have a quick guess?

 

0 Kudos
Message 3 of 6
(5,474 Views)

I never used a COM device with IVI, so i have no experience on what the reason might be.

Therefore the following are standard guesses:

- COM port might the wrong one. Esp. when using a laptop ou usually have a virtual COM port.

- Serial settings might be wrong. Are you sure the driver DLL takes care about serial settings like Baud Rate, Parity, ...?

- You do not receive errors like timeout? What happens if you observe communication using NI IO Trace?

- One of the dialog images imply that you are configuring the driver session to simulate the device. Double check behavior when setting "Simulate with" to "Don't Simulate".

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 6
(5,461 Views)

Yes, I had to select "Don't simulate" to do anything with the actual instrument. Then I had to uncheck "Range Check", too, because it was giving me an out-of-range error for the current limit configuration. Now if I run it, it does change the voltage level as I set but I keep getting either 'RS-232 framing error', 'Invalid character' or 'Invalid separator'.

 

The power supply communicates well through the plug-and-play driver (for Agilent E364X Series) without any error. That driver has a serial attribute setup block (terminal charater, ASRL, buffer size) inside the Initialize VI. I cannot find anything like that from the IVI driver. In either case, serial port settings (Baud rate, data bits, etc.) are done in MAX. Before going any further to troubleshoot this, I tried another instrument with simple USB connection this time.

 

I tried using a Keithley 2100 DMM to measure 3V through both plug-and-play driver and an IVI class driver I wrote. Both didn't give me any explicit error but the IVI class driver VI returned a ridiculously huge number (OVLD is indicated on the DMM). It seems something wrong happens with the IviDmm Configure Measurement VI. The range input is auto (-1) by default.

 

Any insight or tips for resolving these issues would be appreciated as I keep searching for them.

 

0 Kudos
Message 5 of 6
(5,443 Views)

There are a couple of possible reasons:

1. Keithley doesn't fully support IVI (very unikely)

2. You are running into Dot-Comma-issues. Please verify with regional settings configured for USA.

3. The RS232 port is incorrectly configured. As you already wrote, configure the COM in MAX to the settings the DMM requires.

4. There is some kind of configuration missing for the specific DMM which you can pass as "Init w/ Options" or define in your driver session (Driver Setup).

5. What happens if you run an auto-zero and then take the measurement?

6. What does the DMM tell you in its display when running both VIs? Is the content shown in the display similar? (Indicates scaling issue, maybe coupled to 2)

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 6
(5,412 Views)