From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fast control loop without using a buffer

I have a control loop which reads some input data from a source meter(keithley 2400) and processes the read data and controls certain equipments and this continues in a loop.i want the whole cycle to be as much shorter as possible.

 

TO read high speed data in sourcemeter It seems i may have to store 100's of values in abuffer and then transfer it.But by the time the 100 values are transferred tomy computer through my GPIB cable first few values would have no effect in controlling the feedback loop.

 

So I transfer every value read into the computer and process and do the feed back loop and then continue to read the next data.

but the speed reduces drastically to about 60 msec pers cycle.

 

can any one suggest any alternative to speed up the prcoess?

 

 

0 Kudos
Message 1 of 9
(2,938 Views)

I'm working with the 2600 series and got loop rates of 20 ms per cycle over GPIB, even if the NPLC is set to 0.01, so I guess we are limited mainly by the GPIB (it's more than 25 years old). So you could either use a different bus (I haven't done, but the TSP link could fit into the network card). Or you reprogram your control loop in lua and have it run on the keithley.

If you find a way, it would be nice to know about the solution.

 

Felix

Message 2 of 9
(2,930 Views)

The reason you are getting 20 msec might be that you are not using averaging.For accuracy puposes i am using an averaging of 3 values.

 

Moroever i am output signal in the control loop goes thro an RS232 and this output does not seem to be deterministic.ie it varies with a jitter.

 

Writing in Lua and running the pgm in keithley might be a solution if there are no other instuments to deal with..but in my case i need to send output signal to another  instrument.

 

The best alternative is to use NI's sourcemeter which has a PXI communication. I guess..but it is a bit expensive 

 

another alternative is to to use high speed data acquistion with a compact DAQ having a current source module card and voltage reading module card..which can act as a source meter and transfer rates in USb should be higher.

 

But then I foresee a small software problem which is as follows: the input data that is read is in the form of a signal.So i am not sure of how I would be able to process the data..as my logic (control loop) is based on a single instantaneous value.

 

Any suggestions to overcome this problem is welcome!!! 

0 Kudos
Message 3 of 9
(2,925 Views)

If you're using single loop architrecture, try chaning it to Master Slave architecture (File>>New>>From Template>>Frameworks>>Design Pattern>>Master/Slave Design Pattern).

Use Master loop to acquire data, and analysis ansd feedback in slave loop.

Doing this will separate thread between analysis and acquisition task which result in faster acquisition task especially fore multicore system.

Message 4 of 9
(2,906 Views)

Thanks for the info about master slave loops...I am yet to try the same ..i i will try it today..

But anyways i am wondering if i get a signal as a input..and my control is based on a single instantaneous value..how can this be matched ?

 

regadrs

Siva 

0 Kudos
Message 5 of 9
(2,895 Views)

Can you provide us with a bit more detailled specs? Such as control loop rate, signal requirements, current setup, available alternative instruments (like the cDAQ you mentioned).

* PXI will give you a very good timing and you should be able to realize loop rates of more than 4 kHz; but it is expensive mainly due to the chassis. You will only benefit from this, if you don't have some GPIB or RS232 bus in the loop;

* You could also set up some custom triggering using the keithleys digital outputs (to reduce the jitter you get over RS232)

 

Felix

0 Kudos
Message 6 of 9
(2,884 Views)

The cDAQ i was referring to is  

https://www.ni.com/en/shop/compactdaq.html

 

You can use necessary cards like analog output (current )like 

  https://www.ni.com/en-us/shop/model/ni-9265.html

 and voltage measurement card like

 https://www.ni.com/en-us/shop/model/ni-9201.html

 

 

Alternatively there are also  some other DAQs with dedicated processor and speeds can go upto 400Mhz but the problem is sensors may not be so reactive.

 https://www.ni.com/en-us/support/model.crio-9118.html

 

Also Does keithley sourcemeters have digital outputs and can they be used when using the source measure simultanelously..IF that is the case the script should run inside Keithley right??

 

0 Kudos
Message 7 of 9
(2,880 Views)

I have tried the master slave template.But now i am facing a problem of the 'condition' to send notification to the slave loop.

 

I am using GPIB read  vi to read data from my source meter and then I want to send this data to slave loop as notification.

So should I be checking  the status bit 8  of the status array output from GPIB read Vi and then send notification to slave loop?

 

this is the case where i read a singular input.

 

however when i have a signal as my input  what should be done?

 

regards

Siva 

 

 

 

0 Kudos
Message 8 of 9
(2,877 Views)

1. If bit 8 means new data available, use it for sending notice. 

2. When I have a signal as my input  what should be done? Analyze and send a feedback.

0 Kudos
Message 9 of 9
(2,857 Views)