Parameters/control modes changes using simplemotion


I would like to have a few precisions on the IONI driver using the simplemotion library:

  • is it possible to change in real time the torque, speed and position limits on the IONI driver using the simplemotion library. For instance if, the IONI driver is in position control, is it possible to adjust in real-time the torque limit ?
  • is it possible to switch from position control mode to torque control mode (and vice-versa) in real-time and what is the delay for the change ?
1 Like

I have the exact same question.

@Lionel Did you find the answer?

I’m sorry that we haven’t answered this question. I’ll ping Tero about this.

Yes, both are possible. @Lionel @Ales_Svoboda.

To change control mode, just write new value to SMP_CONTROL_MODE. Details from simplemotion_defs.h:

#define SMP_CONTROL_MODE 559
	//control mode choices:
	#define CM_TORQUE 3
	#define CM_VELOCITY 2
	#define CM_POSITION 1
	#define CM_NONE 0

You can also adjust maximum torque produced in any mode by writing values to variables:

//continuous current limit mA
//peak current limit mA

Note: if you wish to just limit the maximum, then it’s enough just to write values to SMP_TORQUELIMIT_PEAK. If PEAK is set lower than CONT, then PEAK is used also as continuous limit.

Writing these values take typical time, just like most of parameter writes. Say couple of milliseconds max unless your RS485 bus device becomes bottleneck (i.e. due to USB latency).

I hope this helps!