romainbrette / clampy

4 stars 0 forks source link

Code for controlling Axoclamp 900A #2

Open romainbrette opened 5 years ago

romainbrette commented 5 years ago

This should be on the model of devices/multiclamp.py

romainbrette commented 5 years ago

We have some basic support.

romainbrette commented 5 years ago

We should now include more (all?) functions from the DLL, and same for the Multiclamp.

romainbrette commented 5 years ago

Some blocks of commands that are necessary:

And others that would be useful:

romainbrette commented 5 years ago

Ah yes, track functions are interesting, it's a slow current injection. All this is in the manual.

romainbrette commented 5 years ago

After this, we need:

We also need to check what happens when the program exits: do the amplifier parameters get reset? (ie run the program again and measure the value of parameters)

romainbrette commented 5 years ago

If parameters are reset, then we should implement also the serialization functions.

huyhoang93 commented 5 years ago

Some blocks of commands that are necessary:

  • Gain and lag functions
  • Pipette Capacitance Neutralization
  • Oscillation killer functions
  • Bridge Balance functions
  • Scaled output signal functions

And others that would be useful:

  • Headstage functions
  • Meter and status functions
  • Holding functions
  • External command functions
  • Test signal functions
  • Pulse functions
  • Buzz functions
  • Pipette offset functions
  • +/- Clear functions
  • Track functions: I don't know what this, so maybe check in the manual?
  • Sample Rate function
romainbrette commented 5 years ago

Great, do they work? Also, what happens if you set a parameter, exit, then run the program again: is the parameter still set at the desired value?

mstimberg commented 5 years ago
* Unsolved problem with get_scaled_output_signal_table (the signal name is not properly received)

Just as a comment (I looked at this together with Hoang): I don't quite understand how this function is supposed to be called, but maybe it isn't very useful in the first place. Potentially it is intended to give access to the table hardcoded into the header file:

static AXC_Signal s_Signals[AXC_MAX_SIGNALS] =
{
{ AXC_CHAN_1, AXC_SIGNAL_ID_XICMD1, AXC_SIGNAL_NAME_XICMD1, TRUE },
...

Importantly, WinWCPXE does not make any use of this function...

romainbrette commented 5 years ago

Ah ok, let's drop this one then.

romainbrette commented 5 years ago

Apparently amplifier parameters are actually kept between two runs. It wasn't before because the reset function was called at initialization. So we don't need to be able to load and save parameters. However, when reading the parameters, we get incorrect values (0; at least for capacitance neutralization). It seems that it just reads from previous commands, not from the amplifier. TEVC now works too. The main issue now is bridge balance doesn't work. It works on the hardware though, because the commander can do it, and when we run an acquisition after that, bridge balance is applied correctly. So the problem really in issueing the command. The bridge_range function returns (0.,0.,0,4095) which is weird!

romainbrette commented 5 years ago

We also need to add filter commands.

romainbrette commented 2 years ago

We could not get it to work on the lab PC because the DLL is 32 bits and so won't run with 64 bit Python (if I recall correctly). Instead I have added GUI automation, which works. But it's not entirely satisfying because it means one cannot do anything while the Axoclamp commander is used, or weird stuff will happen.

An alternative would be to run a server, through a 32 bit Python, that would expose the main object through RPyC.