Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a Serial Poll to check for fault conditions while running other parallel loops

Hi everyone

I have written a labview program to control an Agilent E3633A power supply.

Everything was working fine, but I wanted to add some additional functionality to it by running a parallel loop that continually polls the questionable bit (3) of the Status byte register. This questionable bit is asserted when things like over current or over voltage occur on the power supply.

 

I have never used the status registers before so this is all kind of new to me. 

 

I quickly wrote a quick program that I though would do what I wanted, but it never detects anything. I added the clear error only to remove the timeout error.

 

I also have the following questions:

1. Can I run this in a parallel loop that will continuously check the instrument status for over current, over voltage etc. while reading and writing commands in other loops? I want to only catch the instrument errors that might occur so that I can send an error to the user and shutdown the equipment.

2. Does the polling affect the throughput of my device? That is, will  the user see a slow down of the vi behavior while I am trying to do this?

 

 

0 Kudos
Message 1 of 5
(3,418 Views)

Hi

Instead of running this in a parallel loop I would occasionally ask the psu for its status.

Parallel to the main program but wrapping all calls to the psu in a functional global (or action engine) that has at least four functions:

1) open and initialize the device

2) program the voltage/current values and or limits.

3) chack status

4) close instrument.

 

1 will be called in the beginning of the program, 4 at the end

2 and 3 can be called from several loops taken into account that those calls will be serialized by thee functional global itself so that never a call within a call can happen.

 

If you search on action engine, you should be able to find an article from Ben Rainer.

greetings from the Netherlands
0 Kudos
Message 2 of 5
(3,409 Views)

Thank you so much for the reply.

I will perfrom the search as you suggested.

 

 

0 Kudos
Message 3 of 5
(3,405 Views)

ok I found the article and not knowing what an AE was, I refer to them as FGVs. 

This is good and I will implement this in my code to make sure I am not trying to read or wrtie to the supply from two differnt loops at the same time, but I think I want to take the next step which is not just to poll the supply periodically, but have something running in the backgroud that will alert the user when the IEEE-488 service request interrupt is sent to the controller.

 

According to the manual I must confiugure the bus controller to respond to these SRQ interupts....I am not sure how to do that???

Then I need to enable the function, whcih appears to be SPE (Serial Poll Enable)???

 

Once I get a service request then I can poll the equipment to find the equipment that issued the request.

 

Anyone have 

0 Kudos
Message 4 of 5
(3,390 Views)

In MAX you can check auto serial polling, although i prefer it to not set.

You must set the device to generate a service request on overflow etc. not the controller.

This is probably decribed in the anual, most of the time set a number of registers in the device.

Then you must program a subvi callback to be called when this service request comes in.

I've never done it, I prefer to check myself so I can also handle the result when I'm ready for it.

greetings from the Netherlands
0 Kudos
Message 5 of 5
(3,383 Views)