Jump to content
  • 0

Any way to do a PID loop closure using Analog Discovery? Script?


mkj

Question

I know the likely answer is no - due to limits of and script looping in terms of window timer etc accuracy.

But I'm always surprised by the capability in this thing.

But any simple way to do a PI loop closure ?  Like measure on CH1 and CH2 and command?

It can certainly do "seconds" for things like temp control but I'm looking for less than 10 ms delay lag.

 

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
On 10/14/2021 at 7:42 AM, attila said:

Hi @mkj

See the following posts:

>>A lower latency solution would be using the ADP 3000 series and running the app/script on the device with AXI latency (microsecs)

Thanks! - we have an ADP3540 on order.  Are you saying it runs at a faster latency using something like ASIO drivers compared to the Analog Discovery "small" units?

Or is this "Linux" mode which looks like it runs ON the ADP3450?  Would I run a python or ? script then in Linux mode or Waveforms?

Edited by mkj
Link to comment
Share on other sites

  • 0

Very, very cool (ADP3450) looking forward to it.

I need to verify today but I may have worked out a way to get close to 1msec consistency using the standard AD and python waveforms SDK.  I created a threaded python class and am using this from stack overflow to allow me to create surprisingly precise delays.  ( I know delays are not desired in closed loop, this is for trouble-shooting gain and phase margin)

https://stackoverflow.com/questions/38319606/how-can-i-get-millisecond-and-microsecond-resolution-timestamps-in-python

Link to comment
Share on other sites

  • 0

Seems to be working with a few msec delay.  

Is the below the best (fastest) way to command a voltage output?

  • FDwfAnalogOutNodeOffsetSet(HDWF hdwf, int idxChannel, AnalogOutNode node, double vOffset)

 

what settings should FDwfDeviceAutoConfigureSet have for fastest response, update?  Or doesnt it matter?

 

  • FDwfDeviceAutoConfigureSet(HDWF hdwf, BOOL fAutoConfigure)

Description: Enables or disables the AutoConfig setting for a specific device. When this setting is enabled, the device is automatically configured every time an instrument parameter is set. For example, when AutoConfigure is enabled, FDwfAnalogOutConfigure does not need to be called after FDwfAnalogOutRunSet. This adds latency to every Set function; just as much latency as calling the corresponding Configure function directly afterward. With value 3 the analog-out configuration will be applied dynamically, without stopping the instrument.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...