Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-4110 Power Supply using IVI - Device state is lost when reference is closed!

Ok, I'm used to VISA for example, where you can open and close a VISA handle all day long to the instrument you wish to control, and everything is peachy keen. Then I start using this PXI-4110 power supply with an NI IVI driver. I open a reference to the device, program one channel (enable the power supply output), then close the reference......<time marches on>.....in another part of my code I open a reference to the device, program ANOTHER channel (enable the power supply output.....and the first channel turns off!

This device is apparently stateless, it has no idea what state it's in as this has seemingly been left up to the driver. This means a reference to the device must be opened at the beginning of my app. and left open FOR THE LIFE OF THE APPLICATION, which of course means I have to use a global (YECH) to hold the reference. With TWO supplies this becomes more complicated. Now I have to keep an array of references and go through manipulations to figure out which device I want to communicate with and therefore which reference in the array to use. The LAST thing I want to do is hard-code a reference or alias. Hard-coding is bad.....mmmmmkay?

Can someone tell me if this behaviour is true for most devices using IVI? If so, I think it sucks. I don't like leaving references or handles open when I'm not using them. It's much cleaner to do "OPEN", "READ/WRITE", "CLOSE"...where needed.

BillM.
0 Kudos
Message 1 of 18
(4,824 Views)

Hello BillM,

I see that you are using a PXI-4110 in an application where you are trying to open and close a reference to the device. I believe I have talked to you over the phone with regards to this issue. If I am mistaken please correct me.

Firstly, I'd like to address the comparison with the VISA driver. The VISA driver often deals with reading/writing to various instruments and does not necessary require device specific state information. You can not compare VISA with the NI-DCPower driver. The NI-DCPower driver is specific to the NI-4110. May of the drivers do exhibit the similar behavior that you are experiencing with the PXI-4110.

I agree the documentation on this issue is unclear. I have been working on correcting this with the assistance of our R&D team.

Thank you for your feedback. It helps improve our support and products. If you are the customer I talked with yesterday. I will also personally follow up with you.

In addition, National Instruments will be closed July 4th and July 5th for Holidays, and resuming normal business hours Friday July 6.

Have a great day!

Regards,
  Sandra T.

Applications Engineer | National Instruments

0 Kudos
Message 2 of 18
(4,812 Views)
Yes, after our conversation on the phone, I have since been running fine by populating shared variables with the power supply references and using those references throughout the life of my application. I am also aware that you and the R&D folks have seen some behaviour that you are investigating further.

Thanks for your help.
0 Kudos
Message 3 of 18
(4,753 Views)

Sandra or Bill

I am using the PXI 4110 for the first time and not familiar with IVI. I have been trying to change the settings on a single channel without changing the others and not having much success. It soundslike you may have resolved this issue. Can I ask how this should be done or if there is an example?

Michael

Michael
mebels@metasolns.com
0 Kudos
Message 4 of 18
(4,591 Views)
Hello Michael,
       Are you using the IVI DC Power Class driver or the NI-DCPower Driver?  Looking at the the IVI Class driver, it looks like you should be able to configure each channel separately by choosing which string you pass to the "Channel" Control of the driver VIs.  It should be the same for NI-DCPower

       I highly recommend that you take a good look at the DC Power Example and see how the channel name is passed to most of the VIs.  You can get to the example in the Example Finder by going to Hardware Input and Output>>Instrument Drivers>>IVI

Cheers,

NathanT
0 Kudos
Message 5 of 18
(4,574 Views)
Hello Michael,

I see that you are first time user of out PXI-4110 power supply. The resources that NathanT has suggested are great to get you started. What are you doing in your application? The more specific the information that you can get the better I can assist you. Are you running into the same issue that Bill was see with the IVI driver?

The PXI-4110 can also be programmed using the NI-DCPower driver. This driver can be downloaded at the follow link:

NI-DCPower 1.1.2 - Real-Time OS, Windows 2000/XP

Are you programming the device in the LabVIEW environment? or using a text base language?

In LabVIEW, once the driver is installed, you can access NI-DCPower LabVIEW examples throught the NI Example Finder. You can get to the Example Finder by selecting, Help>>Find Examples to open NI Example Finder in LabVIEW. Then you can refer to Hardware Input and Output>>Modular Instruments>>NI-DCPOWER (DC Power Supplies) for additional example.

In addition, what are you trying to do with your PXI-4110? What channels are you using?

I hope these resources gets you started. Consider the alternative of using the NI-DCPower driver if you are not limited to using IVI.

Regards,
  Sandra T.

Applications Engineer | National Instruments

0 Kudos
Message 6 of 18
(4,553 Views)

I have the same problems as Bill@NGC.

I was always told that in a stae machine program all states such that, it can run by itself: open, read/right, close

In one state I set the voltages I need on my PXI-4110 and turn it on. In another stage I want to read the current draw on one or more of the channels. When I open the driver for reading the current it shuts off the power output. This is contrary to Any instrument driver I have ever worked with.

This behavior already wasted a lot of my time. I had to research this matter etc...

Is there a solution to this problem by now? There was plenty of time for that since 2007..

 

Scientia est potentia!
0 Kudos
Message 7 of 18
(3,817 Views)

Magyar,

 

The reason behind the power supply turning off when you create a new task is inherent in the "niDCPower Initialize with Channels" VI. When you create the first task you set the output to be a constant voltage on the DC Power supply. Then you close the task and the VI is still set at that specific power based on the last known state. The niDCPower Initialize VI changes the settings on the PXI-4110 to load the power supply to a fresh known state, in which there is no supplied power on the device. In order to read the current draw on the supplied power, you need to have the current reading inherent in the first task, or in your new task continue to have the DC power supply output the same voltage along with the reading. Feel free to reply at any time if you experience any more issues or need more clarification. I will be happy to help solve this issue for you. Thanks

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 8 of 18
(3,800 Views)

I do undestand tha this behavior is inherent in the driver. I am sad though. I think, most ouf our fellow devlopers would prefer if it would not forgot everything just because "niDCPower Initialize with Channels" VI is called. This behaviour for a powersupply is contrary to what we have bacome acustumed to. Therefore it results in wasted time during development.

I think, the "niDCPower Initialize with Channels" VI should be renamed: CForget everything and Initialize with Channels".

There should be an "niDCPower dont Re-Initialize just keep existing state"

My sourcecode will be even larger this way, but, at least, the PXI-4110 responds fast to commands.

 

Thank you for your time and attention.

Scientia est potentia!
0 Kudos
Message 9 of 18
(3,797 Views)

Why do you close the reference if you still need the power supply.

As far as I can see you still are using the powersupply only not communicating with it.

So Open the power supply in a functional global and keep it open until you decide you are really done with the powersupply.

greetings from the Netherlands
0 Kudos
Message 10 of 18
(3,793 Views)