Pointer to Softmotion axis

simotion
2023-10-25
2023-11-23
  • simotion - 2023-10-25

    In my projet I use Softmotion.
    There are several Softmotion axis (type SM_Drive_Virtual).
    In the Global Variable List I have an array of pointers to the adress of the Axis.
    Axis : ARRAY[1..iMaxCntAxes] OF POINTER TO AXIS_REF_SM3 :=
    ADR(AX01_Axis), // [1

    ADR(AX02_Axis), // [2]

    This works, but when compiling I get the message :
    .
    [WARNING] E3D: GVL Device: PLC Logic: Application: C0564: A reference to uninitialized variable AX01_Axis is used for initialization of Axis. Accessing the uninitialized variable may result in unexpected behavior.
    [WARNING] E3D: GVL Device: PLC Logic: Application: C0564: A reference to uninitialized variable AX02_Axis is used for initialization of Axis. Accessing the uninitialized variable may result in unexpected behavior.

    Is there a way when initializing to force the hardware (softmotion axis) to first initialize and then the Global Variable List?

     

    Related

    Talk.ru: 2

  • simotion - 2023-10-27

    No ideas?

     
  • totorovic - 2023-11-09

    I get the same warning message with initialized variable.
    Codesys 3.5.19.20

     

Log in to post a comment.