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!

I am working on test sequencer.

Long time ago I had learned to create tasks in a test sequence that can run on their own.

They are not dependent on any of the other tests. This way if  I have a completely different task order, I don't have to worry about doing this or that befoe I do what I need to do now.

Now I am forced to do it the way we were warned agains.

I think, every time I need to REaD THE CURRENT from the SMU, I will have to set all  the voltages, Voltage and current limits etc..

I will just need to remeber to pack all that in there every time.

It seem like this method is using more block diagram estate than it would be necessary using for example an Agilent E3631A powersupply.

Scientia est potentia!
0 Kudos
Message 11 of 18
(1,358 Views)

I agree that in a test sequencer it is nice to have modular code as modular as possible, but also to have a test be executed as fast as possible so initialising all needed instruments at the beginning of a sequence (or even earlier) and closing them afterwards can have an enormous speed impact also.

 

You see that all good styles have to be used with care. We always teach trainees to exactly follow style guide exept when they add the reason why they deviate from the style guide.

greetings from the Netherlands
0 Kudos
Message 12 of 18
(1,354 Views)

Here we go again...I am using the NI DCpwr driver with a PXI-4010.
I am told that I need to keep the device reference open if I don't want the 4110 to forget everything when I read the current from  it.
So I Initialize the instrument once, later I try to adjust the voltagete etc... and read from it.
I get an error telling me that, there is not enough information or the device is not connected. I noticed that the device reference is recreated with a number in parenteces. As many times i run my VI I get that many unique instrument references. Si i gave up and wanted to go to lunch.


Next, I wanted to close all my VIs and closw LabVIEW 2010 then I got this very famliar error message about ThEvent.cpp line 236.

I was explainded for example in a response from NI support (I am quoting): ""It does seem that it does not happen everytime and it seems that your files are not corrupted. Since, you mentioned you are using NI-VISA then it corresponds exactly with a Corrective Action Request that will be fixed in LabVIEW 2010 SP1. I would recommend when LabVIEW 2010 SP1 comes out, download the update and you should not see this issue again. In the meantime, this error is something that happens and there is no workaround mentioned so the process that you are following is what you will have to keep doing until SP1 comes out."

..."(Reference#7312055) LabVIEW 10.0%2032-bit error log file: ThEvent.cpp line 236"


I am at my wits end here. Should I throw out the PXI-4110 and get an agilent  E3631A?

 

Scientia est potentia!
0 Kudos
Message 13 of 18
(1,339 Views)

I'm sorry you run into such problem. I did not here from it before but I don't hear everything.

 

But even though Let me ask,, about how you your settings in VISA are.

One of the settings in LabVIEW options in Environment is automatically close VISA sessions and I believe it is on by default.

If so uncheck this and no new visa sessions should be opened also. Ofcourse do not explicitly open the instrument each time only the first time.

 

I'm curious whta you have but in any case weekend has started over here.

greetings from the Netherlands
Message 14 of 18
(1,335 Views)

I do not see any "NIDC Power Close.vi" and you may be keeping N number of references open at the same time. These N references would be created each time this section of code is run, and you never close them. The first error could be because it is trying to open a reference to "Dev1/ai0" for instance, but sees the reference already opened after the first run. It then names the reference "Dev1/ai0(2)" and so on, which is not a valid device name which causes this error.

 

I agree with Albert that you may need to ensure that reference are closed along with the VI when it is closed. The second error could also be as a result of having hundreds of references open that Labview is confused with what to do with them all when it is closed. It may be similar in explanation or even the same error as the VISA car could be because it is encountering a problem with references and this is the default response when there are too many open references. If so, closing the references / auto closing them at VI exit would be the best option.

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 15 of 18
(1,297 Views)

Hi Frank

thanks for trying to help and I agree that opening and opening the same refnum is generating possible errors, but in this case I'm trying to convince NOT to close but also not to reopen the instrumentdriver but simply to keep the reference and stay using the same reference.

greetings from the Netherlands
0 Kudos
Message 16 of 18
(1,293 Views)

I tried to use a functional global (attached) to pass on the device reference.

It seems to work but it looks ridiclulous that we have to do this.

I can't beleive there is no other way to have a modular code while using the PXI-4110.

This driver for the PXI-4110 is not behaving like an SCPI driver:

 it does not preserve the status of the device unless I keep the  device reference open.

 

On the other hand it is not behaving like a DAQmx driver either: I can not create tasks in the MAX.

All that we have in the MAX is a softpanel that allowes us to check if the 4110 operates on a very very basic level.

 

Is this really the only way? Functional globals?

Scientia est potentia!
0 Kudos
Message 17 of 18
(1,284 Views)

Why didn't the RnD team just fixt this behavior?

You had years to do it!

Scientia est potentia!
0 Kudos
Message 18 of 18
(1,125 Views)