Using a method called from opcua fill an specific array position

alebrije
2022-02-17
2022-02-18
  • alebrije - 2022-02-17

    Hello Everybody,

    I have the following problem.
    I have an Opcua communication where I can execute a method from my PLC. As an example we can take the method JogNegative:
    This command is under Opcua-->MovingUnits(Structure of 10 movingunits)-->MovingUnit1(structure of moving unit signals and methods)-->JogNegative(Method with an output called Result).
    depending of wich method is calles (movingunit1..2..3..10) i want to write the jog signal in my internal array of structures.
    Please see the picture.. there u can find the Uaexpert connection with the methods and signals, my logic in the method (is not running) and the array that i would like to fill depending of the moving unit number.

    Feel free to ask if u have any more questions
    Regards!

     
  • dFx

    dFx - 2022-02-18

    You can write FB internals signals.
    Then, on FB call, do the processing of those signals and provide an internal result.
    And forward the result with some property for exemple.
    So you would have only to provide the correct structure on the correct FB call, which you should be aware at design time.

    As your method seems to perform async orders (Jogging), you can forward a result of the order correctly scheduled, and use properties to know the state of your axis (jogging forward, stopped ..)

     

    Last edit: dFx 2022-02-18

Log in to post a comment.