INOS
cinosphysicalaxis.h
Go to the documentation of this file.
1 //******************************************************************************
28 //******************************************************************************
29 
30 #ifndef INC_CINOSPHYSICALAXIS_H
31 #define INC_CINOSPHYSICALAXIS_H
32 //
33 //------------------------------------------------------------------------------
34 // defines
35 //------------------------------------------------------------------------------
36 //
37 #define DF_INOS_PHYSICAL_AXIS_DBT "INOS-PHYSICAL-AXIS" // db table name
38 #define DF_INOS_COUPLED_AXES_DBT "INOS-COUPLED-AXES"// db table name
39 #define DF_INOS_PHYSICAL_AXIS_NAME "CINOSPhysicalAxis" // axis name
40 //
41 // --- axis sub states ---------------------------------------------------------
42 //
43 #define DF_INOS_AXIS_SUBSTATE_MOVINGEX_WAIT_FOR_BORDER 10
44  #define DF_INOS_AXIS_SUBSTATE_MOVINGEX_WAIT_FOR_BORDER_DELAY 11
45 #define DF_INOS_AXIS_SUBSTATE_MOVINGEX_WAIT_FOR_EVENT 20
46  #define DF_INOS_AXIS_SUBSTATE_MOVINGEX_WAIT_FOR_EVENT_BORDER_DELAY 21
47  #define DF_INOS_AXIS_SUBSTATE_MOVINGEX_WAIT_FOR_EVENT_BORDER_DELAY1 22
48 #define DF_INOS_AXIS_SUBSTATE_MOVINGEX_WAIT_FOR_STOP 30
49 #define DF_INOS_AXIS_SUBSTATE_MOVINGEX_WAIT_FOR_END 40
50 //
51 // --- MoveEx flags ------------------------------------------------------------
52 //
53 #define DF_MOVEEX_FLAGS(X) \
54  X( DF_MOVEEX_STOP_AT_EVENT, 0x00000001) \
55  /* handle range (invert direction at range end) */ \
56  X( DF_MOVEEX_HANDLE_RANGE, 0x00000002) \
57  /* handle border (disable pos errors and invert direction at border) */ \
58  X( DF_MOVEEX_HANDLE_BORDER, 0x00000004) \
59  /* needs border before event (event trigger active AFTER border) */ \
60  X( DF_MOVEEX_NEEDS_BORDER, 0x00000008) \
61  /* move with reduced current */ \
62  X( DF_MOVEEX_REDUCE_CURRENT, 0x00000010) \
63  /* the requested position defines the searching range and the starting direction */ \
64  X( DF_MOVEEX_RANGE_IS_POS, 0x00000020) \
65  /* the requested position defines just the starting direction, the range is defined
66  by the software limits */ \
67  X( DF_MOVEEX_RANGE_IS_LIMIT, 0x00000040) \
68  /* set actPos = trgPos at event */ \
69  X( DF_MOVEEX_SET_ACT_POS, 0x00000000) \
70  /* set trgPos = actPos at event. This is useful to "know" the position at
71  which the trigger occurred. NOTE: If this flag is not set, then the "actual
72  axis position" will be SET to the trigger position. This latter use case is
73  useful for e.g. axis init. */ \
74  X( DF_MOVEEX_SET_TRG_POS, 0x00000080) \
75  /* no error if event NOT found */ \
76  X( DF_MOVEEX_NO_ERROR, 0x00000100) \
77  /* return back to origin at event */ \
78  X( DF_MOVEEX_BACK_TO_ORIGIN, 0x00000200) \
79  /* signal sync object already at event (normally it is signaled at the end of the
80  move) */ \
81  X( DF_MOVEEX_SIGNAL_AT_EVENT, 0x00000400) \
82  /* move away from border */ \
83  X( DF_MOVEEX_AWAY_FROM_BORDER, 0x00000800) \
84  /* let current reduced after end of move */ \
85  X( DF_MOVEEX_LET_CURRENT_REDUCED, 0x00001000) \
86  /* return back to event */ \
87  X( DF_MOVEEX_BACK_TO_EVENT, 0x00002000) \
88  \
89  /* event trigger mask */ \
90  X( DF_MOVEEX_TRG_MASK, 0x00ff0000) \
91  /* event trigger type mask */ \
92  X( DF_MOVEEX_TRG_TYPE_MASK, 0x00070000) \
93  \
94  /* event trigger 'less than' */ \
95  X( DF_MOVEEX_TRG_LS, 0x00000000) \
96  /* event trigger 'less than or equal' */ \
97  X( DF_MOVEEX_TRG_LE, 0x00010000) \
98  /* event trigger 'equal' */ \
99  X( DF_MOVEEX_TRG_EQ, 0x00020000) \
100  /* event trigger 'greater than or equal' */ \
101  X( DF_MOVEEX_TRG_GE, 0x00030000) \
102  /* event trigger 'greater than' */ \
103  X( DF_MOVEEX_TRG_GR, 0x00040000) \
104  /* event trigger 'not equal' */ \
105  X( DF_MOVEEX_TRG_NE, 0x00050000) \
106  \
107  /* edge triggered (otherwise level triggered) */ \
108  X( DF_MOVEEX_TRG_EDGE, 0x00080000) \
109  /* trigger level is actual value (level parameter is ignored) */ \
110  X( DF_MOVEEX_TRG_ACTUAL, 0x00100000) \
111  \
112  /* special trigger */ \
113  X( DF_MOVEEX_TRG_SPECIAL, 0x00200000) \
114  /* event trigger 'sync' */ \
115  X( DF_MOVEEX_TRG_SYNC, DF_MOVEEX_TRG_SPECIAL + 0x00000000) \
116  /* event trigger 'border' */ \
117  X( DF_MOVEEX_TRG_BORDER, DF_MOVEEX_TRG_SPECIAL + 0x00010000) \
118  /*
119  live flags */ \
120  X( DF_MOVEEX_EVT_BORDER, 0x01000000) \
121  /* direct move to m_rMePositionMove position after event */ \
122  X( DF_MOVEEX_DIRECT_MOVE, 0x02000000) \
123  /* direct move relative to m_rMePositionMove position after event */ \
124  X( DF_MOVEEX_DIRECT_MOVE_REL, 0x04000000)
125 
126 // --- coupling options --------------------------------------------------------
127 //
128 #define DF_INOS_AXIS_CPD_SEQUENTIAL 0x00000001
129 #define DF_INOS_AXIS_CPD_OWN_POS 0x00000002
130 #define DF_INOS_AXIS_CPD_READY 0x00000004
131 #define DF_INOS_AXIS_CPD_CORR 0x00000008
132 #define DF_INOS_AXIS_CPD_LOAD_BALANCE 0x00000010
133 #define DF_INOS_AXIS_CPD_SIM_ALWAYS 0x00000020
134 #define DF_INOS_AXIS_CPD_SEQUENTIAL_FORCED 0x40000000
135 #define DF_INOS_AXIS_CPD_ACTIVE 0x80000000
136 //
137 //------------------------------------------------------------------------------
138 // includes
139 //------------------------------------------------------------------------------
140 //
141 // system
142 #include <cinosbaseaxis.h>
143 #include <cinosbasecontrol.h>
144 #include <cinosbasemotor.h>
145 #include <inosmacro.h>
146 
147 //
148 // C++
149 //
150 // project
151 //
152 //------------------------------------------------------------------------------
153 //--- Define MOVEEX_FLAGS as enum ---------------------------------------------
154 //------------------------------------------------------------------------------
155 
156 INOS_DEFINE_ENUM_CODE(DF_MOVEEX_FLAGS)
157 
158 //------------------------------------------------------------------------------
159 //--- types --------------------------------------------------------------------
160 //------------------------------------------------------------------------------
161 //
163 typedef bool (*tpMeTrgFct)(void*, void*); // pointer to trigger function
164 //
165 // helper struct for template casting to work around compiler... peculiarities
166 template <class T>
167 struct SMeTrgFunc {
168  typedef bool (*tpMeTrgFct)(T*, T*);
169 };
171 //
172 //------------------------------------------------------------------------------
173 //--- structures ---------------------------------------------------------------
174 //------------------------------------------------------------------------------
175 
180 struct SINOSPhysicalAxis : public SINOSBaseAxis
181 {
185  inosName32 m_cControlType;
186 
189  inosName32 m_cMotorType;
190 
191  #if defined(INOS_FORCE_CONTROL_SUPPORT)
192 
194  inosName32 m_cForceType;
195  #endif
196 
197  #if defined(INOS_MOTORCONFIG_LOAD_SUPPORT)
198 
200  char m_cMotorConfig[63];
203  uint16 m_uMSAxisNumber;
208  uint8 m_uMotorConfigFlags;
209  #endif
210 
217  real64 m_rBorderLimit;
218 
222  real64 m_rBorderRelax;
223 
228 
231  uint32 m_uBorderDelay;
232 
235  uint32 m_uBorderStop;
236 };
237 
243 {
246  inosName64 m_cName1;
247 
250  inosName64 m_cName2;
251 
254  real64 m_rMaxDelta;
255 
258  real64 m_rMaxCorr;
259 
262  uint32 m_uOptions;
263 
266  inosName32 m_cLoadBalanceAxis;
267 
271 };
272 
273 //------------------------------------------------------------------------------
274 //
275 struct SINOSLoadBalancing
276 {
278  CINOSBaseAxis* m_pAxis = nullptr;
280  CINOSDacChannel* m_pItrqMaster = nullptr;
282  CINOSDacChannel* m_pItrqSlave = nullptr;
284  real64 m_rFactor = REAL64(0.0);
286  uintid m_uHookId = 0;
287 };
288 
289 //------------------------------------------------------------------------------
290 // class definition
291 //------------------------------------------------------------------------------
292 //
293 class CINOSBit;
294 class CINOSPhysicalAxis : public CINOSBaseAxis
295 {
296  //--- user interface ---------------------------------------------------
297 
298  // public member functions
299  public :
300 
301  // constructor/destructor
302 
303  explicit CINOSPhysicalAxis(SINOSPhysicalAxis* apDesc);
304  //; constructor
306  CINOSBaseControl* apControl, CINOSBaseMotor* apMoto);
307  //; constructor
308  virtual ~CINOSPhysicalAxis();
309  //; destructor
310  static CINOSPhysicalAxis* GetAxis(const char* apAxisName);
311  //; return pointer to axis apAxisName
312  static CINOSPhysicalAxis* GetAxis(uint32 auNumber);
313  //; return pointer to axis auNumber
314 
318  virtual uint32 Connect() override;
319 
320  virtual uint32 Activate(bool abCheckPos = true, bool abSimulatePos = false,
321  bool abSimulateOut = false, bool abSimulateAct = false,
322  CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
323  //; activate physical axis
324  virtual uint32 InActivate(CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
325  //; inactivate physical axis
326  virtual uint32 Relax(uint32 auTimeMs, CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
327  //; relax
328  virtual uint32 Commutate();
329  //; commutate pysical axis
330  virtual uint32 ForceCommutate(bool abAlways = false);
331  //; force a commutation at next acitvate, abAlways=true -> always,
332  //; abAlways=false -> only if axis not yet synchronised
333  virtual uint32 ReActivate(uint32 auDelayMs = 100);
334  //; inactivate axis, wait and activate it again using the same simulation flags
335 
336  virtual uint32 Sync(real64 arPosition, CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
337  //; move to position with sync detect and set pos to 0.0 at sync
338  virtual uint32 Sync(real64 arPosition, SINOSRampParam* apParam,
339  CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
340  //; move to position with sync detect and set pos to 0.0 at sync
341  virtual uint32 Sync(real64 arPosition, const char* apParam,
342  CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
343  //; move to position with sync detect and set pos to 0.0 at sync
344  virtual uint32 Sync(real64 arPosition, real64 arSyncPos,
345  CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
346  //; move to position with sync detect and set pos to aSyncPos, stop
347  //; if requested
348  virtual uint32 Sync(real64 arPosition, real64 arSyncPos,
349  SINOSRampParam* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
350  //; move to position with sync detect and set pos to aSyncPos, stop
351  //; if requested
352  virtual uint32 Sync(real64 arPosition, real64 arSyncPos,
353  const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
354  //; move to position with sync detect and set pos to aSyncPos, stop
355  //; if requested
356  virtual uint32 Sync(real64 arSyncPos, const char* apParam, CINCOObject* apObject,
357  CINOSSync* apSync = DF_INOS_SYNCHRONOUS) override;
358  //; move to position with sync detect and set pos to aSyncPos, stop
359  //; if requested
360  virtual uint32 Sync(real64 arPosition, real64 arSyncPos, uint32 auFlags,
361  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
362  //; move to position with sync detect and set pos to aSyncPos, stop
363  //; if requested
364  virtual uint32 Sync(real64 arPosition, real64 arSyncPos, uint32 auFlags,
365  SINOSRampParam* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
366  //; move to position with sync detect and set pos to aSyncPos, stop
367  //; if requested
368  virtual uint32 Sync(real64 arPosition, real64 arSyncPos, uint32 auFlags,
369  const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
370  //; move to position with sync detect and set pos to aSyncPos, stop
371  //; if requested
372 
382  virtual uint32 SyncMove(real64 arPosition, real64 arSyncPos, real64 arMovePos,
383  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
384 
395  virtual uint32 SyncMove(real64 arPosition, real64 arSyncPos, real64 arMovePos,
396  SINOSRampParam* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
397 
408  virtual uint32 SyncMove(real64 arPosition, real64 arSyncPos, real64 arMovePos,
409  const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
410 
411  virtual uint32 MoveEx(real64 arPosition, real64& arTrgPos, uint32 auFlags,
412  const char* apTrgName, real64 arTrgLevel, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
413  //; move extended (see MoveEx flags)
414  virtual uint32 MoveEx(real64 arPosition, real64& arTrgPos, uint32 auFlags,
415  const char* apTrgName, real64 arTrgLevel, SINOSRampParam* apParam,
416  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
417  //; move extended (see MoveEx flags)
418  virtual uint32 MoveEx(real64 arPosition, real64& arTrgPos, uint32 auFlags,
419  const char* apTrgName, real64 arTrgLevel, const char* apParam,
420  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
421  //; move extended (see MoveEx flags)
422 
423  virtual uint32 MoveExApp(real64 arPosition, real64 arPositionVel, real64 arVelocity,
424  real64& arTrgPos, uint32 auFlags, const char* apTrgName, real64 arTrgLevel,
425  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
426  //; move extended (see MoveEx flags)
427  virtual uint32 MoveExApp(real64 arPosition, real64 arPositionVel, real64 arVelocity,
428  real64& arTrgPos, uint32 auFlags, const char* apTrgName, real64 arTrgLevel,
429  SINOSRampParam* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
430  //; move extended (see MoveEx flags)
431  virtual uint32 MoveExApp(real64 arPosition, real64 arPositionVel, real64 arVelocity,
432  real64& arTrgPos, uint32 auFlags, const char* apTrgName, real64 arTrgLevel,
433  const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
434  //; move extended (see MoveEx flags)
435 
438  enum EBorderType {
443  };
444 
447  enum EBorderStop {
448  eBorderStopHard=0,
449  eBorderStopRamp=1,
450  };
451 
455  virtual void SetBorderType(EBorderType auType)
456  // set the type
457  { m_eBorderType = auType;};
458 
462  virtual void GetBorderType(EBorderType& auType)
463  // set the type
464  { auType = m_eBorderType;};
465 
469  virtual void SetBorderLimit(real64 arLimit)
470  // set the limit
471  { m_rBorderLimit = arLimit;};
472 
476  virtual void GetBorderLimit(real64& arLimit)
477  // set the limit
478  { arLimit = m_rBorderLimit;};
479 
483  virtual void SetBorderRelax(real64 arRelax)
484  // set the value
485  { m_rBorderRelax = arRelax;};
486 
490  virtual void GetBorderRelax(real64& arRelax)
491  // set the limit
492  { arRelax = m_rBorderRelax;};
493 
496  virtual uint32 ReleaseFromBorder();
497 
505  virtual uint32 MoveToBorder(real64 arPosition, const char* apParam,
506  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
507 
516  virtual uint32 MoveToBorder(real64 arPosition, real64& arResult,
517  const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
518 
530  virtual uint32 MoveToBorderApp(real64 arPosition, real64 arPositionVel,
531  real64 arVelocity, const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
532 
545  virtual uint32 MoveToBorderApp(real64 arPosition, real64 arPositionVel,
546  real64 arVelocity, real64& arResult, const char* apParam,
547  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
548 
562  virtual uint32 MoveToBorderApp(real64 arPosition, real64 arPositionVel,
563  real64 arVelocity, real64& arResult, uint32 auFlags, const char* apParam,
564  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
565 
576  virtual uint32 MoveToDigitalSensor(const char* apName, real64 arPosition,
577  bool abSet, const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
578 
590  virtual uint32 MoveToDigitalSensor(const char* apName, real64 arPosition,
591  bool abSet, real64& arResult, const char* apParam,
592  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
593 
613  virtual uint32 MoveToDigitalSensor(const char* apName, real64 arPosition,
614  bool abSet, real64& arResult, uint32 auFlags, const char* apParam,
615  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
616 
628  virtual uint32 MoveToDigitalSensorApp(const char* apName, real64 arPosition,
629  bool abSet, real64 arPositionVel, real64 arVelocity,
630  const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
631 
645  virtual uint32 MoveToDigitalSensorApp(const char* apName, real64 arPosition,
646  bool abSet, real64 arPositionVel, real64 arVelocity, real64& arResult,
647  const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
648 
663  virtual uint32 MoveToDigitalSensorApp(const char* apName, real64 arPosition,
664  bool abSet, real64 arPositionVel, real64 arVelocity, real64& arResult,
665  uint32 auFlags, const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
666 
677  virtual uint32 MoveToAnalogSensor(const char* apName, real64 arPosition,
678  real64 arLevel, bool abGreater, const char* apParam,
679  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
680 
692  virtual uint32 MoveToAnalogSensor(const char* apName, real64 arPosition,
693  real64 arLevel, bool abGreater, real64& arResult, const char* apParam,
694  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
695 
708  virtual uint32 MoveToAnalogSensor(const char* apName, real64 arPosition,
709  real64 arLevel, bool abGreater, real64& arResult, SINOSRampParam* apParam,
710  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
711 
724  virtual uint32 MoveToAnalogSensor(const char* apName, real64 arPosition,
725  real64 arLevel, bool abGreater, real64& arResult, uint32 auFlags,
726  const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
727 
740  virtual uint32 MoveToAnalogSensor(const char* apName, real64 arPosition,
741  real64 arLevel, bool abGreater, real64& arResult, uint32 auFlags,
742  SINOSRampParam* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
743 
757  virtual uint32 MoveToAnalogSensorApp(const char* apName, real64 arPosition,
758  real64 arLevel, bool abGreater, real64 arPositionVel, real64 arVelocity,
759  const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
760 
775  virtual uint32 MoveToAnalogSensorApp(const char* apName, real64 arPosition,
776  real64 arLevel, bool abGreater, real64 arPositionVel, real64 arVelocity,
777  real64& arResult, const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
778 
793  virtual uint32 MoveToAnalogSensorApp(const char* apName, real64 arPosition,
794  real64 arLevel, bool abGreater, real64 arPositionVel, real64 arVelocity,
795  real64& arResult, SINOSRampParam* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
796 
812  virtual uint32 MoveToAnalogSensorApp(const char* apName, real64 arPosition,
813  real64 arLevel, bool abGreater, real64 arPositionVel, real64 arVelocity,
814  real64& arResult, uint32 auFlags, const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
815 
831  virtual uint32 MoveToAnalogSensorApp(const char* apName, real64 arPosition,
832  real64 arLevel, bool abGreater, real64 arPositionVel, real64 arVelocity,
833  real64& arResult, uint32 auFlags, SINOSRampParam* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
834 
835  #if defined(INOS_FORCE_CONTROL_SUPPORT)
836 
842  virtual uint32 ForceActivate(const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
843 
848  virtual uint32 ForceInactivate(CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
849 
854  virtual uint32 ForceInactivate(double adLimit, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
855 
867  virtual uint32 ForceApproach(double adPosition, double adPositionVel, double adVelocity,
868  double adForce, double adForcelimit, const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
869 
879  virtual uint32 ForceDepart(double adPosition, double adPositionVel, double adVelocity,
880  double adForceLimit, const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
881 
888  virtual uint32 ForceMove(double adForce, const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
889 
895  virtual uint32 ForceMoveStop(const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
896 
904  virtual uint32 ForceBreak(double adForce, const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
905 
910  virtual uint32 ForceTara(double adForce = 0.0, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
911 
916  virtual uint32 ForceSelect(const char* apParam, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
917 
925  virtual uint32 ForcePull(double adForce);
926 
931  virtual uint32 EnableForceLimit(double adLimit);
932 
936  virtual uint32 DisableForceLimit();
937 
941  virtual uint32 ForceCancel();
942 
943  #endif // end if INOS_FORCE_CONTROL_SUPPORT
944 
945  // set/get property functions
946 
947  //; set commanded path axis position
948  virtual void SetPathPosition(real64 arPosition) override
949  { m_pControl->SetPathS(arPosition); };
950  virtual uint32 SetActPosition(real64 arPosition) override;
951  //; set actual commanded position
952  virtual void GetActPosition(real64& arPosition, bool abRamp = true) override;
953  //; get actual commanded position
954  virtual void GetActPosition(real64& arPosition, uint64 auTicks) override;
955  //; get actual commanded position at bus ticks auTicks
956  virtual void GetActPosition(real64& arCmdPosition, real64& arRealPosition);
957  //; get actual commanded and real positions
958  virtual void GetActVelocity(real64& arVelocity, bool abRamp = true) override;
959  //; get actual commanded velocity
960  virtual void GetActVelocity(real64& arCmdVelocity, real64& arRealVelocity);
961  //; get actual commanded and real velocities
962  virtual void GetActAcceleration(real64& arAcceleration, bool abRamp = true) override;
963  //; get actual commanded acceleration
964  virtual void GetActAcceleration(real64& arCmdAcceleration, real64& arRealAcceleration);
965  //; get actual commanded and real accelerations
966  virtual void GetActJerk(real64& arJerk, bool abRamp = true) override;
967  //; get actual commanded jerk
968  virtual void GetActPosError(real64& arPosError) override;
969  //; get actual position error
970  virtual void GetActVelocityError(real64& arVelocityError, bool abFiltered = false) override;
971  //; get actual velocity error
972  virtual void GetPosErrorAtEvent(real64& arPosError)
973  { arPosError = m_rMePosErr;};
974  //; get pos error at moveex event
975 
976  virtual uint32 SetRealPosition(real64 arPosition) override;
977  //; set actual real position
978  virtual void GetRealPosition(real64& arPosition, bool abMapped = true) override;
979  //; get actual real position
980  virtual void GetRealVelocity(real64& arVelocity) override;
981  //; get actual real velocity
982  virtual void GetRealVelocityFiltered(real64& arVelocity);
983  //; get actual filtered real velocity
984  virtual void GetRealAcceleration(real64& arAcceleration) override;
985  //; get actual real acceleration
986  virtual void GetRealJerk(real64& arJerk) override;
987  //; get actual real jerk
988 
990  void SetLifetimeDistance(real64 arDistance);
992  void GetLifetimeDistance(real64& arDistance);
993 
994  virtual void GetUnitsPerInc(double& adUnits) override;
995  //; get number of units per one inc
996  virtual void SetIncsPerUnit(double adIncs);
997  //; set number of incs per unit
998  virtual void GetIncsPerUnit(double& adIncs) override;
999  //; get number of incs per unit
1000  virtual void SetGearRatio(double adGearRatio);
1001  //; set gear ratio
1002  virtual void GetGearRatio(double& adGearRatio);
1003  //; get gear ratio
1004  virtual void SetFeedPerTurn(double adFeedPerTurn);
1005  //; set feed per turn
1006  virtual void GetFeedPerTurn(double& adFeedPerTurn);
1007  //; get feed per turn
1008  virtual void SetIncsPerTurn(double adIncsPerTurn);
1009  //; set incs per turn
1010  virtual void GetIncsPerTurn(double& adIncsPerTurn);
1011  //; get incs per turn
1012  virtual void GetTurnsPerMin(double& adTurnsPerMin);
1013  //; get turns per minute
1014  virtual void GetIncPosition(uint8& auIncPosition);
1015  //; get position of increments (A=0, B=1)
1016  virtual void SetInertia(double adInertia);
1017  //; set inertia
1018  virtual void GetInertia(double& adInertia);
1019  //; get inertia
1020 
1021  virtual void GetCycleTime(real64& arCycleTime, bool abOversampled=false) override;
1022  //; get axis cycle time [sec]
1023  virtual uint8 GetOversampling() override;
1024  //; get oversampling factor
1025  virtual uint16 GetCycleNumber() override;
1026  //; get axis cycle number
1027  virtual uint16 GetCycleId() override;
1028  //; get axis cycle id
1029  virtual void UpdateCycleId(uint16 auCycleId) override;
1030  //; set core id and cycle number the axis is running in
1031  virtual uint8 GetBusId() override;
1032  //; get axis bus id
1033  virtual uint32 SetParam(const char* apName, real64 arValue) override;
1034  //; universal set parameter with aName to aValue and return error code
1035  virtual uint32 GetParam(const char* apName, real64& arResult) override;
1036  //; universal get parameter with aName to aResult and return error code
1037 
1038  virtual int32 GetState() override;
1039  //; get axis state
1040  virtual int32 GetState(uint32& auRampState) override;
1041  //; get axis and ramp state
1042  virtual int32 GetState(uint32& auRampState, uint32& auControlState);
1043  //; get axis, ramp and control state
1044  virtual uint32 GetError(bool abResolveExternal = false) override;
1045  //; get axis error
1046  virtual uint64 GetErrorEx(bool abResolveExternal = false) override;
1047  //; get extended axis error
1048  virtual uint32 GetError(uint32& auRampError, bool abResolveExternal = false) override;
1049  //; get axis and ramp error
1050  virtual uint64 GetErrorEx(uint64& auRampError, bool abResolveExternal = false) override;
1051  //; get extended axis and ramp error
1052  virtual uint32 GetError(uint32& auRampError, uint32& auControlError,
1053  bool abResolveExternal = false);
1054  //; get axis, ramp and control error
1055  virtual uint64 GetErrorEx(uint64& auRampError, uint64& auControlError,
1056  bool abResolveExternal = false);
1057  //; get axis, ramp and control error
1058  virtual bool IsErrorFatal() override;
1059  //; return true if error is fatal
1060  virtual uint32 GetWarning(bool abResolveExternal = false) override;
1061  //; get axis warning
1062  virtual uint64 GetWarningEx(bool abResolveExternal = false) override;
1063  //; get extended axis warning
1064  virtual uint32 GetWarning(uint32& auRampWarning, bool abResolveExternal = false) override;
1065  //; get axis and ramp warning
1066  virtual uint64 GetWarningEx(uint64& auRampWarning, bool abResolveExternal = false) override;
1067  //; get extended axis and ramp warning
1068  virtual uint32 GetWarning(uint32& auRampWarning, uint32& auControlWarning,
1069  bool abResolveExternal = false);
1070  //; get axis, ramp and control warning
1071  virtual uint64 GetWarningEx(uint64& auRampWarning, uint64& auControlWarning,
1072  bool abResolveExternal = false);
1073  //; get axis, ramp and control warning
1074  virtual uint32 AcceptError() override;
1075  //; accept all errors
1076  virtual uint32 AcceptError(uint32 auError) override;
1077  //; accept error
1078  virtual uint32 AcceptError(uint32 auError, uint32 auRampError) override;
1079  //; accept error
1080  virtual uint32 AcceptError(uint32 auError, uint32 auRampError,
1081  uint32 auControlError);
1082  //; accept error
1083  virtual uint32 AcceptWarning() override;
1084  //; accept all warnings
1085  virtual uint32 AcceptWarning(uint32 auWarning) override;
1086  //; accept warning
1087  virtual uint32 AcceptWarning(uint32 auWarning, uint32 auRampWarning) override;
1088  //; accept warning
1089  virtual uint32 AcceptWarning(uint32 auWarning, uint32 auRampWarning,
1090  uint32 auControlWarning);
1091  //; accept warning
1092  virtual uint32 SetParam(const char* apName, uint64 auValue) override
1093  //; universal set parameter with aName to aValue and return error code
1094  { return defVarNotFound;};
1095  virtual uint32 GetParam(const char* apName, uint64& auResult) override
1096  //; universal get parameter with aName to aResult and return error code
1097  { return defVarNotFound;};
1098 
1099  // miscellaneous functions
1100 
1101  virtual CINCOObject* GetRegister() override;
1102  //; do inco registration and return pointer to it
1103  virtual CINOSBaseControl* GetControl()
1104  { return m_pControl;};
1105  //; return pointer to axis controller
1106  virtual CINOSBaseMotor* GetMotor()
1107  { return m_pMotor;};
1108  //; return pointer to axis controller
1109  #ifdef INOS_FORCE_CONTROL_SUPPORT
1110  virtual class CINOSForceControl* GetForce()
1111  { return m_pForce;};
1112  //; return pointer to force controller
1113  #endif
1114 
1115  virtual bool IsEmgInActivating();
1116  //; returns true if the axis is about to inactivate due to an emergency stop
1117 
1118  // auto sync
1119 
1120  virtual void EnableSync(real64 arPosition = REAL64(0.0),
1121  uint8 auSyncMode = DF_INOS_AXIS_SYNC_NOADJ) override;
1122  //; enable auto syncing (at sync set pos = arPosition)
1123  virtual void DisableSync() override;
1124  //; disable auto syncing
1125  virtual void GetSyncCount(uint32& auSyncCount) override;
1126  //; return actual sync counter
1127  virtual void SetSyncCount(uint32 auSyncCount) override;
1128  //; set sync counter
1129  virtual void GetSyncCorr(real64& arSyncCorr);
1130  //; return actual sync coorrection
1131  virtual bool EnableSafeSync();
1132  //; enable safe sync and return true if done/available
1133  virtual void DisableSafeSync();
1134  //; disable safe sync
1135 
1136  // auto norm
1137 
1138  virtual void EnableNorm(uint8 auMode = DF_INOS_AXIS_NORM_AFTER,
1139  uint8 auMoveDir = DF_INOS_AXIS_NORM_MOVE_DIR_NO,
1140  real64 arNormPos = REAL64(0.0)) override;
1141  //; enable auto norm of position
1142  virtual void DisableNorm() override;
1143  //; disable auto norm
1144 
1146  virtual void SetNormMode(uint8 auNormMode) override;
1147 
1148  // current limitation
1149 
1150  virtual void EnableCurLimit() override;
1151  //; enable current limitation
1152  virtual void DisableCurLimit() override;
1153  //; disable current limitation
1154  virtual void SetCurLimit(bool abEnable);
1155  //; set current limitation to requested value
1156  virtual bool GetCurLimit() override;
1157  //; return state of current limitation
1158  virtual void SetMaxCurrent(real64 arMaxCurrent);
1159  //; set the max current
1160  virtual void GetMaxCurrent(real64& arMaxCurrent);
1161  //; get the max current
1162 
1163 
1164  // coupling
1165 
1166  CINOSPhysicalAxis* GetCoupledAxis()
1167  { return m_pCpdAxis;};
1168  //; return pointer to my coupled axis if any
1169  uint32 GetCoupledOptions()
1170  //; return coupling options
1171  { return m_uCpdOptions;};
1172  virtual bool IsCouplingEnabled()
1173  //; checks if coupling is enabled
1174  { return m_uCpdOptions & DF_INOS_AXIS_CPD_READY;};
1175  virtual uint32 EnableCoupling(const char* apAxis, uint32 auOptions,
1176  real64 arMaxDelta);
1177  //; enable axis coupling with axis 'apAxis'
1178  virtual uint32 EnableCoupling(const char* apAxis, uint32 auOptions,
1179  real64 arMaxDelta, real64 arMaxCorr);
1180  //; enable axis coupling with axis 'apAxis'
1181  virtual uint32 EnableCoupling();
1182  //; enable axis coupling
1183  virtual uint32 DisableCoupling();
1184  //; disable axis coupling
1185  virtual uint32 EnableLoadBalancing(const char* apAxis, real64 arFactor);
1186  //; enable load balancing with axis 'apAxis'
1187  virtual uint32 DisableLoadBalancing();
1188  //; disable load balancing
1189  virtual void SetCpdOption(uint32 auOption) {
1190  INOS_OR(m_uCpdOptions, auOption);
1191  }
1192  virtual void ClrCpdOption(uint32 auOption) {
1193  INOS_AND(m_uCpdOptions, ~auOption);
1194  }
1195 
1196  // border limits
1197 
1198  virtual void SetBorderLimit(CINOSBit* apLimitPos, CINOSBit* apLimitNeg,
1199  bool abInverted = false)
1200  //; set border limits
1201  { m_pLimitPos = apLimitPos; m_pLimitNeg = apLimitNeg;
1202  m_bLimitInv = abInverted; if (m_pLimitPos || m_pLimitNeg) m_eBorderType = eBorderSensor;};
1203  virtual void ResetBorderLimit()
1204  //; reset border limits
1205  { m_pLimitPos = m_pLimitNeg = NULL;};
1206 
1207  // power
1208 
1209  virtual CINOSBit* GetPowerReady();
1210  //; get pointer to power ready bit
1211  virtual bool IsPowerReady();
1212  //; return true if power ready
1213  virtual bool IsOnline() const;
1214  //; \return true if the axis is online (physically connected to
1215  //; master). false otherwise.
1216 
1217  // enable
1218 
1220  void SetAxisEnableInput(const char* apInputName);
1222  void GetAxisEnableInput(char* apResult, uint32 auSize) const;
1223 
1224  // safety
1225 
1226  #ifdef INOS_SAFETY_SUPPORT
1227 
1228  virtual uint32 MoveMicro();
1229  //; initiate a micro move used to prevent a sincoshalt safety error
1230  //; \return true if the move was successfully initiated
1231  virtual bool iSetupSafetyRegistration() override;
1232  //; setup safety inco tree
1233 
1234  #endif // INOS_SAFETY_SUPPORT
1235 
1236  #if defined(INOS_MOTORCONFIG_LOAD_SUPPORT)
1237  virtual void GetMotorConfig(char* apResult, uint32 auSize) const
1238  {
1239  SINOSPhysicalAxis* desc = (SINOSPhysicalAxis*) m_pDesc;
1240  inos_strncpy(apResult, desc->m_cMotorConfig, auSize);
1241  }
1242  virtual bool IsMotorConfigValid() const
1243  {
1244  // motor config is invalid if a cpf is requested but not found, all other cases are 'valid'
1245  SINOSPhysicalAxis* desc = (SINOSPhysicalAxis*) m_pDesc;
1246  return !((nullptr != desc) && (0 != strlen(desc->m_cMotorConfig)) && (0 == (desc->m_uMotorConfigFlags & 1)));
1247  }
1248  virtual bool IsMotorConfigUnique() const
1249  {
1250  // motor config is unique if only this axis uses this config
1251  SINOSPhysicalAxis* desc = (SINOSPhysicalAxis*) m_pDesc;
1252  return ((nullptr != desc) && ((0 == strlen(desc->m_cMotorConfig)) || (2 == (desc->m_uMotorConfigFlags & 2))));
1253  }
1254  #endif
1255 
1256  //--- internals --------------------------------------------------------
1257 
1258  // protected member functions
1259  protected :
1260  void Create();
1261  //; create physical axis
1262  SINOSBaseRampTrqLimit* CreateTrqLimit(SINOSMotorTrqLimit* apLimit,
1263  real64 arAmax);
1264  //; create physical axis
1265  virtual void iInActivate() override;
1266  //; inactivate axis
1267  virtual void iStop(SINOSRampParam* apParam) override;
1268  //; internal stop
1269  virtual void iEmergencyStop(bool abLive = false) override;
1270  //; internal emergency stop
1271  virtual void iSetCycleTime(real64 arCycleTime) override;
1272  //; set axis cycle time [sec]
1273  virtual void iRegisterAxis() override;
1274  //; register axis
1275  virtual uint32 iMoveEx(real64 arPosition, real64& arTrgPos, uint32 auFlags,
1276  const char* apTrgName, real64 arTrgLevel, SINOSRampParam* apParam,
1277  CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1278  //; move extended (see MoveEx flags)
1279  void iiMoveEx();
1280  //; internal MoveEx (called as postbus hook)
1281  bool iMoveExSetupTrigger(const char* apTrgName, real64 arTrgLevel);
1282  //; internal MoveEx (called as postbus hook)
1283  bool iMoveExBorderReached();
1284  //; return true if border reached
1285  bool iMoveExBorder();
1286  //; return true if border reached
1287  bool iMoveExTriggerOccured();
1288  //; return true if trigger event occured
1289  void iMoveExRestoreControl();
1290  //; restore control flags
1291  void iMoveExCleanup();
1292  //; do clean up
1293  void iMoveExWaitForBorderDelayDone();
1294  //; post wait work
1295  void iMoveExWaitForEventBorderDelayDone();
1296  //; post wait work
1297  void iMoveExBorderOccured();
1298  //; border occured handler
1299  void iMoveExBorderRelaxStart();
1300  //; border relax start
1301  void iMoveExBorderRelaxStop();
1302  //; border relax stop
1303  ICACHE virtual void iPostMap() override;
1304  //; post mapping handler
1305  ICACHE virtual void iPostMapCpd();
1306  //; post mapping handler (coupled axis)
1307  ICACHE virtual void iPostWrite() override;
1308  //; post bus write handler
1309  ICACHE virtual void iPostWriteCpd();
1310  //; post bus write handler (coupled axis)
1311  virtual uint32 iEnableCoupling();
1312  //; enable axis coupling
1313  virtual void iActivateCoupling();
1314  //; activate coupling
1315  virtual void iInActivateCoupling();
1316  //; inactivate coupling
1317  void iCheckErrors();
1318  //; check for pending errors
1319  void iCheckWarnings();
1320  //; check for pending Warnings
1321  virtual void iSetActRampPosition(real64 arPosition) override;
1322  //; set actual ramp geni position
1323  static bool TestBit_0(void* apAddress , void* apNumber);
1324  //; returns true if bit apAddress:*apNumber = 0
1325  static bool TestBit_1(void* apAddress , void* apNumber);
1326  //; returns true if bit apAddress:*apNumber = 1
1327  static bool TestBit_true(void* apAddress , void* apNumber);
1328  //; returns always true
1329  uint32 eMoveEx(real64 arPosition, real64 arTrgPosition, uint32 auFlags,
1330  char* apTrgName, real64 arTrgLevel);
1331  //; MoveEx
1332  uint32 eMoveEx(real64 arPosition, real64 arTrgPosition, uint32 auFlags,
1333  char* apTrgName, real64 arTrgLevel, char* apParam);
1334  //; MoveEx
1335  uint32 eMoveToBorder(real64 arPosition, char* apParam);
1336  //; MoveToBorder
1337  uint32 eSync(real64 arPosition, real64 arSyncPosition, uint32 auFlags);
1338  //; sync axis
1339  uint32 eSync(real64 arPosition, real64 arSyncPosition, uint32 auFlags, char* apParam);
1340  //; sync axis
1341 
1342  void iLoadBalancingHook();
1343  //; load balancing hook
1344 
1345 #ifdef INOS_SAFETY_SUPPORT
1346  void iHandleSafety(uint32& uError);
1347  //; handle safety support
1348 #endif // INOS_SAFETY_SUPPORT
1349 
1350  // protected members
1351  protected:
1352  CINOSBaseMotor* m_pMotor;
1353  //; pointer to according motor
1354  CINOSBaseControl* m_pControl;
1355  //; pointer to according axis controller
1356  bool m_bSyncStop;
1357  //; true if stop requested after sync
1358  bool m_bPowerOnCtr0;
1359  //; true if ctr0 has to be taken to read power ready
1360 
1361  // MoveEx properties
1362 
1363  uint32 m_uMeFlags;
1364  //; actual move ex flags
1365  SINOSRampParam* m_pMeParam;
1366  //; move params
1367  uint32 m_uMeCtrFlag;
1368  //; control flags at start of moveex
1369  uint32 m_uMeRmpFlag;
1370  //; ramp flags at start of moveex
1371  real64 m_rMePosS;
1372  //; position at start of move
1373  real64 m_rMePosErr;
1374  //; position error at border
1375  real64 m_rMePos1;
1376  //; first end pos of range
1377  real64 m_rMePos2;
1378  //; second end pos of range
1379  real64* m_pMePosT;
1380  //; pointer to trigger position
1381  EBorderType m_eBorderType;
1382  //; type of border detection
1383  EBorderStop m_eBorderStop;
1384  //; type of stop at border
1385  real64 m_rBorderLimit;
1386  //; pos error indicating a border
1387  real64 m_rBorderRelax;
1388  //; move away distance after border detection before reactivating pos check
1389  //; supervision
1390  uint32 m_uBorderDelay;
1391  //; relax time [ms], during this time the controller is informed
1392  //; about the fact that we've just touched a border
1393  bool m_bBorderRelaxActive;
1394  //; true if border relax active
1395  void* m_pMeTrgSrcAdr;
1396  //; source address of trigger
1397  uint64 m_uMeTrgLevel;
1398  //; source address of trigger level
1399  tpMeTrgFct m_pMeTrgFct;
1400  //; pointer to actual trigger function
1401  uint16 m_uMeTrgSrcTyp;
1402  //; type of trigger
1403  uint16 m_uMeTrgSrcBit;
1404  //; bit number if trigger of type bit
1405  real64 m_rMePositionVel;
1406  //; used for moveexapp
1407  real64 m_rMeVelocity;
1408  //; used for moveexapp
1409  real64 m_rMePositionMove;
1410  //; used for syncmove
1411  bool m_bMeMoveApp;
1412  //; move app pending
1413  bool m_bMeCurrentLimit;
1414  //; current limit pending
1415  bool m_bMeRestoreControlFlags;
1416  //; restore control flags pending
1417  bool m_bMeTriggerMasked;
1418  //; trigger masked out
1419  real64 m_rMePositionAtBorder;
1420  //; axis position at border detection
1421 
1422  // coupling
1423 
1424  uint32 m_uCpdOptions;
1425  //; 'coupling' options
1426  CINOSPhysicalAxis* m_pCpdAxis;
1427  //; pointer to coupled axis
1428  CINOSBaseControl* m_pCpdControl;
1429  //; pointer to coupled controller
1430  uint16 m_uCpdWait;
1431  //; internal wait
1432  uint16 m_uCpdWaitCns;
1433  //; internal wait constant (4ms in cycles)
1434  real64 m_rCpdOffset;
1435  //; coupling offset between the two axes
1436  real64 m_rCpdMaxDelta;
1437  //; max. allowed S delta between coupled axes
1438  real64 m_rCpdMaxCorr;
1439  //; max. allowed correction if auto correction enabled (bit 3=1)
1440  real64 m_rCpdDelta;
1441  //; actual S delta between coupled axes
1442  uint32 m_uRelaxTime;
1443  //; relax time [ms]
1444  SINOSLoadBalancing m_CpdLoadBalancing;
1445  //; load balancing for coupled axes
1446 
1447  // border
1448 
1449  bool m_bLimitInv;
1450  //; true if limi switch handling inverted
1451  CINOSBit* m_pLimitPos;
1452  //; pointer to pos border limit (if available)
1453  CINOSBit* m_pLimitNeg;
1454  //; pointer to neg border limit (if available)
1455 
1456  // command parameters
1457  private:
1458  uint32 m_ueFlagsSync;
1459  //; param : Sync flags
1460  uint32 m_ueFlagsMoveEx;
1461  //; param : MoveEx flags
1462  real64 m_reTrgPos;
1463  //; param : TrgPos
1464  real64 m_reTrgLevel;
1465  //; param : TrgLevel
1466 
1467  char m_ceCpdAxis[16];
1468  //; param CpdAxis
1469  uint32 m_ueCpdOptions;
1470  //; param CpdOptions
1471  real64 m_reCpdMaxDelta;
1472  //; param CpdMaxDelta
1473  real64 m_reCpdMaxCorr;
1474  //; param CpdMaxCorr
1475  real64 m_reStretchFactor;
1476  //; param StretchFactor
1477  real64 m_reInertia;
1478  //; param inertia
1479 
1480  #if defined(INOS_FORCE_CONTROL_SUPPORT)
1481  double m_deForce = 5.0;
1482  double m_deForceLimit = 10.0;
1483  double m_deForceTara = 0.0;
1484  uint32 m_uForceControlFlags = 0;
1485  inosName32 m_ceForceParam{};
1486  class CINOSForceControl* m_pForce = nullptr;
1487  uintid m_uForceHookId = 0;
1488  CINOSSync* m_pForceSync = nullptr;
1489  uint32 eForceActivate(const char*);
1490  uint32 eForceInactivate();
1491  uint32 eForceInactivate(double);
1492  uint32 eForceApproach(double,double,double,double,double,const char*);
1493  uint32 eForceDepart(double,double,double,double,const char*);
1494  uint32 eForceMove(double,const char*);
1495  uint32 eForceMoveStop(const char*);
1496  uint32 eForceBreak(double,const char*);
1497  uint32 eForceTara(double);
1498  uint32 eForceSelect(const char*);
1499  // force methods protected to give descendants a chance to use them
1500  protected :
1501  void ForceSignal();
1502  void ForceSignal(CINOSSync* apSync);
1503  void ForcePosition();
1504  void ForceHook();
1505  void ForceHookEnable();
1506  void ForceHookDisable();
1507  #endif
1508 
1509  // allow dynamic object handling (new/delete)
1511 };
1512 
1513 //
1514 //------------------------------------------------------------------------------
1515 // end of file
1516 //------------------------------------------------------------------------------
1517 
1518 #endif // INC_CINOSPHYSICALAXIS_H
CINOSPhysicalAxis::ForceInactivate
virtual uint32 ForceInactivate(CINOSSync *apSync=((CINOSSync *) 0))
Switch from force to position mode.
SINOSLoadBalancing::m_rFactor
double m_rFactor
load balancing factor
Definition: cinosphysicalaxis.h:276
CINOSPhysicalAxis::MoveToDigitalSensorApp
virtual uint32 MoveToDigitalSensorApp(const char *apName, double arPosition, bool abSet, double arPositionVel, double arVelocity, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Search digital sensor till arPosition and stop if found.
DF_INOS_AXIS_NORM_AFTER
#define DF_INOS_AXIS_NORM_AFTER
Definition: cinosbaseaxis.h:171
CINOSBaseControl
Definition: cinosbasecontrol.h:318
cinosbaseaxis.h
SINOSMotorTrqLimit
torque limitation
Definition: cinosbasemotor.h:187
CINOSPhysicalAxis::ForceApproach
virtual uint32 ForceApproach(double adPosition, double adPositionVel, double adVelocity, double adForce, double adForcelimit, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Search requested force [N], stop if found and switch to force mode.
CINOSPhysicalAxis::EBorderStop
EBorderStop
The different border stopping types the system supports.
Definition: cinosphysicalaxis.h:439
SINOSLoadBalancing::m_pItrqSlave
CINOSDacChannel * m_pItrqSlave
pointer to Itrq output of slave axis (aka Y1)
Definition: cinosphysicalaxis.h:274
SINOSLoadBalancing::m_uHookId
uintid m_uHookId
load scale hook
Definition: cinosphysicalaxis.h:278
CINOSPhysicalAxis::Connect
virtual uint32 Connect() override
Connect axis to hardware.
CINOSPhysicalAxis::SyncMove
virtual uint32 SyncMove(double arPosition, double arSyncPos, double arMovePos, CINOSSync *apSync=((CINOSSync *) 0))
Search reference till max. arPosition. If reference found, set position at reference to arSyncPos and...
CINOSPhysicalAxis::SetAxisEnableInput
void SetAxisEnableInput(const char *apInputName)
set name of axis enable input
CINOSPhysicalAxis::SetBorderLimit
virtual void SetBorderLimit(double arLimit)
Set border limit value (used in MoveToBorder method)
Definition: cinosphysicalaxis.h:461
SINOSPhysicalAxis::m_rBorderLimit
double m_rBorderLimit
Border limit. If working with border methods like CINOSPhysicalAxis::MoveToBorder this value defines ...
Definition: cinosphysicalaxis.h:209
CINOSPhysicalAxis::InActivate
virtual uint32 InActivate(CINOSSync *apSync=((CINOSSync *) 0)) override
Inactivate axis.
SINOSCoupledAxes::m_rLoadBalanceFactor
double m_rLoadBalanceFactor
load balance factor (used only when option DF_INOS_AXIS_CPD_LOAD_BALANCE is set)
Definition: cinosphysicalaxis.h:262
CINOSPhysicalAxis::MoveToDigitalSensor
virtual uint32 MoveToDigitalSensor(const char *apName, double arPosition, bool abSet, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Search digital sensor till arPosition and stop if found. If not found, the axis will go into "Failed"...
CINOSBaseAxis
Provides axis functionality.
Definition: cinosbaseaxis.h:679
INOS_OR
#define INOS_OR(variable, mask)
Definition: inosmacro.h:201
SINOSPhysicalAxis::m_cControlType
inosName32 m_cControlType
Controller type name. Valid types are INOSPosControl, INOSCurControl or a customer specific controlle...
Definition: cinosphysicalaxis.h:177
CINOSPhysicalAxis::MoveToBorderApp
virtual uint32 MoveToBorderApp(double arPosition, double arPositionVel, double arVelocity, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Search border till arPosition and stop if found. The current limitation is switched on at the reduced...
CINOSBit
Definition: cinosbit.h:53
SINOSCoupledAxes::m_uOptions
uint32 m_uOptions
Coupling options, see DF_INOS_AXIS_CPD_SEQUENTIAL.
Definition: cinosphysicalaxis.h:254
DF_INOS_AXIS_NORM_MOVE_DIR_NO
#define DF_INOS_AXIS_NORM_MOVE_DIR_NO
Definition: cinosbaseaxis.h:188
SINOSPhysicalAxis::m_uBorderDelay
uint32 m_uBorderDelay
Defines the time [ms] to wait at the border till controller settled.
Definition: cinosphysicalaxis.h:223
SINOSCoupledAxes::m_cLoadBalanceAxis
inosName32 m_cLoadBalanceAxis
Axis whose position determines the load balancing (used only when option DF_INOS_AXIS_CPD_LOAD_BALANC...
Definition: cinosphysicalaxis.h:258
CINOSPhysicalAxis::ForceBreak
virtual uint32 ForceBreak(double adForce, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Ramp the commanded force to the requested value [N] with the given param set. Expect a collapse befor...
SINOSLoadBalancing
Definition: cinosphysicalaxis.h:267
SINOSPhysicalAxis::m_cMotorType
inosName32 m_cMotorType
Motor type name. Currently only INOSBaseMotor is a valid name.
Definition: cinosphysicalaxis.h:181
SINOSCoupledAxes
Descriptor structure used to configure the behaviour of two coupled axes It is usually defined in a c...
Definition: cinosphysicalaxis.h:234
SINOSCoupledAxes::m_cName2
inosName64 m_cName2
Name of second axis to be coupled.
Definition: cinosphysicalaxis.h:242
CINOSPhysicalAxis::ForceSelect
virtual uint32 ForceSelect(const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Select given param set.
CINOSPhysicalAxis::eBorderSpeedAbs
@ eBorderSpeedAbs
use real speed to detect border
Definition: cinosphysicalaxis.h:434
inosmacro.h
The macro definition file.
CINOSPhysicalAxis::ForceDepart
virtual uint32 ForceDepart(double adPosition, double adPositionVel, double adVelocity, double adForceLimit, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Switch to position mode and depart from force point.
CINOSBaseRamp
Definition: cinosbaseramp.h:751
CINOSPhysicalAxis::DisableForceLimit
virtual uint32 DisableForceLimit()
Disable force limitation.
CINOSPhysicalAxis::ForceMoveStop
virtual uint32 ForceMoveStop(const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Stop a running ForceMove with the given param set.
SINOSCoupledAxes::m_cName1
inosName64 m_cName1
Name of first axis to be coupled.
Definition: cinosphysicalaxis.h:238
CINOSPhysicalAxis::SetLifetimeDistance
void SetLifetimeDistance(double arDistance)
set lifetime distance (only used at startup by either mcrobot or user code)
SINOSBaseAxis
Descriptor structure used to configure a base axis. It is usually only used in conjunction with SINOS...
Definition: cinosbaseaxis.h:393
SINOSCoupledAxes::m_rMaxDelta
double m_rMaxDelta
Max. allowed delta [units] of the two coupled axes before an error is triggered.
Definition: cinosphysicalaxis.h:246
SINOSPhysicalAxis::m_uBorderType
uint32 m_uBorderType
Defines the type of border detection or in other words, tells the system what kind of border detectio...
Definition: cinosphysicalaxis.h:219
SINOSPhysicalAxis::m_cForceType
inosName32 m_cForceType
Force control type name.
Definition: cinosphysicalaxis.h:186
CINOSPhysicalAxis::MoveToAnalogSensor
virtual uint32 MoveToAnalogSensor(const char *apName, double arPosition, double arLevel, bool abGreater, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Search analog sensor till arPosition and stop if found.
CINOSPhysicalAxis::GetBorderRelax
virtual void GetBorderRelax(double &arRelax)
Get border relax value (used in MoveToBorder method)
Definition: cinosphysicalaxis.h:482
CINOSPhysicalAxis::DisableNorm
virtual void DisableNorm() override
CINOSPhysicalAxis::SetBorderRelax
virtual void SetBorderRelax(double arRelax)
Set border relax value (used in MoveToBorder method)
Definition: cinosphysicalaxis.h:475
CINOSPhysicalAxis::eBorderStopRamp
@ eBorderStopRamp
stop the move with a stopping ramp (cmdB)
Definition: cinosphysicalaxis.h:441
CINOSPhysicalAxis::ForceTara
virtual uint32 ForceTara(double adForce=0.0, CINOSSync *apSync=((CINOSSync *) 0))
Set current force [N] to given value.
CINOSPhysicalAxis::MoveToAnalogSensorApp
virtual uint32 MoveToAnalogSensorApp(const char *apName, double arPosition, double arLevel, bool abGreater, double arPositionVel, double arVelocity, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Search analog sensor till arPosition and stop if found.
SINOSCoupledAxes::m_rMaxCorr
double m_rMaxCorr
Max. allowed correction if auto correction enabled, see DF_INOS_AXIS_CPD_CORR.
Definition: cinosphysicalaxis.h:250
INOS_AND
#define INOS_AND(variable, mask)
Definition: inosmacro.h:210
SINOSPhysicalAxis::m_rBorderRelax
double m_rBorderRelax
This value defines the move away distance [units] after border detection before reactivating position...
Definition: cinosphysicalaxis.h:214
CINOSPhysicalAxis::eBorderSpeed
@ eBorderSpeed
use the current speed error to detect border
Definition: cinosphysicalaxis.h:432
SINOSLoadBalancing::m_pAxis
CINOSBaseAxis * m_pAxis
pointer to the axis whose position determines the load balancing (aka X)
Definition: cinosphysicalaxis.h:270
CINOSBaseMotor
Definition: cinosbasemotor.h:203
CINOSPhysicalAxis::ForceMove
virtual uint32 ForceMove(double adForce, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Ramp the commanded force to the requested value [N] with the given param set.
DF_INOS_AXIS_CPD_READY
#define DF_INOS_AXIS_CPD_READY
coupled axis ready to activate
Definition: cinosphysicalaxis.h:124
SINOSPhysicalAxis::m_uBorderStop
uint32 m_uBorderStop
Defines how to stop a move after a border detection, see CINOSPhysicalAxis::EBorderStop.
Definition: cinosphysicalaxis.h:227
cinosbasemotor.h
Short comment.
CINOSPhysicalAxis::ForceActivate
virtual uint32 ForceActivate(const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Switch from position to force mode.
CINOSPhysicalAxis::MoveToBorder
virtual uint32 MoveToBorder(double arPosition, const char *apParam, CINOSSync *apSync=((CINOSSync *) 0))
Search border till arPosition and stop if found (use ReleaseFromBorder before other moves are initiat...
CINOSPhysicalAxis::eBorderStopHard
@ eBorderStopHard
immediately stop the trajectory by setting cmdV = 0.0
Definition: cinosphysicalaxis.h:440
CINOSPhysicalAxis::GetBorderType
virtual void GetBorderType(EBorderType &auType)
Get border limit type (used in MoveToBorder method)
Definition: cinosphysicalaxis.h:454
CINOSPhysicalAxis::ForceCancel
virtual uint32 ForceCancel()
Cancels force controller.
CINOSPhysicalAxis
Provides physical aka real axis functionality.
Definition: cinosphysicalaxis.h:286
DF_INOS_SYNCHRONOUS
#define DF_INOS_SYNCHRONOUS
Definition: inosmacro.h:332
CINOSPhysicalAxis::ReleaseFromBorder
virtual uint32 ReleaseFromBorder()
Release from border (used after MoveToBorder)
CINOSPhysicalAxis::GetAxisEnableInput
void GetAxisEnableInput(char *apResult, uint32 auSize) const
get name of axis enable input
CINOSPhysicalAxis::SetBorderType
virtual void SetBorderType(EBorderType auType)
Set border limit type (used in MoveToBorder method)
Definition: cinosphysicalaxis.h:447
CINOSPhysicalAxis::Activate
virtual uint32 Activate(bool abCheckPos=true, bool abSimulatePos=false, bool abSimulateOut=false, bool abSimulateAct=false, CINOSSync *apSync=((CINOSSync *) 0)) override
Activate axis in a given mode, e.g Activate(true,true,true,true) enables the axis in a full simulated...
SINOSBaseRampTrqLimit
torque limitation
Definition: cinosbaseramp.h:660
CINOSPhysicalAxis::EnableForceLimit
virtual uint32 EnableForceLimit(double adLimit)
Enable force limitation to given limit.
CINOSPhysicalAxis::SetNormMode
virtual void SetNormMode(uint8 auNormMode) override
CINOSPhysicalAxis::eBorderPosition
@ eBorderPosition
use the current position check error to detect border
Definition: cinosphysicalaxis.h:431
cinosbasecontrol.h
Short comment.
CINOSPhysicalAxis::ForcePull
virtual uint32 ForcePull(double adForce)
Set a new force point start force pull mode if not et done. If one is running an axis in force pull m...
CINOSSync
Definition: inos_syn.h:66
DECLARE_DYNAMIC
#define DECLARE_DYNAMIC(aClass)
Definition: cinospartitionmemory.h:328
SINOSLoadBalancing::m_pItrqMaster
CINOSDacChannel * m_pItrqMaster
pointer to Itrq output of master axis (aka Y)
Definition: cinosphysicalaxis.h:272
CINOSPhysicalAxis::EBorderType
EBorderType
The different border types the system supports.
Definition: cinosphysicalaxis.h:430
SINOSRampParam
ramp parameters
Definition: cinosbaseramp.h:502
CINOSPhysicalAxis::Relax
virtual uint32 Relax(uint32 auTimeMs, CINOSSync *apSync=((CINOSSync *) 0)) override
Relax a coupled slave axis for a given time.
CINOSDacChannel
Definition: cinosdacchannel.h:51
CINOSPhysicalAxis::GetLifetimeDistance
void GetLifetimeDistance(double &arDistance)
get current lifetime distance
CINOSPhysicalAxis::eBorderSensor
@ eBorderSensor
use a digital input to detect border
Definition: cinosphysicalaxis.h:433
CINOSPhysicalAxis::GetBorderLimit
virtual void GetBorderLimit(double &arLimit)
Get border limit value (used in MoveToBorder method)
Definition: cinosphysicalaxis.h:468
SINOSPhysicalAxis
Descriptor structure used to configure a physical axis. It is usually defined in a corresponding xxx....
Definition: cinosphysicalaxis.h:172